Create a new elliptic sector from the given ellipse and two angles.
Note that the direction from start to end goes clockwise, and that start and end angle will be wrapped to [0,PI*2).
The start angle of the sector.
The end angle of the sector.
Required to generate proper CSS classes and other class related IDs.
The UID of this drawable object.
This function should invalidate any installed listeners and invalidate this object. After calling this function the object might not hold valid data any more and should not be used.
Convert this elliptic sector into cubic Bézier curves.
The number of segments per base elliptic quarter (default is 3, min is 1).
The Bézier threshold (default value 0.666666 approximates the ellipse with best results but you might wish to use other values)
An array of cubic Bézier curves representing the elliptic sector.
Helper function to convert an elliptic section to SVG arc params (for the d
attribute).
Inspiration found at:
https://stackoverflow.com/questions/5736398/how-to-calculate-the-svg-path-for-an-arc-of-a-circle
Convert the elliptic arc from endpoint parameters to center parameters as described in the w3c svg arc implementation note.
https://www.w3.org/TR/SVG/implnote.html#ArcConversionEndpointToCenter
The x component of the start point (end of last SVG command).
The y component of the start point (end of last SVG command).
The first (horizontal) radius of the ellipse.
The second (vertical) radius of the ellipse.
The ellipse's rotational angle (angle of axis rotation) in radians (not in degrees as the SVG command uses!)
The large-arc-flag (boolean, not 0 or 1).
The sweep-flag (boolean, not 0 or 1).
The x component of the end point (end of last SVG command).
The y component of the end point (end of last SVG command).
Helper function to find second-kind elliptic angles, so that the euclidean distance along the the elliptic sector is the same for all.
Note that this is based on the full ellipse calculuation and start and end will be cropped; so the distance from the start angle to the first angle and/or the distance from the last angle to the end angle may be different to the others.
Furthermore the computation is only possible on un-rotated ellipses; if your source ellipse has a rotation on the plane please 'rotate' the result angles afterwards to find matching angles.
Returned angles are normalized to the interval [ 0, PI*2 ]
.
The first (horizonal) radius of the ellipse.
The second (vertical) radius of the ellipse.
The opening angle of your elliptic sector (please use normalized angles).
The closing angle of your elliptic sector (please use normalized angles).
The number of base segments to use from the source ellipse (12 or 16 are good numbers).
An array of n angles inside startAngle and endAngle (where n <= fullEllipsePointCount).
Generated using TypeDoc
A class for elliptic sectors.
Line
Vector
VertTuple
Vertex
SVGSerializale
UID
UIDGenerator