[HN Gopher] Slicing Bezier Surfaces
___________________________________________________________________
Slicing Bezier Surfaces
Author : fatih-erikli-cg
Score : 35 points
Date : 2026-03-12 12:51 UTC (3 days ago)
(HTM) web link (fatih-erikli-potato.github.io)
(TXT) w3m dump (fatih-erikli-potato.github.io)
| vintagedave wrote:
| The math for Bezier curves is usually a bit beyond me, but this
| seems to use a simple lerp (linear interpolation) to split. Why
| is that valid? I had expected something like moving along the
| curve and calculating new points and control points (weights?) to
| get a curve that is a subset of the curve but matching exactly?
| My possibly incorrect thought was that these are non-linear,
| therefore, how is lerp suitable?
|
| 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.
| quchen wrote:
| Bezier curve are just nested lerps! A bezier curve of degree 1
| is lerp, what we usually call "bezier curve" is of degree 3.
|
| 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.
| vintagedave wrote:
| Wow! That animation for 'second order Bezier curve' was
| illuminating -- I have _never_ seen something so clear
| explaining these. Thankyou!
| WillAdams wrote:
| For a bit more on the lerp aspect see:
|
| 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 Beziers (at least 3, one
| for each plane) --- if someone knows of a good text on that,
| I'd be glad to learn of it.
| vintagedave wrote:
| This is over an hour so will take some time to watch, but I
| recognise the author's name -- Freya Holmer, they are
| absolutely amazing. Thanks for the link.
| ginko wrote:
| >The math for Bezier curves is usually a bit beyond me, but
| this seems to use a simple lerp (linear interpolation) to
| split. Why is that valid?
|
| 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...
| vintagedave wrote:
| Thankyou, there's a lot interesting there.
|
| 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!
| dahart wrote:
| Here's an interactive picture of how the splitting with lerps
| works: https://pomax.github.io/bezierinfo/#splitting
|
| 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.
| vintagedave wrote:
| That is a really neat demo to play with. With some thinking,
| I can intuit and see visually in that what you mean by 'each
| level of the lerp tree'. Thankyou :)
| dahart wrote:
| I hope it helps, Bezier curves are so simple and fun.
|
| I found a picture of the 'lerp tree' that might help even
| more: https://www.researchgate.net/figure/De-Casteljau-
| algorithm-t...
|
| The cool part about this is that you can see the control
| points of the two split curves in this diagram. The
| original control points are the bottom edge of the
| triangle. The left split is the left edge of the triangle,
| and the right split is the right edge of the triangle.
| sfpotter wrote:
| This is just subdivision of Bernstein polynomials. The unifying
| way of looking at this is via the blossom of the Bezier curve
| (Bernstein polynomial). You can derive all manner of shifts,
| change of basis transformations, and so on using the blossom.
| Subdivision is just a shift of the domain of definition of the
| original polynomial.
___________________________________________________________________
(page generated 2026-03-15 23:02 UTC)