Optionalx: number | EllipseCurveConfigThe x coordinate of the ellipse, or an Ellipse Curve configuration object. Default 0.
Optionaly: numberThe y coordinate of the ellipse. Default 0.
OptionalxRadius: numberThe horizontal radius of ellipse. Default 0.
OptionalyRadius: numberThe vertical radius of ellipse. Default 0.
OptionalstartAngle: numberThe start angle of the ellipse, in degrees. Default 0.
OptionalendAngle: numberThe end angle of the ellipse, in degrees. Default 360.
Optionalclockwise: booleanWhether the ellipse angles are given as clockwise (true) or counter-clockwise (false). Default false.
Optionalrotation: numberThe rotation of the ellipse, in degrees. Default 0.
For a curve on a Path, false means the Path will ignore this curve.
The rotation of the ellipse, relative to the center, in degrees.
The quantity of arc length divisions within the curve.
An array of cached arc length values.
true if the ellipse rotation is clockwise or false if anti-clockwise.
The default number of divisions within the curve.
The end angle of the ellipse in degrees.
Does the data of this curve need updating?
The center point of the ellipse. Used for calculating rotation.
The rotation of the ellipse, relative to the center, in radians.
The start angle of the ellipse in degrees.
String based identifier for the type of curve.
The x coordinate of the center of the ellipse.
The horizontal radius of the ellipse.
The y coordinate of the center of the ellipse.
The vertical radius of the ellipse.
Draws this curve on the given Graphics object.
The curve is drawn using Graphics.strokePoints so will be drawn at whatever the present Graphics stroke color is.
The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it.
The Graphics instance onto which this curve will be drawn.
OptionalpointsTotal: numberThe resolution of the curve. The higher the value the smoother it will render, at the cost of rendering performance. Default 32.
Returns a Rectangle where the position and dimensions match the bounds of this Curve.
You can control the accuracy of the bounds. The value given is used to work out how many points to plot across the curve. Higher values are more accurate at the cost of calculation speed.
Get total curve arc length
Get a list of cumulative segment lengths.
These lengths are
Optionaldivisions: numberThe number of divisions or segments.
Get a sequence of evenly spaced points from the curve.
You can pass divisions, stepRate, or neither.
The number of divisions will be
divisions, if divisions > 0; orthis.getLength / stepRate, if stepRate > 0; orthis.defaultDivisions1 + divisions points will be returned.
Optionaldivisions: numberThe number of divisions to make.
OptionalstepRate: numberThe curve distance between points, implying divisions.
Optionalout: OAn optional array to store the points in.
Get the resolution of the curve.
Optional divisions value.
Get a sequence of equally spaced points (by arc distance) from the curve.
1 + divisions points will be returned.
Optionaldivisions: numberThe number of divisions to make. Default this.defaultDivisions.
OptionalstepRate: numberStep between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive.
Optionalout: Math.Vector2[]An optional array to store the points in.
Get a unit vector tangent at a relative position on the curve. In case any sub curve does not implement its tangent derivation, 2 points a small delta apart will be used to find its gradient which seems to give a reasonable approximation
The relative position on the curve, [0..1].
Optionalout: OA vector to store the result in.
Given a distance in pixels, get a t to find p.
The distance, in pixels.
Optionaldivisions: numberOptional amount of divisions.
Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant.
A float between 0 and 1.
The distance, in pixels.
Optionaldivisions: numberOptional amount of divisions.
Sets if this curve extends clockwise or anti-clockwise.
The clockwise state of this curve.
Sets the end angle of this curve.
The end angle of this curve, in radians.
Sets the height of this curve.
The height of this curve.
Sets the rotation of this curve.
The rotation of this curve, in radians.
Sets the start angle of this curve.
The start angle of this curve, in radians.
Sets the width of this curve.
The width of this curve.
Sets the horizontal radius of this curve.
The horizontal radius of this curve.
Sets the vertical radius of this curve.
The vertical radius of this curve.
JSON serialization of the curve.
Calculate and cache the arc lengths.
StaticfromCreates a curve from the provided Ellipse Curve Configuration object.
The JSON object containing this curve data.
An Elliptical Curve derived from the Base Curve class.
See https://en.wikipedia.org/wiki/Elliptic_curve for more details.