5

I have begun experimenting with Inkscape's "spiro" mode for curves. Since I usually end up writing Python to create art that Inkscape just doesn't have the tools to accomplish, I'm curious what the math behind the "spiro" curves is.

What formulas does Inkscape use to choose the Bézier handle points for Spiro paths?

5
  • 8
    Spiros are the result of Raph Levien’s PhD thesis, which devotes an entire chapter to conversion to Bézier curves. I may summarise the respective parts in an answer if I find the time, but I won’t be angry, if anybody does so before me.
    – Wrzlprmft
    Commented Aug 11, 2016 at 15:12
  • 3
    By the way as a question this is better suited for computergraphics.SE
    – joojaa
    Commented Aug 11, 2016 at 19:45
  • I've been trying to get a grip on the PhD thesis. One thing that has not yet become clear is how inkscape constrains the curves that travel through multiple points. My first guess would be that it constrains the curvature to be continuous, but I can not yet rule out additional constraints.
    – Mutant Bob
    Commented Aug 12, 2016 at 16:01
  • What's wrong with proper quote marks?
    – Cai
    Commented Aug 13, 2016 at 16:49
  • It might be that inkscape is using Levien's spiro library (C and Java versions available) libspiro.sourceforge.net
    – Mutant Bob
    Commented Aug 18, 2016 at 21:41

1 Answer 1

-1

The spiro path is costructed from Euler spiral segments, also known as clothoids, or spiros. Their identifying property is a linear change in curvature along their length.

The handles in Inkscape are (needlessly) ignored for spiro paths, and - instead using them as tangents - the smoothest path that goes through all the nodes is calculated and used. You can position the handles any way you like, but nothing about the curve will change.

Not the answer you're looking for? Browse other questions tagged or ask your own question.