Bézier curves

This simple application demonstrates drawing a Bézier curve. Unlike most demos, this one allows you to draw a curve through a set of control points, rather than the normal situation, where the centre control points lie outside the curve. The program calculates what the location of the Bézier knot points should be, so that the control points presented to the user always lie on the curve.

This was originally an applet from http://www.math.ucla.edu/~baker/java/hoefer/, but I was dissatisfied with the obtuse and poorly documented code, so although you may find original lines here and there, it has mostly been rewritten. (Not that this code is at all clean.)

Spline.java This code is public domain—use at your own risk, etc.

<<< Computer Science

Return to the Computer Science section.