BezierCurve

BezierCurve

Represents a Bezier curve. Note: as an exception, the bezier curve is not derived from .

Members

controlVertexCount :int

Number of control vertices in this curve
Type:
  • int

dimension :int

Dimension of Bezier
Type:
  • int

isRational :bool

Gets a value indicating whether or not the curve is rational. Rational curves have control-points with custom weights.
Type:
  • bool

isValid :bool

Tests an object to see if it is valid.
Type:
  • bool

Methods

changeDimension() → {bool}

Change dimension of bezier.
Returns:
true if successful. false if desired_dimension < 1
Type
bool

curvatureAt(t) → {Array.<x, y, z>}

Evaluate the curvature vector at a curve parameter.
Parameters:
Name Type Description
t double Evaluation parameter.
Returns:
Curvature vector of the curve at the parameter t.
Type
Array.<x, y, z>

increaseDegree() → {bool}

Increase degree of bezier
Returns:
true if successful. false if desiredDegree < current degree.
Type
bool

makeNonRational() → {bool}

Make bezier non-rational
Returns:
true if successful
Type
bool

makeRational() → {bool}

Make bezier rational
Returns:
true if successful
Type
bool

pointAt(t) → {Array.<x, y, z>}

Evaluates point at a curve parameter.
Parameters:
Name Type Description
t double Evaluation parameter.
Returns:
Point (location of curve at the parameter t).
Type
Array.<x, y, z>

split(t) → {Array}

Divides the Bezier curve at the specified parameter.
Parameters:
Name Type Description
t double parameter must satisfy 0 < t < 1
Returns:
[bool, BezierCurve, BezierCurve]
  • (bool) true on success
Type
Array

tangentAt(t) → {Array.<x, y, z>}

Evaluates the unit tangent vector at a curve parameter.
Parameters:
Name Type Description
t double Evaluation parameter.
Returns:
Unit tangent vector of the curve at the parameter t.
Type
Array.<x, y, z>

ToNurbsCurve() → {NurbsCurve}

Constructs a NURBS curve representation of this curve.
Returns:
NURBS representation of the curve on success, null on failure.
Type
NurbsCurve