Hacker News new | past | comments | ask | show | jobs | submit login
Bézier Curves and the logic behind them (richardekwonye.com)
164 points by bpierre on Sept 2, 2023 | hide | past | favorite | 22 comments



Got to plug this recent video as an excellent introduction to Bezier Curves: https://youtu.be/aVwxzDHniEw?si=GaBPbo2JyQHEead5


Also from her - The Continuity of Splines [0]. More from her site [1].

Long interactive read from Bartosz Ciechanowski [2]

[0] https://www.youtube.com/watch?v=jvPPXbo87ds

[1] https://acegikmo.com/

[2] https://ciechanow.ski/curves-and-surfaces/


I’m slightly surprised to see no-one has linked this yet: https://pomax.github.io/bezierinfo/


Another incredibly good and interactive exposition on Beziers

https://ciechanow.ski/curves-and-surfaces/

His blogs always hit the top of the front page for good reasons.


He also has an older article on the same topic: https://ciechanow.ski/drawing-bezier-curves/.


Wow what a treat. Thanks for sharing this link. Outstanding.


I discovered this primer a few years back (I'm pretty sure it was here on HN) and it was an excellent read!


Two points define a line (one vector + origin). Three points define a plane (two vectors + origin)

Quadratic bezier: constructed by a velocity vector and an acceleration vector -- strictly 2D (planar curve). If you can draw a "V", then you can extend it into a parallelogram.[0]

Cubic bezier: constructed by velocity, acceleration, and jerk vector -- generally non-planar 3D curves (since there are three vectors involved), only special cases are planar.

[0] https://www.desmos.com/calculator/enz2qqc2ov

IMO Rational Quadratic Beziers are much more interesting since it defines 3D perspective, the entire field of Computer Vision can be derived from it alone.


> strictly 2D (planar curve).

A single curve segment is indeed planar, but it might be too strong to say strictly 2D? You can certainly make 3D quadratic curves. I use cubic and quadratic Beziers mostly for fur and hair, and some people do mention to me their concerns about quadrics being planar, but I think it’s not an issue in practice at all. (And quadratics are simpler and have some big advantages over cubics.) When you piece together multiple quadric segments and match tangents properly, it’s a 3D spline and you can’t really even see the planarity, each segment is a different plane. 2 quadratic segments do a pretty good job of approximating 1 cubic segment.

I like thinking about B-splines more that individual segments, and for a B-spline, you can think about the difference between quadratic and cubic as more like a smoothing factor and little else.


what I meant is that any parabola, no matter how you orient it in 3D space, will always fit on a flat piece of paper, because only two vector directions are ever involved in its construction (the starting velocity and the acceleration direction). And a single quadratic bezier is simply a segment of a parabola.


Totally, I understand and agree, I just wanted to rant for a minute about how that might not matter in practice, but obviously it depends on how you’re using the curves and what you need.


This isn't a bad mnemonic but it's not true in general - interpolation just means estimating missing data and you don't need to use polynomials eg gaussian interpolation is a thing. Polynomials are the most common simply because they're the easiest/fastest to fit.


I've edited my comment to remove the mention of interpolation, since it was only tertiary to the point I was making and, as you said, that description sacrificed precision for brevity.

Also the use of polynomial isn't exactly just due to being "easier to fit", rather it's that it's a fundamental primitive of the derivative operator, it being easier to fit is more like a "perk" that arises. Kinda like saying that "we use integers because it's easier to represent with bits" -- not wrong, just that the cause and the reward is kinda backwards.


> rather it's that it's a fundamental primitive of the derivative operator

People run away with their math woo... You're just talking about an eigenspace of a linear operator. It's true polynomials are closed under d but they're not special - sinusoids are the most obvious other example. There are countless other examples as soon you start building slightly more complicated differential operators.


Can someone help me understand this comment thread? It seems really interesting but it is over my head. I can understand simple calculus and linear algebra.


Closed under D just means polynomial is the derivative of a polynomial etc. just like sinusoid of sinusoid and exponential of exponential


will never forget my original introduction to building bézier curves: making an aimbot look human by bezier curving the mouse path to the target!


> making an aimbot look human by bezier curving the mouse path to the target

I can't remember the reference precisely but I believe in the film Dune some missiles follow Bezier curves to an estimated target position because it gives a more interesting flight path. Or something like that.


I almost skipped over this because I’m already familiar with how Bézier curves work. I’m glad I didn’t — this site is absolutely stunning!


Another tutorial. "Bezier Curves from the Ground Up": https://jamie-wong.com/post/bezier-curves/


Reminds me of Flash game animation tuning from back in the day.


For an interactive overview see:

https://bezier.method.ac/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: