# Ellipse

Kind of class: class BaseShape < CoreObject 08/02/07 Aaron Clinger org.casalib.math.geom.Ellipse Monday, 01 December 2008, 13:34:40
Stores position and size of an ellipse (circle or oval).

## Summary

Constructor
• Ellipse (x:Number, y:Number, width:Number, height:Number)
• Creates new ellipse object.
Instance methods
Instance methods inherited from BaseShape
Instance methods inherited from CoreObject

## Constructor

### Ellipse

function Ellipse (
x:Number, y:Number, width:Number, height:Number)

Creates new ellipse object.
Parameters:
x :
The horizontal position of the ellipse.
y :
The vertical position of the ellipse.
width :
Width of the ellipse at its widest horizontal point.
height:
[optional] Height of the ellipse at its tallest point. If `undefined` assumes `height` matches `width` (Creates circle).

## Instance methods

### clone

function clone (

Returns:
• A new ellipse object with the same values as this ellipse.

### containsPoint

function containsPoint (
pointObject:Point) : Boolean

### destroy

function destroy (
) : Void

Overrides:

### equals

function equals (
ellipseObject:Ellipse) : Boolean

Determines whether the ellipse specified in the `ellipseObject` parameter is equal to this ellipse object.
Parameters:
rectangleObject:
A defined Ellipse object.

### getArea

function getArea (
) : Number

Overrides:

### getPerimeter

function getPerimeter (
) : Number

Usage note:
• Calculating the circumference of an ellipse is difficult; this is an approximation but should be fine for most cases.

### getPointOfDegree

function getPointOfDegree (
degree:Number) : Point

Finds the `x, y` position of the degree along the circumference of the ellipse.
Parameters:
degree:
Number representing a degree on the ellipse.
Returns:
• A defined Point object.
Usage note:
• `degree` can be over `360` or even negitive numbers; minding `0 = 360 = 720`, `540 = 180`, `-90 = 270`, etc...