Home > Uncategorized > How Good Are Your Bezier Curves?

How Good Are Your Bezier Curves?

February 23rd, 2008

A 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

Uncategorized

  1. Robert Kern
    February 23rd, 2008 at 17:38 | #1

    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

  2. February 24th, 2008 at 13:12 | #2

    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)

Comments are closed.