Discussion
Slicing bezier surfaces
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.
vintagedave: 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 weights (if that's even the right term) to get a curve that is a subset of the curve but matching exactly?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?> 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 :DAlso: what an awesome blog post. Interesting topic, straightforward, short, code, diagrams, clearly not AI. Thankyou to the author.
quchen: 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_algorithmThis is also used to efficiently draw bezier curves: subdivide them until they're visually straight lines, then plot those.