ParametricPath that represents a cardiod, which is a vaguely heart shaped figure. Currently set to not be a closed curve, with end points at the point (at the origin) where the derivative is discontinuous. The discontinuous derivative causes problems with RigidBody physics engine.

Cardioid equation:

r = a (1 - cos theta)
x = a cos t (1 + cos t)
y = a sin t (1 + cos t)

or interchange x-y to rotate by 90 degrees.

Hierarchy (view full)

Implements

Constructors

Methods

  • Name of this object, either the language-independent name for scripting purposes or the localized name for display to user.

    The language-independent name should be the same as the English version but capitalized and with spaces and dashes replaced by underscore, see Util.toName and nameEquals.

    Parameters

    • Optional opt_localized: boolean

      true means return the localized version of the name; default is false which means return the language independent name.

    Returns string

    name of this object

  • Whether this ParametricPath has the given name, adjusting for the transformation to a language-independent form of the name, as is done by Util.toName.

    Parameters

    • name: string

      the English or language-independent version of the name

    Returns boolean

    whether this ParametricPath has the given name (adjusted to language-independent form)

  • Returns the x value for the given value of t in the parametric equation.

    Parameters

    • t: number

      the value of t in the parametric equation

    Returns number

    the x value for the given value of t

  • Returns the y value for the given value of t in the parametric equation.

    Parameters

    • t: number

      the value of t in the parametric equation

    Returns number

    the y value for the given value of t

Generated using TypeDoc