How Good Are Your Bezier Curves?
February 23, 2008 – 10:18 amA colleague is trying to expand the subset of SVG that haxe supports. A sticking point is how to approximate SVG’s elliptical arcs with a sequence of quadratic Bezier curves. If you have a flair for numerical methods and would like to offer some help, please get in touch: the pertinent part of the SVG spec is at:
http://www.w3.org/TR/SVG11/paths.html#PathDataEllipticalArcCommands
2 Responses to “How Good Are Your Bezier Curves?”
I wrote some code a long time ago for PIDDLE to approximate a circle with a cubic Bezier curve. Reportlab is the easiest place to get it now:
http://www.reportlab.co.uk/svn/public/reportlab/trunk/reportlab/pdfgen/pdfgeom.py
Then you need to approximate the cubic with a quadratic. Here is a good reference:
http://timotheegroleau.com/Flash/articles/cubic_bezier_in_flash.htm
By Robert Kern on Feb 23, 2008
Maybe you can look at the code of any of the other viewers: http://wiki.svg.org/Viewer_Matrix
good luck,
stelt
http://svg.startpagina.nl (the SVG link resource)
By stelt on Feb 24, 2008