This constructor creates a new EllipseCurve.
Optional
aX: numberThe X center of the ellipse. Expects a Float
. Default is 0
.
Optional
aY: numberThe Y center of the ellipse. Expects a Float
. Default is 0
.
Optional
xRadius: numberThe radius of the ellipse in the x direction. Expects a Float
. Default is 1
.
Optional
yRadius: numberThe radius of the ellipse in the y direction. Expects a Float
. Default is 1
.
Optional
aStartAngle: numberThe start angle of the curve in radians starting from the positive X axis. Default is 0
.
Optional
aEndAngle: numberThe end angle of the curve in radians starting from the positive X axis. Default is 2 x Math.PI
.
Optional
aClockwise: booleanWhether the ellipse is drawn clockwise. Default is false
.
Optional
aRotation: numberThe rotation angle of the ellipse in radians, counterclockwise from the positive X axis. Default is 0
.
Whether the ellipse is drawn clockwise.
`false``
The end angle of the curve in radians starting from the middle right side.
Expects a Float
2 * Math.PI
The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional).
Expects a Float
0
The start angle of the curve in radians starting from the middle right side.
Expects a Float
0
The X center of the ellipse.
Expects a Float
0
The Y center of the ellipse.
Expects a Float
0
This value determines the amount of divisions when calculating the cumulative segment lengths of a Curve via .getLengths. To ensure precision when using methods like .getSpacedPoints, it is recommended to increase .arcLengthDivisions if the Curve is very large.
200
Expects a Integer
Readonly
isRead-only flag to check if a given object is of type EllipseCurve.
This is a constant value
true
Readonly
typeA Read-only string to check if this
object type.
Sub-classes will update this value.
EllipseCurve
The radius of the ellipse in the x direction.
1
The radius of the ellipse in the y direction.
1
Generates the Frenet Frames
Expects a Integer
Optional
closed: booleanRequires a Curve definition in 3D space Used in geometries like TubeGeometry or ExtrudeGeometry.
Copies another Curve object to this instance.
Get total Curve arc length.
Returns a vector for a given position on the curve.
A position on the curve. Must be in the range [ 0, 1 ]
. Expects a Float
Optional
optionalTarget: Vector2If specified, the result will be copied into this Vector, otherwise a new Vector will be created. Default new T
.
Returns a unit vector tangent at t
A position on the curve. Must be in the range [ 0, 1 ]
. Expects a Float
Optional
optionalTarget: Vector2If specified, the result will be copied into this Vector, otherwise a new Vector will be created.
If the derived Curve does not implement its tangent derivation, two points a small delta apart will be used to find its gradient which seems to give a reasonable approximation.
Given u in the range [ 0, 1 ]
,
Expects a Float
Expects a Float
t
also in the range [ 0, 1 ]
. Expects a Float
.
u
and t
can then be used to give you points which are equidistant from the ends of the curve, using .getPoint.
Creates a 2d curve in the shape of an ellipse
Remarks
Setting the xRadius equal to the yRadius will result in a circle.
Example
See