出典:Hacker News原文を見る ↗
原文の著作権は出典元に帰属します。当サイトでは収録、翻訳、体裁調整のみを行います。
事実関係
本文由 Linebender 发布,作者为 raphlinus(Raph Levien),在 Hacker News 上获得 33 分与 1 条评论。
文章主题为 hyperbezier 曲线的数学特性。Linebender 是一个专注于高性能 2D 图形渲染的开源项目团队,其代表性工作包括 GPU 渲染引擎 Vello 与文本排版引擎。hyperbezier 是该团队提出的一种曲线表示方法,用于替代或补充传统贝塞尔曲线在矢量图形中的应用。
原文标题强调其「数学之美」,围绕该曲线形式的数学构造展开。具体的参数定义、阶数与性能数据在所提供的素材中未展开说明。
解説と影響
这篇博客的发布者 raphlinus 是图形渲染领域的资深工程师,此前在 Google 从事字体与文本渲染工作,其技术判断在 Hacker News 社区具有较高可信度。Linebender 团队近年持续探索用更高效的曲线表示来驱动 GPU 渲染管线,hyperbezier 正是这一方向上的尝试。
从工程角度看,传统三次贝塞尔曲线虽然通用,但在精确表示圆弧、椭圆弧以及字体轮廓时存在逼近误差,且求交、求弧长等操作计算成本较高。若 hyperbezier 能在保持表达力的同时简化这些几何运算,将直接影响矢量渲染的性能与精度,尤其对 Vello 这类面向 GPU 的渲染器具有实用价值。
不过,当前素材仅提供了博客标题与发布信息,未包含曲线定义、性能对比或基准测试等具体内容,因此本文的产业影响尚难以量化评估。相关素材中的其他条目(太阳能电厂、Mac 漏洞、电动飞机等)与本主题无关,不构成可引用的背景。
不確実性と限界
参考資料
出典原文
The mathematical beauty of hyperbezier curves
Raph Levien, August 8, 2026
I have for many decades been fascinated by the prospect of a curve family better suited for interactive design than cubic Béziers. In that search, I have come to a new-found respect for those Béziers. In particular, though other curves like Euler spirals are better at representing smooth curves, they fall short at representing regions large curvature variation, where cubic Béziers excel. The great strength of Béziers is their versatility.
So, to find a strictly better curve family, one requirement is clear: the family should contain both smooth curvature variation and higher-tension regions where curvature peaks. Polynomial spirals, or Spiro curves, the subject of my PhD thesis, fail to achieve this goal.
After considerable search and rejecting a number of candidates, I now bring a proposal for a curve family which I think is a very strong candidate for supplanting cubic Béziers in 2D vector graphic design.
Without further ado, the curve family is represented by the Cesàro equation, specifying curvature as a function of arc length:
This curve behaves surprisingly similarly to a cubic Bézier, especially at smaller angles, but when pushed has very different behavior. Overall it has smoother curvature variation and is more likely to have monotonic curvature. It contains within it a few valuable analytic curves, and is also good at approximating a wide range of others. The remainder of this blog post is devoted to showing its behavior in a wide range of contexts.
Approximation of cubic Béziers
The hyperbezier closely approximates cubic Béziers at low deflection angles at the endpoints. I will show rather than try to present mathematic reasoning. Below is an interactive tester that maps cubic Bézier control points to a corresponding hyperbezier. The Bézier is shown in gray for comparison.
options
cubic Bézier curvature comb
-->
At larger angles, and also when the "arm lengths" of the control handles get larger, the fit with the cubic Bézier is not particularly close, but the control scheme is still a useful way of setting the parameters for the hyperbezier curve (setting the polynomial coefficients directly is not at all intuitive).
Note that this parameter mapping is a first usable draft, and may not be the final version. That said, in an interactive editing context, a perfect mapping is not required, as it's always possible to tweak the control points to reach any desired curve shape.
The details of the mapping can be found in the JavaScript source for this page, but the basic principle is that the arm lengths set the denominator, then the numerator is solved to make the endpoint tangents match.
Exact analytical curves
The most obvious analytical curve contained in the family is the Euler spiral, which is clearly attained when . The Euler spiral has smooth curvature variation (it is a solution to the Minimum Variation Curve problem) and monotonic curvature. An exact circular arc is also within the parameter space, simply when as well. Cubic Béziers, by comparison, only approximate circular arcs.
There a few other log-aesthetic curves lurking in the parameter space, meaning curvature is simply the arclength raised to a particular power. Reachable exponents include -3, -2, -1.5, and -0.5 (alternatively, using the convention from the log-aesthetic papers, α can be 1/3, 1/2, 2/3, and 2). The last of these is the circle involute, which is interesting because it is its own parallel curve, among other things. And the first of these is the evolute of the Euler spiral.
图片 The parameter mapping described above is designed so that when the control points lie on the "double parabola" in my Euler spiral parallel curve blog post, then the result is an exact Euler spiral.
Superellipses and squircles
A cubic Bézier can do superellipses up to a certain point, but does not approach a sharp corner; somewhere before then it starts developing additional inflection points, while a true superellipse or squircle is of course convex.
The hyperbezier can go all the way to a sharp corner, and visually looks pretty close to the superellipse. It's not incredibly accurate (for moderate exponents like 5, the best cubic Bézier fit is slightly better, in fact), but visually does the right thing. It's probably best to say that the hyperbezier is a subtly different squircle than the superellipse, neither better nor worse.
图片
Hyperbola
Another fundamental curve is the hyperbola. It is round at the turn, but curvature tails off and the curve reaches a linear asymptote on both sides. Cubic Béziers do not fit this curve well, and do not exhibit that asymptotic behavior. But the hyperbezier fits it naturally and with very high accuracy.
图片 We can also appreciate the relationship mathematically. In both, the curvature tails off as asymptotically. In addition, using the small angle approximation , integrating the Whewell equation (see below) of the even-symmetric hyperbezier yields the hyperbola exactly. This close relationship is one of the inspirations of the name; it is something of a fusion between a hyperbola and a Bézier. Another inspiration, incidentally, is that the log-aesthetic solutions, including the Euler spiral, are represented by hypergeometric functions.
Elastica
An important curve family to consider is the elastica, an idealized thin flexible strip. The math behind the elastica has hundreds of years of history, but more to the point it is both a smooth curve (it can be characterized as the exact solution to the Minimum Energy Curve problem) and can exhibit large curvature variation when placed under tension. To my eyes, it's a more pleasing and natural curve, as it's based in physical reality in a way that cubic Béziers aren't. Ideally we'd be able to approximate it well, and the fact that Spiro curves can't is a strong case against them. Fortunately, our hyperbezier does reasonably well. As in the case of the superellipse, it's a fairly decent visual match, though again not a precise approximation.
图片
Some mathematical properties
This section is a grab-bag of some mathematical properties of the hyperbezier curve.
An appealing property is that the Cesàro equation is easily integrated, yielding a Whewell equation:
Here, the parameters in the numerator aren't the same as the Cesàro equation (though they are readily derived), but the quadratic polynomial in the denominator is the same. Another round of integration (which I believe will be especially useful for curve fitting) also yields simple analytical equations, revealing that a close relation to trig functions.
The derivation of parameters for the Whewell equation follows fairly straightforwardly from the following integral, which has a pleasing symmetry:
Going in the opposite direction, the derivative is also straightforward, yielding a quadratic over the same polynomial in the denominator, this time with an exponent of 2.5. To compute roots, identifying the curvature extrema, involves merely solving the quadratic.
Because the denominator is positive, there is at most one inflection point, at , when it is in range [0, 1]. That clearly signals that it can't accurately approximate all cubic Béziers, as those can have two inflection points. In my experience, instances of cubic Béziers with two inflection points are rarely used in designs (it might be interesting to look at a corpus of vector graphics to quantify this).
I have experimented with other values for the exponent than 1.5. A value of 1 would be appealingly simple, as it would resemble Padé approximation, but I found it cannot represent high-tension curves in a numerically stable way. I also considered an exponent of 2, but the integrals don't come out as cleanly and overall it didn't match cubic Béziers as closely. Perhaps this is not surprising, as the exponent of 1.5 resembles the equation for curvature of a parametric curve :
In general, arc length parametrized curves are in many ways more pleasant to work with than general parametric curves; there's a nontrivial calculation to solve the inverse arc problem for Béziers.
Future work
In this post, I present the curve family to the world. I welcome and encourage experimentation. Of course, there is lots to be done to make the mathematical idea into a practical tool. For one, it should be wired up into a spline. I expect to follow the ideas in The hyperbezier pen tool by Colin Rofls, which was based on an earlier draft of the hyperbezier math. This earlier draft had some of the desired behavior of the current proposal, but also some flaws, including not being able to approximate sharp superellipses, and also not being closed under subdivision. On the other hand, it had a straightforward solution to the problem of mapping Bézier-like control points to the parameters.
One idea from the above spline that I think is worth preserving is making splines G2 continuous by construction. Such approaches don't work well with cubic Béziers because there are multiple local minima, creating saddle points in the optimization terrain.
Another promising direction is working out curve fitting. While I haven't gotten deep into it yet, I expect curve fitting to be fairly straightforward, especially compared with cubic Béziers. I'm especially interested in fitting touch or pen data. As usual for this problem, a central part of the challenge is finding good subdivision points.
I hope to land better implementations in the spline repository, but make no guarantees how fast that will go.
Acknowledgements
I've been working on this for years, and have benefited from discussions with many people, including Colin Rofls, Alex Ionuț, Jacob Rus, and Trevor David Black (apologies if I've missed someone; just let me know). Special credit goes to Muhammad Ragib Hasin, who improved many of the numerical and solving techniques for parameter mapping. AI assistance was used to refine the current version of parameter mapping and to prepare the visuals for this post.