curveCatmullRomClosed function Curves

Curve curveCatmullRomClosed(
  1. Path context
)

Produces a closed cubic Catmull–Rom spline using the specified control points and the parameter alpha (see curveCatmullRomClosedAlpha), which defaults to 0.5, as proposed by Yuksel et al.

When a line segment ends, the first three control points are repeated, producing a closed loop.

Implementation

Curve curveCatmullRomClosed(Path context) =>
    curveCatmullRomClosedAlpha(0.5)(context);