Hacker News new | ask | show | jobs
by mimixco 1951 days ago
Thank you for this! I had never heard of these and I hate Bezier curves. I can never figure out how to manipulate them. The history in this Wikipedia article is fascinating, too, and how "splines" came to be from wood models. https://en.wikipedia.org/wiki/Non-uniform_rational_B-spline
1 comments

Within Bézier, there’s cubic (postscript, Adobe type 1) and quadratic (TrueType, Apple’s long dead QuickDraw GX). I think the relation between control points and curve shapes is easier to understand for quadratic ones (and, of course, still easier for linear Bézier curves, aka “line segments”)

For fonts, I think we still live in a mixed world that’s very slowly moving towards TrueType. For 2D graphics, PDF with its cubic Bézier curves has a bit of an edge. Overall, I don’t see a clear winner.

Because of that, some graphics APIs support both. https://developer.apple.com/documentation/coregraphics/cgmut..., for example, has addCurve to add a cubic, and addQuadCurve to add a quadratic Bézier curve to a path.

https://docs.microsoft.com/en-us/dotnet/api/system.drawing.g... only does cubic Bézier curves, I think, but https://docs.microsoft.com/en-us/dotnet/api/system.drawing.g... supports TrueType fonts, so the code can draw quadratic Bézier curves.