|
|
|
|
|
by cousin_it
302 days ago
|
|
I wonder if there's a more intuitive way to define an elliptical arc given 2 endpoints. Dimension analysis shows we need 3 parameters. The SVG spec uses rx/ry/rotation, plus a couple booleans, but maybe there's a better parameterization without booleans? For example, it could be two coordinates of a control point - if the endpoints are A and B and the control point is C, the ellipse would be tangent to AC and BC - and an additional positive number for squishing the ellipse closer or farther from C, with values above 1 making the arc bubble outward. So it would occupy a natural spot between quadratic Bezier (with 2 parameters = 1 control point) and cubic Bezier (4 parameters = 2 control points). |
|
Edit: it looks like the SVG docs include the math for converting to and from this representation,
https://www.w3.org/TR/SVG/implnote.html#ArcConversionEndpoin...