AutoMovie API
    Preparing search index...

    Function samplePoseVelocity

    • A pose and its rate of change at one instant, read from the pure function of time that produces it.

      Read from both sides, the rate is the symmetric difference (f(t + h) - f(t - h)) / 2h of every clinical angle and of the root translation, and the root's angular velocity is the rotation vector of q(t + h) q(t - h)^-1 over 2h. A motion that only exists on one side of the instant (the action a cut ends, the action a cut begins) is read from that side alone, by the three-point difference s (-3 f(t) + 4 f(t + s h) - f(t + 2 s h)) / 2h with s the side's sign, the rotation vectors taken from q(t): a symmetric difference would average the motion's rate with whatever its function returns across the instant. Differencing the source function, never emitted frames, keeps the estimate free of the frame grid: either difference is second order, its error O(h^2) times the third derivative. An angle absent from a sample counts as zero, its clinical neutral.

      Each joint's angular velocity (spins) is read the way the root's is, from the rotation vectors of its articulation at the same samples (poseJointCodec), never from the angle rates: at an angle chart's gimbal the angle rates of a smooth rotation are unbounded, while its angular velocity is not.

      A pose whose limbs are fitted to targets carries each fit's resolution into the difference, divided by h. With continued, the rate is read from the instant's own fits continued to its neighbours (each seeded with the instant's choice and refined to samplePoseVelocity.tolerance, IAutoMovieSwivelNear), the instant's sample included, while the pose returned is still sample's: the difference then sees the motion, not the fits' resolution, and a fit whose best basin changes inside the step is read on the branch the instant is on.

      Parameters

      • sample: (seconds: number) => IAutoMoviePose

        The pose as a pure function of seconds.

      • seconds: number

        The instant.

      • step: number = 1e-3

        The difference interval h, seconds; 1 ms by default.

      • side: AutoMovieMotionSampleSide = "both"

        Which side of the instant the motion is read from: both by default.

      • Optionalrig: IAutoMoviePoseRig

        The rig the joints' angles are read through for spins; the default basis with rest-relative angles when omitted.

      • Optionalcontinued: (seconds: number) => IAutoMoviePose

        The pose as a pure function of seconds with every fit continued from the instant's, the rate's samples; sample when omitted.

      • Optionalprepared: ICodec | (() => ICodec)

        Optional same-rig codec or lazy getter, demanded only after the actual samples and joint-rate indexing.

      Returns IAutoMoviePoseState

      The pose at the instant and its velocity.