Classdesc

Compute the Catmull-Rom spline path from a sequence of points (vertices).

For comparison to the HobbyCurve I wanted to add a Catmull-Rom path (to show that the HobbyCurve is smoother).

This demo implementation was inspired by this Codepen by Blake Bowen https://codepen.io/osublake/pen/BowJed

Requires

CubicBezierCurve

Requires

Vertex

Constructors

Properties

vertices: Vertex[]

Member

vertices

Memberof

CatmullRomPath

Instance

Methods

  • Generate a sequence of cubic Bézier curves from the point set.

    Parameters

    • Optional circular: boolean

      Specify if the path should be closed.

    • Optional tension: number

      (default=0) An optional tension parameter.

    Returns CubicBezierCurve[]

    Array

    Name

    generateCurve

    Memberof

    CatmullRomPath

    Instance

Generated using TypeDoc