Skip to main content

Module spring

Module spring 

Source
Expand description

Analytical Mass-Spring-Damper dynamics in 1D, 2D, and 3D (Zero-Heap).

Evaluates the continuous analytical closed-form solution of: m·x’‘(t) + c·x’(t) + k·(x(t) - x_target) = 0 Supports under-damped (ζ < 1), critically-damped (ζ = 1), and over-damped (ζ > 1) regimes without numerical drift, time-step sensitivity, or heap allocation.

Structs§

SpringConfig
Spring configuration parameters.
SpringState1D
State of a 1D spring simulation.
SpringState3D
3D Spring state (x, y, z) evaluated independently across components.