
Bézier curves
Bézier curves are used in computer graphics to draw smooth curves. Bézier curves can be constructed geometrically by letting the pen move along a line segment between two points, that each move along a line segment between two points, that each move…
The curve has a starting point, an endpoint, and a number of control points that steer the movement of the pen. This construction is due to a French physicist and mathematician called de Casteljau.
De Casteljau’s algorithm can be used to split a Beziér curve in two halves. By splitting the curve, it can be drawn using a divide-and-conquer-algorithm:
If the curve is flat enough, draw a line segment between the starting point and endpoint; otherwise split the curve and draw each of the halves recursively.
As we zoom in on the curve, it will get flatter and flatter. Therefore the recursion will end! The flatness can be measured by measuring the spread of the control points.
Since only the flatness is measured when using this algorithm, the scale doesn’t matter. It’s a scalable way to draw a curve.
Scratch-project showing the geometrical construction of Bézier curves
http://scratch.mit.edu/projects/11771189/
Scratch-project showing how to draw Bézier curves recursively
http://scratch.mit.edu/projects/11790017/
Wikipedia – Paul de Casteljau
https://en.wikipedia.org/wiki/Paul_de_Casteljau
Wikipedia – De Casteljau’s algorithm
https://en.wikipedia.org/wiki/De_Casteljau%27s_algorithm
#mathematics #programming #education
I like Catmull-rom curves myself. More control. 😀
LikeLike
Cool. This is like NURBS’s in AutoCAD. I’ve played with them but there is no use for them in my present job.
LikeLike