Hypotrochoid

Back to documentation index.

### Hypotrochoid(outerRadius, innerRadius, distFromInnerCenter, [rotationDegrees])

Augments: Curve

A curve evaluator object for a curve drawn by a circle that rolls along the inside of another circle, whose position is fixed, with a center of (0,0).

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

  • Hypocycloid: D = R (hypotrochoid touching the fixed circle).
  • Curtate hypocycloid: D < R (hypotrochoid not touching the fixed circle).
  • Prolate hypocycloid: D > R (hypotrochoid crossing the fixed circle).
  • Circle: O = R\*2; the circle will have radius R - D.
  • Ellipse: O = R\*2; the ellipse (unrotated) will have width abs(R+D)\*2 and height abs(R-D)\*2.
  • Line segment with length O\*2: O = R\*2; D = R.
  • Deltoid: O = R\*3; D = R.
  • Astroid: O = R\*4; D = R.
  • N-pointed hypocycloid: O = R \* N; D = R.
  • </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

    ### Hypotrochoid#arcLength(u)

    Finds an approximate arc length (distance) between the start of this curve and the point at the given U coordinate of this curve.

    Parameters

    Return Value

    The approximate arc length of this curve at the given U coordinate. (Type: Array.<number>)

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

    ### Hypotrochoid#evaluate(u)

    Finds the coordinates of 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 can be other than 0. (Type: Array.<number>)

    ### (static) Hypotrochoid.rose(n, distFromInnerCenter, [rotationDegrees])

    Creates a curve evaluator object for a rose, a special form of hypotrochoid.

    Parameters

    Return Value

    The resulting curve evaluator object. (Type: Hypotrochoid)

    ### Hypotrochoid#scaleTo(radius)

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

    Parameters

    Return Value

    Return value. (Type: Hypotrochoid)

    Back to documentation index.