Optional
vertices: Vertex[]CatmullRomPath
Private
verticesvertices
CatmullRomPath
Add a new point to the end of the vertex sequence.
The vertex (point) to add.
addPoint
CatmullRomPath
Generate a sequence of cubic Bézier curves from the point set.
Optional
circular: booleanSpecify if the path should be closed.
Optional
tension: number(default=0) An optional tension parameter.
Array
generateCurve
CatmullRomPath
Private
solvePrivate
solve
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