[page:Curve] →

[name]

Creates a 2d curve in the shape of an ellipse. Setting the [page:Number xRadius] equal to the [page:Number yRadius] will result in a circle.

Example

var curve = new THREE.EllipseCurve( 0, 0, // ax, aY 10, 10, // xRadius, yRadius 0, 2 * Math.PI, // aStartAngle, aEndAngle false, // aClockwise 0 // aRotation ); var path = new THREE.Path( curve.getPoints( 50 ) ); var geometry = path.createPointsGeometry( 50 ); var material = new THREE.LineBasicMaterial( { color : 0xff0000 } ); // Create the final object to add to the scene var ellipse = new THREE.Line( geometry, material );

Constructor

[name]( [page:Float aX], [page:Float aY], [page:Float xRadius], [page:Float yRadius], [page:Radians aStartAngle], [page:Radians aEndAngle], [page:Boolean aClockwise], [page:Radians aRotation] )

[page:Float aX] – The X center of the ellipse.
[page:Float aY] – The Y center of the ellipse.
[page:Float xRadius] – The radius of the ellipse in the x direction.
[page:Float yRadius] – The radius of the ellipse in the y direction.
[page:Radians aStartAngle] – The start angle of the curve in radians starting from the middle right side.
[page:Radians aEndAngle] – The end angle of the curve in radians starting from the middle right side.
[page:Boolean aClockwise] – Whether the ellipse is drawn clockwise.
[page:Radians aRotation] – The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional). Default is *0*.

Note: When going clockwise it's best to set the start angle to (Math.PI * 2) and then work towards lower numbers.

Properties

See the base [page:Curve] class for common properties.

[property:Float aX]

The X center of the ellipse.

[property:Float aY]

The Y center of the ellipse.

[property:Radians xRadius]

The radius of the ellipse in the x direction.

[property:Radians yRadius]

The radius of the ellipse in the y direction.

[property:Float aStartAngle]

The start angle of the curve in radians starting from the middle right side.

[property:Float aEndAngle]

The end angle of the curve in radians starting from the middle right side.

[property:Boolean aClockwise]

Whether the ellipse is drawn clockwise.

[property:Float aRotation]

The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional). Default is *0*.

[property:Boolean isEllipseCurve]

Used to check whether this or derived classes are ellipses. Default is *true*.

You should not change this, as it used internally for optimisation.

Methods

See the base [page:Curve] class for common methods.

Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]