Skip to main content

Module math

Module math 

Source
Expand description

Mathematical primitives: functions, force fields, attractors.

Every visual property in Proof Engine is driven by a MathFunction. Every spatial interaction is modeled as a ForceField. No keyframes. No tweens. Only functions.

Re-exports§

pub use eval::MathFunction;
pub use fields::ForceField;
pub use fields::Falloff;
pub use fields::FieldTarget;
pub use attractors::AttractorType;
pub use springs::SpringDamper;
pub use springs::Spring3D;
pub use springs::SpringDamper3;

Modules§

attractors
Strange attractor implementations — RK4 integration, Lyapunov exponents, warmup.
color
Color science utilities: color spaces, palettes, gradients, LUT generation.
complex
Complex numbers, quaternions, and iterative fractal evaluation.
curves
Parametric curves — Bezier, B-Spline, Catmull-Rom, and Hermite splines.
eval
MathFunction enum and evaluation.
fields
Force fields — continuous spatial functions that apply forces to glyphs.
geometry
Computational geometry: primitives, intersection, distance, convex hull, triangulation, polygon operations, GJK/EPA collision detection.
noise
Noise functions for the Proof Engine mathematical renderer.
numerical
Numerical methods: root finding, quadrature, ODE solvers, linear algebra, interpolation. All implementations are from scratch — no external crates.
simulation
Simulation systems: cellular automata, N-body physics, reaction-diffusion, epidemiological models, and traffic simulation.
springs
Spring-damper physics.
statistics
Statistics and probability: descriptive stats, distributions, hypothesis testing, regression, Bayesian inference, random number generation, information theory.

Functions§

evaluate
Evaluate a scalar function of time. t = elapsed seconds since engine start. input = chained input value (for composed functions).
hsv_to_rgb
Hsv to RGB.
lerp_color
Lerp two colors.
remap
Map a value from [in_min, in_max] to [out_min, out_max].
smootherstep
Smoother step (6t⁵ - 15t⁴ + 10t³).
smoothstep
Smooth step (3t² - 2t³).