Documentation
    Preparing search index...

    Class CubicBezierTrajectory

    Cubic Bézier curve (§13 "Bézier"), traversed with the parameter advancing linearly in time (u = t / duration).

    B(u)   = (1−u)³·p0 + 3(1−u)²u·p1 + 3(1−u)u²·p2 + u³·p3
    B'(u)  = 3(1−u)²(p1−p0) + 6(1−u)u(p2−p1) + 3u²(p3−p2)
    B''(u) = 6(1−u)(p2−2p1+p0) + 6u(p3−2p2+p1)
    

    Velocity is B'(u) / duration and acceleration B''(u) / duration² by the chain rule. The parameter is uniform, not arc length, so the speed along the curve varies with the control-point spacing.

    Implements

    Index
    duration: number

    Natural extent of the path in seconds. See the module note on extrapolation.