module:extras/evaluators.Epitrochoid

Back to documentation index.

### new module:extras/evaluators.Epitrochoid(outerRadius, rollerRadius, distFromRollerCenter, [rotationDegrees])

Augments: Curve

A curve evaluator object for a curve drawn by a circle that rolls along the outside another circle, whose position is fixed, with a center of (0,0). The rolling circle will start at the positive x-axis of the fixed circle.

The following curves can be generated with this class (in the following descriptions, O = outerRadius, R means rollerRadius, and D = distFromRollerCenter).<ul>

  • Epicycloid: D = R (epitrochoid touching the fixed circle).
  • Curtate epicycloid: D < R (epitrochoid not touching the fixed circle).
  • Prolate epicycloid: D > R (epitrochoid crossing the fixed circle).
  • Cardioid: R = O; D = O.
  • Nephroid: R = O/2; D = O/2.
  • Ranunculoid: R = O/5; D = O/5.
  • N-cusped epicycloid: R = O/N; D = O/N.
  • Circle: O = 0; the radius will be R - D.
  • </ul>

    Parameters

    Methods

    ### module:extras/evaluators~Epitrochoid#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~Epitrochoid#evaluate(u)

    Generates a point on the curve from the specified 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~Epitrochoid#scaleTo(radius)

    Creates a modified version of this curve so that it fits the specified radius.

    Parameters

    Return Value

    Return value. (Type: Epitrochoid)

    Back to documentation index.