simvx.core.math.curves

Curve: 1D property-animation curve with linear interpolation and optional bake.

Module Contents

Classes

Curve

1D curve for property animation: stores (t, value) pairs with linear interpolation.

API

class simvx.core.math.curves.Curve(points: list[tuple[float, float]] | None = None)[source]

1D curve for property animation: stores (t, value) pairs with linear interpolation.

Initialization

add_point(t: float, value: float)[source]

Insert a point, maintaining sort order by t.

remove_point(index: int)[source]

Remove the point at the given index.

sample(t: float) float[source]

Sample the curve at t using linear interpolation.

sample_baked(t: float) float[source]

Sample from a cached, uniformly-baked lookup table (baked lazily on first call).

property point_count: int[source]
__repr__()[source]