Bézier Demo


Alex Mole

Platform: PC / OpenGL
Date: January 2004

This was a project to demonstrate the use of Bézier curves and patches.

The application shows a paper dart flying around a randomly generated, piecewise cubic Bézier path. This can either move at a variable speed (based on the density of control points in a segment), or at a constant speed. It also displays a "patchbox"- a cube made of 6 Bézier patches, which can be squished quite entertainingly. The user can edit control points of the curve of the patchbox interactively.

Please note that OpenGL must be installed for this demo to run.

This was written using gcc 3.3 and Microsoft Visual C++ 6.0

Mouse: Move the camera (middle button moves control points in edit mode)
a: Accelerate the dart in steady-speed mode
d: Decelerate the dart in steady-speed mode
e: Toggle edit mode (allows points to be moved with the middle mouse button)
i: Re-initialise the dart to the start of the curve
f: Toggle follow mode, where the dart's orientation follows the curve
n: Select the next object in editing mode
p: Pause the dart
r: Generate a random Bézier curve
s: Toggle steady-speed mode
w: Save the changed patchbox control points
Escape: Quit