Epitrochoid

Back to documentation index.

### Epitrochoid(outerRadius, rollerRadius, distFromRollerCenter, [rotationDegrees])

Augments: Curve

A curve evaluator object for a curve drawn by a circle that rolls along the outside of 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>

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

    To use this class, you must include the script “extras/evaluators.js”; the class is not included in the “h3du_min.js” file which makes up the HTML 3D Library. Example:

    <script type="text/javascript" src="extras/evaluators.js"></script>
    

    Parameters

    Methods

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

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

    ### Epitrochoid#scaleTo(radius)

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

    Parameters

    Return Value

    Return value. (Type: Epitrochoid)

    Back to documentation index.