# Trochoid

Back to documentation index.

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`).

• Cycloid: D = R (trochoid touching the X axis).
• Curtate cycloid: D < R (trochoid not touching the X axis).
• Prolate cycloid: D > R (trochoid crossing the X axis).

This class is considered a supplementary class to the Public Domain HTML 3D Library and is not considered part of that library.

#### Parameters

• `radius` (Type: number)
• `distFromCenter` (Type: number)
Distance from the center of the rolling circle to the drawing pen.

### Methods

• endPoints
Gets the endpoints of this curve.
• evaluate
Generates a point on the curve from the given U coordinate.
• velocity
Finds the velocity (derivative) of this curve at the given point.

### 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>)

### Trochoid#evaluate(u)

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

#### Parameters

• `u` (Type: number)
U coordinate.

#### Return Value

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

### Trochoid#velocity(u)

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

#### Parameters

• `u` (Type: number)
Point on the curve to evaluate.

#### Return Value

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

Back to documentation index.