15 Apr 2006 raph   » (Master)


I had a great time in the Netherlands - both working and having fun. A highlight of the trip was meeting great people like Dave Crossland (minimal web presence) and Jeroen Janssen.


There are a number of basic algorithms needed for any serious curve application, including stroke offset, intersection, and conversion to lower-level operations for rendering. The standard representation for curves is, of course, piecewise (cubic) Beziers, and in this representation the implementation of all these basic algorithms is reasonably well understood.

However, these problem can't yet be considered solved in the free software world, because there is a lot of software out there that implements them badly (including FontForge, which I'd really like to see improved), and there isn't a really good library out there that you can just call. Rendering, yes, Beziers make that really simple. Stroke offset and intersection, though, are considered pretty difficult in the Bezier formulation. Offset, in particular, has a well-deserved reputation for being numerically tricky when starting from Beziers. See Comparing Offset Curve Approximation Methods for a pretty good survey of the problem.

I've been spending lots of time with other curve representations, including the clothoid (spiral of Cornu). My main motivation has been to make a better UI for editing curves, but I'm starting to get the sense that they may be better for the under-the-hood tasks as well. While in the Netherlands, I worked out a closed-form equation (in Cesaro form) for offset curves of the Cornu spiral, and am inclined to believe that it's both simpler to code and likely to give better results (speed, robustness, accuracy) than previous methods.

I'm blogging this partly to test the waters for a collaboration. I can see that happening in a few different ways. Maybe there's someone out there who really needs a solution to problems like stroke offset, and is willing to consider a new approach rather than a rehash of existing techniques. Alternatively, there might be a bright student or two who really want to stretch their numerical and computational geometry skills, and want to work with a mentor who's put a lot of thought into the problem. Either way, the result is likely to be a journal paper and a codebase published under a nice free software license.


Dave showed me screenshots and so on from Xara, for which the source code has just been released. I tried building it on Ubuntu Breezy, but ran into just enough make problems to run out of patience. Even so, it looks very interesting. I was getting something of a "too good to be true" vibe from the preannouncements, but now the code is out there, and the people behind it are showing up at free software events like the Libre Graphics Meeting. This project looks like it may well transform the landscape for free 2D graphics tools.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!