Ahmed Sharif
Gaming

Bezier Curve Demo

Bezier curves, or curves in general, are arguably one of the most useful tools in graphics programming. They have so many practical applications particularly  in games they’re almost always used one way or another, whether that be camera movement, animation, motion paths, the possibilities are endless. The demo was built upon a framework that I’ve used for most of my DirectX projects, it’s sustained heavy amounts of iterations through the years and it’s served its purpose very well considering.

This demo was a quick experimentation of Bezier curve manipulation, rendering composite bezier curves and then animating an object along the curve at a speed dictated by some simple physical properties. The user can place control points for a bezier curve arround a small level, the user can then tell the application to run, and a spaceship will fly along the user defined bezier curve at velocities dependant on the incline of the slope.

WASDPageUp and PageDwn move the current control point. Selecting “Add control point” creates a new control point for placement while fixating the previous. Hitting “Run” will switch to view mode where a simple model follows the path created by the user. Reset the curve by clicking “Restart.”

The project executable can be downloaded here, along with the project source files which can be found here.

Leave a Reply

Your email address will not be published. Required fields are marked *