Ellipse

dwv.math. Ellipse

new Ellipse(centre, a, b)

Source:

Ellipse shape.

Parameters:
Name Type Description
centre dwv.math.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.

Methods

equals(rhs) → {boolean}

Source:

Check for equality.

Parameters:
Name Type Description
rhs dwv.math.Ellipse

The object to compare to.

Returns:

True if both objects are equal.

Type
boolean

getA() → {number}

Source:

Get the radius of the ellipse on the horizontal axe.

Returns:

The radius of the ellipse on the horizontal axe.

Type
number

getB() → {number}

Source:

Get the radius of the ellipse on the vertical axe.

Returns:

The radius of the ellipse on the vertical axe.

Type
number

getCenter() → {dwv.math.Point2D}

Source:

Get the centre (point) of the ellipse.

Returns:

The center (point) of the ellipse.

Type
dwv.math.Point2D

getRound() → {Array}

Source:

Get the rounded limits of the ellipse. (see https://en.wikipedia.org/wiki/Ellipse#Standard_equation) Ellipse formula: xx / aa + yy / bb = 1 => y = (+-)(b/a) * sqrt(aa - xx)

Returns:

The rounded limits.

Type
Array

getSurface() → {number}

Source:

Get the surface of the ellipse.

Returns:

The surface of the ellipse.

Type
number

getWorldSurface(spacingX, spacingY) → {number}

Source:

Get the surface of the ellipse according to a spacing.

Parameters:
Name Type Description
spacingX number

The X spacing.

spacingY number

The Y spacing.

Returns:

The surface of the ellipse multiplied by the given spacing or null for null spacings.

Type
number

quantify(viewController, flags) → {object}

Source:

Quantify an ellipse according to view information.

Parameters:
Name Type Description
viewController dwv.ctrl.ViewController

The associated view controller.

flags Array

A list of stat values to calculate.

Returns:

A quantification object.

Type
object