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.
VEllipseSector
Readonly
classRequired to generate proper CSS classes and other class related IDs.
VEllipseSector
VEllipseSector
isDestroyed
VEllipseSector
VEllipseSector
Readonly
uidThe UID of this drawable object.
VEllipseSector
Static
ellipseHelper 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
[ 'A', radiusH, radiusV, rotation, largeArcFlag=1|0, sweepFlag=0, endx, endy ]
Optional
rotation: numberOptional
options: { If false (default=true) the initial 'Move' command will not be used.
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 ]
.
An array of n angles inside startAngle and endAngle (where n <= fullEllipsePointCount).
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).
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).
Convert this elliptic sector into cubic Bézier curves.
Optional
quarterSegmentCount: numberThe number of segments per base elliptic quarter (default is 3, min is 1).
Optional
threshold: numberThe 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.
Classdesc
A class for elliptic sectors.
Requires
Line
Requires
Vector
Requires
VertTuple
Requires
Vertex
Requires
SVGSerializale
Requires
UID
Requires
UIDGenerator