<div class="gmail_quote">On Thu, Mar 26, 2009 at 3:39 PM, Jules Bean <span dir="ltr">&lt;<a href="mailto:jules@jellybean.co.uk">jules@jellybean.co.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Peter Verswyvelen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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)<br>
</blockquote>
</div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Hey! I showed that article to Bob, not the other way around. Mind you, he was already aware of the technique, of course.</div>
</blockquote><div>Oh, I also told Bob about that article, which is published in GPU GEMS 3. I must have misunderstood. It is of course a very famous article ( but the technique is patented :| )</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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: &lt;<a href="http://www.antigrain.com/mcseem/index.html" target="_blank">http://www.antigrain.com/mcseem/index.html</a>&gt;<div class="im">
<br>
  &lt;<a href="http://www.antigrain.com/mcseem/index.html" target="_blank">http://www.antigrain.com/mcseem/index.html</a>&gt;<br>
</div><div class="im"><a href="http://www.antigrain.com/research/adaptive_bezier/index.html#PAGE_ADAPTIVE_BEZIER" target="_blank">http://www.antigrain.com/research/adaptive_bezier/index.html#PAGE_ADAPTIVE_BEZIER</a><br>
</div></blockquote>
<br>
That looks very interesting.</blockquote><div><br></div><div>Yes, I think  what Maxim accomplished is insane.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I also came across a kind of curve that I didn&#39;t know about yet, named &quot;Pythagorean hodograph curves &lt;<a href="http://www.research.ibm.com/journal/rd/345/ibmrd3405J.pdf" target="_blank">http://www.research.ibm.com/journal/rd/345/ibmrd3405J.pdf</a>&gt; &quot;. 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&#39;t found a fast way for doing this. There&#39;s even a full book about PH curves from his inventor: <a href="http://www.amazon.com/Pythagorean-Hodograph-Curves-Geometry-Inseparable-Computing/dp/3540733973" target="_blank">http://www.amazon.com/Pythagorean-Hodograph-Curves-Geometry-Inseparable-Computing/dp/3540733973</a><div class="im">
<br>
<br>
Personally I&#39;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 course)<br>

</div></blockquote>
<br>
I&#39;m concerned about the cost of repeated triangulation; I&#39;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&#39;t be avoided - it&#39;s interesting to consider algorithms which can reduce the work for &#39;small perturbation&#39; (e.g. where the topology hasn&#39;t changed) but it&#39;s not obvious how to make that efficient.<br>

<br>
Loop-Blinn is obvious a good way to go for a fixed vector input (e.g. a font) which can be preprocessed.</blockquote><div><br></div><div>Yep indeed. Only solves halve of the &quot;animated stroked curves&quot; problem</div>
<div><br></div></div>