Options
All
  • Public
  • Public/Protected
  • All
Menu
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

Hierarchy

  • CatmullRomPath

Index

Constructors

constructor

Properties

Private vertices

vertices: Array<Vertex>
member

{Array} vertices

memberof

CatmullRomPath

instance

Methods

addPoint

generateCurve

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

    name

    generateCurve

    memberof

    CatmullRomPath

    instance

    Parameters

    • Optional circular: boolean

      Specify if the path should be closed.

    • Optional tension: number

      (default=0) An optional tension parameter.

    Returns CubicBezierCurve[]

    Array

Private solveClosed

Private solveOpen

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Private property
  • Private method
  • Static property
  • Static method

Generated using TypeDoc