4 ms·
Look up Raph Levien’s Ph.D thesis about “spiro” curves (a.k.a. cornu or Euler spirals). He not only proposes a pretty neat type of curve to use, which affords s
by jacobolus 11y ago
Look up Raph Levien’s Ph.D thesis about “spiro” curves (a.k.a. cornu or Euler spirals). He not only proposes a pretty neat type of curve to use, which affords some nice UIs, but also does a great job detailing the history of splines, including other types of smooth “minimum energy” curves, IKARUS splines, Hobby splines (used by METAFONT), etc. http://www.levien.com/phd/phd.html http://www.levien.com/phd/phd.html
[I’m somewhat surprised that the Pomax page doesn’t have a section about Hobby splines to go with the section about Catmull-Rom splines. Here’s the Stanford tech report describing them http://i.stanford.edu/pub/cstr/reports/cs/tr/85/1047/CS-TR-85-1047.pdf http://i.stanford.edu/pub/cstr/reports/cs/tr/85/1047/CS-TR-8... ; Apple’s Pages and Keynote programs now can use Hobby splines for making shapes, https://bosker.wordpress.com/2013/11/13/beyond-bezier-curves/ https://bosker.wordpress.com/2013/11/13/beyond-bezier-curves... ; the problem I have with Hobby splines is that there are certain types of shapes that are a real pain to create. As long as you want something very smooth it works pretty well, but whenever the Hobby curve isn’t giving you quite the result you want, tweaking it precisely can become really tricky, and you wish you just had full control over the Bézier arms. It could just be that I don’t have enough practice with them though.]
Another type of curve that is very interesting for some applications is a Pythagorean-hodograph curve. These are curves such that the derivative in the X and Y direction are represented by "Pythagorean" polynomials, i.e. the hypotenuse √(x²+y²) is itself a polynomial. This means that the arclength can be precisely computed in closed form, as can mathematically precise offset curves, which makes them great for defining CAM cut paths.
Lots of CAD software uses b-splines, specifically “NURBS”, as the main curve primitive. Some computer animation software uses subdivision surfaces instead. I’ve never been the biggest fan of UIs for manipulating either one. YMMV.
Personally, I think even for using parametric cubic polynomial segments (i.e. for interoperating 1:1 with systems where the main drawing primitive is a cubic Bézier curve), it works a bit better from a UI perspective to specify the (x, y) locations of on-curve points at t = {0.0, 0.25, 0.75, 1.0} in each segment [these points are the extrema of the Chebyshev polynomial of the appropriate degree] and then convert to Bézier basis by multiplying by the appropriate matrix. I haven’t ever seen anyone try to implement such a UI in production software though, only my own little experimental doodles. (Only downside is that makes it slightly trickier to ensure smoothness at the endpoints in cases where that matters. I think this can be worked around with some extra UI effort.)
- Freak_NL 11y agoFree software vector drawing application Inkscape supports these spiro curves in its UI. It is an option you can select for the curves and lines drawing tool.
- jacobolus 11y agoYeah. Unfortunately I found Inkscape’s support for them kinda hacky and buggy: it’s clearly a bolted-on afterthought rather than a core part of the design. It also doesn’t support the full set of UI ideas from Levien’s thesis. But even so, it’s certainly a nice feature to have. Even with some interaction glitches, it’s still in many cases nicer to use than Bézier curves.
- taejo 11y agoFontForge's support for them is better in this regard, IMO.
- delhanty 11y agoRaph's thesis is a great piece of work. Having said that, it's worth making clear that the use of Euler Spirals in CAD predates his work. (His thesis is clear about this point.) In highway design they are known as clothoids. https://en.wikipedia.org/wiki/Track_transition_curve https://en.wikipedia.org/wiki/Track_transition_curve I worked as a consultant on a Japanese road design system (Sanei's STRAX Road CAD - still being sold it looks), and clothoids were already well established when I started in 1995.
- TheRealPomax 11y agoMy coffee table book "The Physics Book", by Clifford A. Pickover, dates practical applications of the clothoid curve back to at least 1901, when an engineer by the name of Edwin C. Prescott received a patent for their use in rollercoaster designs (after discovering the acceleration problems associated with circular loops some 1~2 years prior).
- 11y ago