logoalt Hacker News

Curvature Beziers: Improving on a timeless recipe

24 pointsby leephillipslast Monday at 5:03 PM8 commentsview on HN

Comments

lioeterslast Monday at 10:07 PM

As another comment mentioned, Raph Levien has a few words to say on the topic of improving Bezier curves.

Simplifying Bézier paths (2023) https://raphlinus.github.io/curves/2023/04/18/bezpath-simpli...

Parallel curves of cubic Béziers (2022) https://raphlinus.github.io/curves/2022/09/09/parallel-bezie...

Fitting cubic Bézier curves (2021) https://raphlinus.github.io/curves/2021/03/11/bezier-fitting...

adamschwartzlast Monday at 5:38 PM

What an amazing resource.

I’ve been building a vector editor that by default draws shapes with smooth curvature and shows the comb. [1] In addition to the four point types mentioned in the article, you get a new “curve” point type. I’ve also been making a font editor with the same drawing capability. [2]

Both are free static web apps that use local storage and have import/export capability for SVG files (and OTF files for the font editor).

[1] https://svg.a10z.co/editor

[2] https://svg.a10z.co/font

show 2 replies
peter_d_shermantoday at 7:45 PM

>"The linear interpolations (aka lerps) can be summarized into a single compact formula, e.g. for 4 control points (A,B,C,D):

γ(t)=A⋅(1−t)^3+B⋅3(1−t)^2⋅t+C⋅3(1−t)t^2+D⋅t^3

The rule is simple: descending powers of (1−t), ascending powers of t, with coefficients taken from the n'th row of Pascal's triangle.

I've never seen the connection between the equation for Bezier Curves (more specifically the linear equations of curves with N control points aka "binding points" / "points of stability" / "fixed points" / "immovable points", etc.) and Pascal's Triangle before!

Brilliant!

Great article, too!

laroditoday at 6:21 AM

Illustrations in the article are indeed precious teaching material