3 ms·
Am I missing some sort of mathematical simplicity in the elliptical arc specification, because it looks like an absolute mess; surely there must be some mechani
by jameshart 12y ago
Am I missing some sort of mathematical simplicity in the elliptical arc specification, because it looks like an absolute mess; surely there must be some mechanism that allows you to specify an elliptical arc between two points using tangent definitions, bezier-style. As it is, there's a real mess there where rotating the end point around the start point, you have to rotate the elliptical axis in the opposite direction to maintain the same curve.
It looks like its one optimal scenario is in creating a rounded corner, which I guess is the common use case - but the unpredictability of how the curve changes if you move the end points without adjusting the corner radii seems to be a significant downside.
- 1wheel 12y agoThe implementations notes list another potential specification[1]. I'm guessing it was avoided because it wouldn't follow the pattern of ending each command with the new coordinates of the pen. They were definitely considering the rounded corners use case; the details of drawing a rect element with a path[2] make arcs sound much easier to use than they actually are most of the time. [1]http://www.w3.org/TR/SVG/implnote.html#ArcParameterizationAlternatives http://www.w3.org/TR/SVG/implnote.html#ArcParameterizationAl... [2]http://www.w3.org/TR/SVG/shapes.html#RectElement http://www.w3.org/TR/SVG/shapes.html#RectElement
- ygra 12y agoI constantly have to look up the arc syntax in the spec, actually. It also has other shortcomings, e.g. having the same start and end point does not work. To draw a whole ellipse you need two arcs. SVG 2 has it on the roadmap to simplify arcs for manual writing. Not that it's going to be finished soon, though.