Constructor
new Ellipse(centre, a, b)
Name | Type | Description |
---|---|---|
centre | Point2D | A Point2D representing the centre of the ellipse. |
a | number | The radius of the ellipse on the horizontal axe. |
b | number | The radius of the ellipse on the vertical axe. |
- Source
Classes
Methods
equals(rhs) → {boolean}
Check for equality.
Name | Type | Description |
---|---|---|
rhs | Ellipse | The object to compare to. |
- Source
True if both objects are equal.
- Type:
- boolean
getA() → {number}
Get the radius of the ellipse on the horizontal axe.
- Source
The radius of the ellipse on the horizontal axe.
- Type:
- number
getB() → {number}
Get the radius of the ellipse on the vertical axe.
- Source
The radius of the ellipse on the vertical axe.
- Type:
- number
getCenter() → {Point2D}
Get the centre (point) of the ellipse.
- Source
The center (point) of the ellipse.
- Type:
- Point2D
getCentroid() → {Point2D}
Get the centroid of the ellipse.
- Source
The centroid point.
- Type:
- Point2D
getRound() → {Array.<Array.<Array.<number>>>}
Get the rounded limits of the ellipse.
See: https://en.wikipedia.org/wiki/Ellipse#Standard_equation.
Ellipse formula: x*x / a*a + y*y / b*b = 1
.
Implies: y = (+-)(b/a) * sqrt(a*a - x*x)
.
- Source
The rounded limits: list of [x, y] pairs (min, max).
- Type:
- Array.<Array.<Array.<number>>>
getSurface() → {number}
Get the surface of the ellipse.
- Source
The surface of the ellipse.
- Type:
- number
getWorldSurface(spacing2D) → {number}
Get the surface of the ellipse according to a spacing.
Name | Type | Description |
---|---|---|
spacing2D | Scalar2D | The 2D spacing. |
- Source
The surface of the ellipse multiplied by the given spacing or null for null spacings.
- Type:
- number
quantify(viewController, flags) → {object}
Quantify an ellipse according to view information.
Name | Type | Description |
---|---|---|
viewController | ViewController | The associated view controller. |
flags | Array.<string> | A list of stat values to calculate. |
- Source
A quantification object.
- Type:
- object