Wednesday, September 09, 2009

Higher-Order Beziers? Probably Not

I was revisiting Bézier curves today. First I should say that the current scheme for handling Bézier curves in apt.dat and DSF is horribly convoluted - I am looking to replace the syntax with something less weird for the next set of features that use them. But I was also looking at the problem of generating curves from high-density line data.

Did you know that a Bézier curve can have any number of control points? This picture illustrates:

Each curve has one more control point than the last. Zero control points is of course a line segment, and two control points is a "cubic" Bézier, which is what we have now. (Note that having one control point in WED does not give you the one-point quadric Bézier you see here. WED gives you a cubic Bézier with one control point on top of an end point.)

But it also show: having tons of control points are not particularly useful for modeling a shape in detail - a string of connected cubic Bézier is probably just as good. And the high-order Bézier doesn't really trace out the control points, so it's not a good way to convert line segments into a curve.

1 comment:

Paploo said...

Sadly, I find Bezier curves to be overly interesting. For the mathematically inclined, I recommend the following link to wikipedia:
http://en.wikipedia.org/wiki/Bezier_curve

For the geometrically inclined, there are some good animations of the geometrical construction of a Bezier curve later in the page.