Expand description
§Design, Animate and Program Geometry
With other words: It is a type safe, dynamic, functional reactive library with homotopy maps.
This library uses ideas researched by Sven Nilsen of using homotopy maps to construct geometry. Control points flags and ragdoll engine is based on Cutout Pro’s Elemento.
§Motivation
This libray is intended for design, animating and programming geometry.
Function reactive programming is more fun when dynamic. This means the user can modify the behavior at runtime.
The use of homotopy maps is a promising technique for constructing geometry. A homotopy map is a continuous function that maps from N-dimension normalized coordinates to some M-dimensional space. See https://github.com/pistondevelopers/construct for more information.
The problem with dynamic frameworks for functional reactive programming is that there often is a tradeoff with making it nice to use at compile time. For example, when getting a reference to a spline, it is easy to accidentally use it with another type, e.g. a surface.
By separating memory by function types, it is possible to make the API type safe in Rust.
§Features (work in progress)
- Functional graph evaluation
- Environment with time and delta time (allows formal reasoning about animation and motion)
- Homotopy maps up to 4D
- Colors (converts sRGB to linear color space for internal use)
- Ragdoll physics
- Fine tuned control over caching
- Control point selection and locking
§Goals
- Create a modernized version of Cutout Pro’s Elemento core for use in Turbine
- Reusable in other game engines
- Design for editing in VR
- AI behavior trees (not decided yet)
§Design
All data is stored in memory by their function type. This means one function can reference another function using an index, while keeping type safety at compile time.
Objects are created by combining functions.
Modules§
- color
- Helper methods for colors
- fns
- Higher order structures for functions (including data).
- ptr
- Pointers to higher order structures.
Structs§
- Cache
- Used to store temporary values of shared functions to speed up computation.
By default, all function outputs that are referenced more than once are cached.
To signal that some function output should be cached,
None
is stored in a hash map. When performing the first computation of that output,Some(value)
is stored in the cache. - Environment
- Used to set runtime behavior of external evaluation.
- Physics
- Stores intermediate data for physics simulation.
- Reactor
- Stores data for an reactive document.
- Selection
- Stores selection state.
Type Aliases§
- Bone1
- Bone for 1D.
- Bone2
- Bone for 2D.
- Bone3
- Bone for 3D.
- Bone4
- Bone for 4D.
- Bone
Ref1 - Bone reference for 1D.
- Bone
Ref2 - Bone reference for 2D.
- Bone
Ref3 - Bone reference for 3D.
- Bone
Ref4 - Bone reference for 4D.
- Color
- Color stored as normalized
[r, g, b, a]
. - Color
Component - Color component type.
- Spline1
- Spline for scalars.
- Spline2
- Spline for 2D.
- Spline3
- Spline for 3D.
- Spline4
- Spline for 4D.
- Spline
Ref1 - Spline reference for scalar.
- Spline
Ref2 - Spline reference for 2D.
- Spline
Ref3 - Spline reference for 3D.
- Spline
Ref4 - Spline reference for 4D.
- Surface1
- Surface for 1D.
- Surface2
- Surface for 2D.
- Surface3
- Surface for 3D.
- Surface4
- Surface for 4D.
- Surface
Ref1 - Surface reference for scalar.
- Surface
Ref2 - Surface reference for 2D.
- Surface
Ref3 - Surface reference for 3D.
- Surface
Ref4 - Surface reference for 4D.