Defines an ellipse in two-dimensional coordinates.

Hierarchy

  • Ellipse2d

Implements

Constructors

Properties

_center: Point2d
height: number

Gets or sets the height of the ellipse.

width: number

Gets or sets the width of the ellipse.

Accessors

  • get eccentricity(): number
  • Gets the linear eccentricity of the ellipse.

    Returns number

Methods

  • Checks if the given point is located inside the ellipse.

    Parameters

    • point: Point2d

      The reference point.

    Returns boolean

    true if the point is inside the ellipse.

  • Checks if the current ellipse intersect with the given shape.

    Parameters

    Returns boolean

    true it the two shapes intersect, otherwise false.

  • Checks if the given point is on one edge of the ellipse.

    Parameters

    • point: Point2d

      The reference point.

    • threshold: number = 0

      A value used as a threshold / range to check if the point is on one edge.

    Returns boolean

  • Rotates the ellipse by the given angle in degree, around a point.

    Parameters

    • angle: number

      The rotation angle.

    • origin: Point2d = ...

      The origin from which the rotation is supposed to be done.

    Returns void

  • Gets the area of an ellipse.

    Parameters

    • semiMajorAxis: number

      The ellipse semi-major axis.

    • semiMinorAxis: number

      The ellipse semi-minor axis.

    Returns number

  • Gets the perimeter of an ellipse.

    Parameters

    • semiMajorAxis: number

      The ellipse semi-major axis.

    • semiMinorAxis: number

      The ellipse semi-minor axis.

    Returns number

Generated using TypeDoc