Roller Coaster Simulation

By Joshua Miller

CSC 471 - Spring 2006

Roller Coaster Simulation Overview

Overview:

This project was developed in order to simulate the building and riding of a roller coaster. In this simulation the user is able to lay out points on a top down XZ plane. The points are plotted on the XZ plane, on the XY plane, and on a 3d plane. After the user has created a track, they are able to change the X, Y, and Z positions of every point by manipulating the different views. After the user is satisfied with the layout of all of the points, they can either fly around the scene, ride the coaster in first person view, animate a car around the track, or lock on a view of the car animating around the track. This allows the user to see the track that they have created in first person, as well as a car animating around it.

User Guide:

When the user starts the program, the user is presented with 3 windows. The main window begins with a blue sky and a texture mapped ground. The XZ and XY windows begin blank, with no points being drawn in them. When the user lays out points, the track is shown in the 3 different views, with control points allowing the user to manipulate the track. In the 3d view, the control points are green, with a selected control point being highlighted as red. In the other 2 view, the control points are blue, with the highlighted control point colored red.

XZ Window:

The XZ window is a top down view of the track. The user clicks the mouse in this window to create control points for the track. Initially, there is no line drawn for the first 3 points, only after the 4th point is created does a line form between the 2nd and 3rd points. The program does this in order to create interpolated curves between the user specified points. The user can create as many points as they desire, making the track be as long as they want. When the user has finished building the track, they can cycle through the control points changing the X and Z values by clicking the mouse where they want the current control point to be moved to.

Window Keys:

D - Finishes the track connecting the last point to the first point

Left/Right Arrow Key - Changes the current Control Point

Q - Quit the application

XZ-Plane

XY Window:

The XY window is a side view of the track. The user clicks the mouse in this window after all of the points have been laid out in order to change the height of the select control point. The user may change the X or Y coordinates of the selected control point. All changes will be updated in real time in the other views.

Window Keys:

D - Finishes the track connecting the last point to the first point

Left/Right Arrow Key - Changes the current Control Point

Q - Quit the application

xy-plane

Main Window:

The main window is a 3d view of the track. When the user is creating control points, the track is being created in this view. This view has a blue sky and a texture mapped grass ground. After the user has completed the track, the user can ride the coaster in first person view, animate a car going around the track, lock the view on the car going around the track, or just fly around. The user may also toggle to have the control points on or off in this view. The user may also just chose to free roam around the world, rotating the viewing direction and moving different directions from the current viewing direction.

Window Keys:

W - Move eye position forwards

A - Move eye position left

S - Move eye position backwards

D - Move eye position to the right

V - Change the view to 1st person ride view

C - Toggle the control points on/off

(+/-) - increase/decrease the speed of the animation/1st person view

Spacebar - Toggle the animation on/off

L - Toggle the lock on view on/off (only while animating)

P - Pause the animation/1st person view

Q - Quit the application

free-form view

View of the track in the free-form viewing mode

1st-person view

View of the track in 1st-person view

car-animation

View of the car on the track

Resources Used:

http://graphics.ucsd.edu/courses/cse167_w06/slides/CSE167_15.ppt - Ideas and concepts for creating a roller coaster simulation

http://www.cs.wisc.edu/graphics/Courses/cs-638-1999/Projects/proj3.htm - More ideas and concepts for creating a roller coaster simulation

http://pages.cpsc.ucalgary.ca/~jungle/587/pdf/5-interpolation.pdf - Interpolation and curve reparameterization

http://www.lighthouse3d.com/opengl/maths/index.php?catmullrom - Introduction to Catmull-Rom Splines