Skip to content

anbochuan/rollerCoaster

Repository files navigation

rollerCoaster

Comp-371-Assignment-2 PART 1

Defining the path using Catmull-ROM splines

The default value of the window size is 800 x 800

the user inputs the number of control points N (integer >= 4) at the start of the program.

The user can marks control points in the window by using the [Left Mouse Button].

The user can press the [Key ‘Enter’] in order to compute and draw the spline based on the control points entered so far.

Pressing key ‘L’ should render spline using line strips.

Pressing key ‘P’ should render spline using points.

Pressing [Key ‘Backspace’] The user can resets the application i.e. removes all control points, etc, and asks the user for a new number of points N .


PART 2

Lighting, Animation:

The default value of the window size is 800 x 800

There are 3 light sources in the scene one of which is following the camera e.g. flashlight.

the rail tracks are placed along the path of the computed spline.

The user can press the [Key ‘Enter’] in order to Toggles lighting ON/OFF.

The user can press the [Key ‘B’] in order to Starts/stops the animation, i.e., the camera movement along the rail tracks.

Pressing [Key ‘Backspace’] The user can resets the camera to the start point and restarts the animation.

The application can handle window resize events