Skip to main content
Version: Next

getInterpolatedPathAtDistance

Callable


  • Builds a path from an origin to the first point reaching a target radial distance.

    The final point is interpolated between the previous path point and the first point whose distance from the origin is at least targetDistance.


    Parameters

    • origin: Point2D

      Starting point of the path.

    • points: Point2D[]

      Candidate path points in traversal order.

    • targetDistance: number

      Distance from the origin at which to stop the path.

    Returns Point2D[]

    Path points ending at the interpolated target distance when reached.