INT32GP Graphics Programming

Bezier Curves

The program bezier.c creates 2D bezier curves.

  1. Press c to see the control points.
  2. To move the black control point, press x, X, or y,Y.
  3. To move to the next control point, press n.

Can you create the following curves?

Enhance the code to render the curves using GL_POLYGON or GL_LINE_LOOP or GL_LINES as well as GL_LINE-STRIP.

How many vertices are computed to render the curve?

Change the program so that the number of vertices are much less (eg. 6).

Copyright © 2006 Fran Soddell
last updated 20 October 2006 F.Soddell@latrobe.edu.au