Or does this retain the original curves but only evaluate a subset, thus, lerp makes complete sense as a simple linear progression along the curve? The curves stay the same, we are evaluating a subset to get the slice?
> It takes the t value between 0 and 1, and returns two bezier curves, one is the half that splitted at t, the other one is other half. Two of them shapes the given bezier curve.
My apologies to the author for finding this unclear -- I am not clear though :D
Also: what an awesome blog post. Interesting topic, straightforward, short, code, diagrams, clearly not AI. Thankyou to the author.
Did you ever doodle parabolas on graph paper by drawing straight lines? That’s one way to see why you can form nonlinear curves using only lerps. (For example https://mathcraft.wonderhowto.com/how-to/create-parabolic-cu...)
Your thought is correct - this does (in a sense) move along the curve to produce new control points, and the subset does match the curve exactly. And the new control points are non-linear too! (The inner ones, anyway.) Pay attention to how the new control points are chosen - to split you take one control point from each level of the lerp tree.
It's a mathematical property that bezier curves (degree n) can be split exactly into two bezier curves (degree n), which is known as deCasteljau's algorithm:
https://en.wikipedia.org/wiki/De_Casteljau%27s_algorithm
That page also features some pretty animations on the "lerpy" part - Bezier curves are really simple, it's just that for some reason they are often presented with lots of math jargon that's completely over the top.
This is also used to efficiently draw bezier curves: subdivide them until they're visually straight lines, then plot those.
This can be explained through the bezier's polar form (aka blossom). There's plenty of literature on this. (For instance see slide 40 here[0])
I generally find it interesting that articles on Bezier curves/surfaces usually get upvoted on HN even though they tend to be extremely surface level. Any introductory applied geometry course or textbook will go much deeper within the first chapter or two.
[0] https://resources.mpi-inf.mpg.de/departments/d4/teaching/ss2...
I think for many of us, Bezier curves were our first introduction to curve geometry. They were certainly mine. In the late 90s, early 2000s, Rhino3D came out, and Quake 3 had curved surfaces, and suddenly splines were everywhere. For those of us of that generation, they are somewhat magic and back then I never saw a good explanation how they work -- but 20+ years later, this thread has provided multiple!
https://www.youtube.com/watch?v=jvPPXbo87ds
I am a bit bummed since from the title I was expecting a technique for 3D surfaces w/ multiple Béziers (at least 3, one for each plane) --- if someone knows of a good text on that, I'd be glad to learn of it.