The Beauty of Bézier Curves (2021) [video]
I spent a couple days around the new year fiddling with my &quot;hyperbezier&quot; idea, which is a project to make a curve family better suited to creative graphics (including font design) than Béziers. I have been interested in this a long time; my thesis was also motivated by this goal. I now have two drafts, neither of which is quite right; they have complementary strengths and weaknesses. In grappling with the difficulty of this project, and other work I&#x27;ve done over the years, I have come to appreciate both the beauty and the downsides of Béziers. I haven&#x27;t had a chance to write down my latest thoughts, so will hijack this thread.<p>The greatest strength of a cubic Bézier is it ability to accurately model a huge variety of curve shapes, while still having a parameter space that can be successfully navigated by humans. Higher degree Béziers, as well as other curve families with a bunch of tunable knobs, fail that latter test. I have recently come to the conclusion that the ideal number of parameters for a curve family used for interactive design is 4 (using the counting scheme proposed by my thesis), whether the underlying curve is a Bézier, some form of spiral, or something else. A 4-parameter curve family that is not otherwise broken will have O(n^6) scaling, meaning that a subdivision in half will allow it to fit a more or less arbitrary source curve 64 times more accurately. Subdividing by 3 makes it 729 times more accurate, and 4 gives 4096. Thus, you can draw any curve you can imagine with a very small number of cubic Bézier segments.<p>A 2 parameter curve family by contrast has only O(n^4) scaling. A quadratic Bézier has other limitations, specifically that it cannot represent an inflection, thus an inflection point <i>must</i> be represented as the join of two convex curves and thus a curvature discontinuity. (Euler spirals are a 2 parameter curve that can represent inflections but have other limitations)<p>It&#x27;s not just the scaling, Béziers are also capable of representing varying degrees of <i>tension,</i> a property not shared by Euler spirals and related curves. I use the word &quot;tension&quot; to refer to curves that have regions of high relative curvature, as you would observe in a thin flexible strip (elastica) under tension. A Bézier can represent arbitrarily high tension, all the way up to a cusp of infinite curvature (at which point it becomes a semicubical parabola).<p>Other strengths include being closed under subdivision and affine transformation.<p>The math for Béziers is simple in some ways (evaluating the position and derivative are nearly trivial) but tricky in others. Arc length is tractable but not trivial (as explained in the segment of the video starting at 14:14). Offset curves are quite difficult, as is the general problem of curve fitting. Computing intersection between Bézier curves is also hard. However, the beauty and flexibility of the curve family makes the solution to these problems worthwhile.<p>Now for the criticism. People find Bézier curves hard to learn, and amateurs find it difficult to make smooth curves (particularly shapes like &quot;S&quot; in a font). I have recent mathematical insight that sheds light on both these intuitive observations.<p>The &quot;lumpiness&quot; stems from the tendency of Béziers to have curvature extrema <i>near</i> but not <i>at</i> the endpoint. Curvature extrema are very perceptually relevant, so not having them at endpoints is a problem. A really good way to quantify this property mathematically is to compute an optimum curve fit to, say, a sine wave[1]. It doesn&#x27;t subdivide at the peaks and troughs, but rather at points near those curvature extrema.<p>Another mathematical property that suggests there&#x27;s something weird going on with the parameter space is the presence of &quot;triplets,&quot; sets of three Bézier curves that have very different control points but visually identical shapes. Mathematically, this is captured by the fact that solving for Bézier parameters for given endpoint tangents, area, and x-moment is a quartic equation. (The fourth solution matches these quantities but has a loop so is a very different curve). This in turn implies the likelihood of finding a local minimum, perhaps missing a better global solution - both for automated curve fitting processes and human designers tweaking curves to make them more visually appealing.<p>In sum, after many years with both Bézier curves and alternatives, I wholeheartedly agree with Freya&#x27;s conclusion (at 19:13): Bézier curves are sometimes a little messy, but with the simplicity of their construction and the flexibility of their uses, I think they&#x27;re beautiful, despite their flaws.<p>[1]: <a href="https:&#x2F;&#x2F;xi.zulipchat.com&#x2F;#narrow&#x2F;stream&#x2F;260979-kurbo&#x2F;topic&#x2F;Fitting.20cubic.20B.C3.A9zier.20curves&#x2F;near&#x2F;319320572" rel="nofollow">https:&#x2F;&#x2F;xi.zulipchat.com&#x2F;#narrow&#x2F;stream&#x2F;260979-kurbo&#x2F;topic&#x2F;F...</a>