[reactive] crayon - a 2D opengl curve renderer, with Reactive
jules at jellybean.co.uk
Thu Mar 26 10:39:52 EDT 2009
Peter Verswyvelen wrote:
> Excellent work! I have been looking into curve rendering myself lately,
> and found some links that you might find interesting (besides the
> Loop/Blinn article Bob already forwarded to you)
Hey! I showed that article to Bob, not the other way around. Mind you,
he was already aware of the technique, of course.
> Maxim Shemanarev, the author of the open source anti-grain 2D rendering
> engine, seems to have tackled the curve stroking (dealing with cusps
> etc) pragmatically: <http://www.antigrain.com/mcseem/index.html>
That looks very interesting.
> I also came across a kind of curve that I didn't know about yet,
> named "Pythagorean hodograph curves
> <http://www.research.ibm.com/journal/rd/345/ibmrd3405J.pdf> ". These are
> subsets of Bezier polynomials for which arclength is expressible as a
> polynomial, and for which offset curves (aka parallel curves) are
> rational polynomials again (for regular curves arclength and offsets
> must be approximated numerically). Offset curves could be used to avoid
> generating all those line segments to stroke a curve, even rendering
> them directly on the GPU, but I haven't found a fast way for doing this.
> There's even a full book about PH curves from his inventor:
> Personally I'm trying to do stroking by approximating cubic Bezier
> curves and their offset curves with simple quadratic polynomial curves,
> performing Delaunay triangulation, converting the quadratic curve
> segments to implicit form, and directly rendering the triangles that
> form the control points of the quadratics on the GPU. This is more for
> fun since it is most likely more computationally expensive than just
> doing very fine subdivision and rendering stroked line segments
> (although the implicits on the GPU is fully resolution independent of
I'm concerned about the cost of repeated triangulation; I'm trying to
find an algorithm fast enough for realtime animation (where the control
points may move every frame). Mind you some kind of repeated calculation
can't be avoided - it's interesting to consider algorithms which can
reduce the work for 'small perturbation' (e.g. where the topology hasn't
changed) but it's not obvious how to make that efficient.
Loop-Blinn is obvious a good way to go for a fixed vector input (e.g. a
font) which can be preprocessed.
More information about the Reactive