module:extras/evaluators.Trochoid

Back to documentation index.

new module:extras/evaluators.Trochoid(radius, distFromCenter)

Augments: Curve

A curve evaluator object for a curve drawn by a circle that rolls along the X axis.

The following curves can be generated with this class (in the following descriptions, R = radius and D = distFromCenter).

Parameters

Methods

module:extras/evaluators~Trochoid#endPoints()

Gets the endpoints of this curve. For this curve evaluator object, the curve starts at 0 and ends at π*2.

Return Value

An array containing the two endpoints of the curve. The first number is the start of the curve, and the second number is the end of the curve. (Type: Array.<number>)

module:extras/evaluators~Trochoid#evaluate(u)

Generates a point on the curve from the given U coordinate.

Parameters

Return Value

A 3-element array specifying a 3D point. Only the X and Y coordinates will be other than 0. (Type: Array.<number>)

module:extras/evaluators~Trochoid#velocity(u)

Finds the velocity (derivative) of this curve at the given point.

Parameters

Return Value

An array giving the velocity vector. (Type: Array.<number>)

Back to documentation index.