SVG: Ellipsenbogen approximieren / Approximate an Elliptical Arc
SVG Ellipsenbogen, der durch ein entsprechendes SVG-Kommando gegeben ist,
mit einer kubischen Kurven nähern.
Abschnitt einer Ellipse A, a:
Anwendung zum Beispiel
M x1, y1 A rx,ry phi fA, fS x2,y2 ...
Parameter:
x1, y1: Verschieben mit M - Anfangspunkt des Ellipsenbogens
x2,y2: Endpunkt des Ellipsenbogens
rx,ry : Radien der Ellipse
phi: Drehung der großen Hauptachse ausgehend von der lokalen
x-Achsen-Richtung
fA: 1 größerer Teilbereich der Ellipse wird gemalt, 0 kleinerer
fS: 1 gemalt wird in positiver Drehrichtung, 0 in negativer
Mit dem GET-Parameter 'anz' kann die Anzahl der Interpolationspunkte angegeben werden, Voreinstellung ist 6.
'rnd' gibt an, auf wieviele Stellen gerundet wird, Voreinstellung ist 2
(Bereich 0 bis 4).
Die anderen Parameter sind ebenfalls verfügbar: xi, yi, ri, phi/Grad im 'tiny'-Bereich -32767.9999 bis +32767.9999.
SVG elliptical arc, given with the related SVG command is approximated with
a cubic curve.
Elliptical arc command A, a:
use case for example
M x1, y1 A rx,ry phi fA, fS x2,y2 ...
Parameters:
x1, y1: move to initial point of the elliptical arc
x2,y2: endpoint of elliptical arc
rx,ry : radii of the ellipse
phi: rotation of the large main axis with respect to the x-axis
fA: 1 large arc flag, 1 for larger part painted, 0 for smaller part
fS: 1 sweep flag for painting direction, 1 positive, 0 negative
With the GET parameter 'anz' the number of interpolation points can be given, default is 6.
'rnd' are the digits to be rounded in the fractional part of numbers in the output, default
is 2 (range 0 to 4).
The other parameters are available too, xi, yi, ri, phi/deg in the 'tiny' range -32767.9999 to +32767.9999.
Komplette Ellipse / Complete Ellipse
Originalpfad / Original Path
Approximierter Pfad / Approximated Path
x-Hauptachsen-Markierung / x-major-axis marker
Ellipsenzentrum / ellipse centre
Anfangspunkt / initial point
Endpunkt / final point
Hauptachsen der Ellipse / major axes of the ellipse
M x1,y1 A rx,ry phi fA,fS x2,y2
Pfadnotation / Path Notation
M237,-584 A-166,171 -735 0,1 190,484
Originalpfad / Original Path
M237 -584 C327.91 -578.41 417.6 -547.88 494.28 -496.44
S
634.42 -372.76 676.33 -289.25
738.46 -111.16 734.36
-17.96
701.83 166.83 652.83 244.75
534.36 386.72 453.58
428.48
280.91 489.59 190 484
Approximierter Pfad / Approximated Path