dwv.math. Ellipse

new Ellipse(centre, a, b)

Ellipse shape.

Parameters:
NameTypeDescription
centredwv.math.Point2D

A Point2D representing the centre of the ellipse.

anumber

The radius of the ellipse on the horizontal axe.

bnumber

The radius of the ellipse on the vertical axe.

Methods

equals(rhs) → {boolean}

Check for equality.

Parameters:
NameTypeDescription
rhsdwv.math.Ellipse

The object to compare to.

Returns:

True if both objects are equal.

Type: 
boolean

getA() → {number}

Get the radius of the ellipse on the horizontal axe.

Returns:

The radius of the ellipse on the horizontal axe.

Type: 
number

getB() → {number}

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}

Get the centre (point) of the ellipse.

Returns:

The center (point) of the ellipse.

Type: 
dwv.math.Point2D

getRound() → {Array}

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}

Get the surface of the ellipse.

Returns:

The surface of the ellipse.

Type: 
number

getWorldSurface(spacingX, spacingY) → {number}

Get the surface of the ellipse according to a spacing.

Parameters:
NameTypeDescription
spacingXnumber

The X spacing.

spacingYnumber

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}

Quantify an ellipse according to view information.

Parameters:
NameTypeDescription
viewControllerdwv.ctrl.ViewController

The associated view controller.

flagsArray

A list of stat values to calculate.

Returns:

A quantification object.

Type: 
object