Has anyone seen a decent drawing algorithm for cornu spirals (aka, clothoids) or splines? For arcs and lines we have things like Bresenham’s algorithm. Is that adaptable to clothoids?
The Wikipedia page has this Sage code:
p = integral(taylor(cos(L^2), L, 0, 12), L)
q = integral(taylor(sin(L^2), L, 0, 12), L)
r1 = parametric_plot([p, q], (L, 0, 1), color = 'red')
Is there any example code for parametric plots available? I’m not seeing much with my web searches.
I didn’t see any existing high-speed algorithm for this. However, I did come to understand the common method for drawing things like this. Essentially, you recursively split the L until the left, mid, and right points calculated are close enough to a straight line that you can draw that line. I was able to use the MathNet.Numerics.dll for the integration. Some code: