Curvature Beziers
The bezier curve remains a popular choice in computer-aided design and graphics software, despite its simplicity. Invented by Paul de Casteljau in 1959 and further developed by Pierre Bézier, these curves represent a piece of legacy technology that continues to be widely used. Drawing a bezier curve involves connecting control points with lines and running along those lines to produce new points, which can then be connected to form the curve.
This linear process involves a series of linear interpolations, which can be summarized into a single compact formula using powers of (1 - t) and t, with coefficients derived from Pascal's triangle. The most common practice involves using cubic beziers with four control points, as the curve is guaranteed to cross through the first and last control points.
These curves can be split exactly, with the left and right segments being identical to the original curve and joining perfectly at the seam. This demonstrates that bezier curves can be manipulated without introducing asymmetry, even when adjusting tangents. In an attempt to improve the editing experience for bezier curves, one approach is to treat tangents as relative rather than absolute, making them proportional to the distance between the start and end of each segment.
This results in a more flexible editing process where adjacent segments naturally flex to accommodate changes. However, scaling tangents proportionally does not guarantee that curvature is preserved, nor does it maintain continuity from one segment to the next. Another approach is to work directly with curvature, as certain relationships can be observed that allow for the preservation of curvature when editing bezier curves.
By scaling tangents appropriately when moving curve points and ensuring that the curvature on the opposite end of the current segment is preserved, it becomes possible to produce an editing experience that respects the user's intent.
Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.