bezier
Functionbezier(
states: list[State],
control_points: list[Point2D],
alignment: ElementAlignment = <ElementAlignment.PRESERVE: 'preserve'>,
element_rotation_offset: float = 0,
element_rotation_offset_fn: Optional[Callable[[float], float]] = None,
arc_length_spacing: bool = True
) -> list[State]
Arrange states along a Bezier curve (quadratic or cubic).
Parameters
-
states - List of states to arrange
-
control_points - List of (x, y) tuples for Bezier control points (2, 3, or 4 points)
-
alignment - How to align each element relative to the curve.
-
element_rotation_offset - Additional rotation in degrees added to the alignment base.
-
element_rotation_offset_fn - Function that takes position t (0-1) and returns rotation offset.
-
arc_length_spacing - If True, space elements evenly by arc length. If False, use even t spacing.
Returns
New list of states with positions along the Bezier curve