Function interpolatingSpline

Returns path data for a curve that smoothly interpolates the given points. Interpolation is performed via a Catmull-Rom spline.

  • Parameters

    • pathType: string

      either "open" or "closed."

    • points: VecN[]

      points to be interpolated

    • tension: Num = 0.25

      smoothness of curve (0=piecewise linear, .25=default)

    Returns PathData

    Path data for interpolating spline