In this assignment, you will use splines to create a roller coaster simulation. The simulation will use a first-person view that lets the user ride the coaster through an immersive environment.
By completing this assignment, you should develop a solid understanding of:
Designing smooth geometric curves with splines
Reparameterizing polynomial splines by arc length
Defining coordinate frames along a spline
Designing smooth quaternion splines
Manipulating a camera to create first-person motion
[5 points] Design a virtual roller coaster using splines.
Use any type of spline to define the track trajectory, such as Catmull–Rom splines, natural cubic splines, or B-splines.
Make the spline closed so that the coaster can run continuously.
[5 points] Define a moving coordinate frame along the spline.
Update the tangent, normal, and binormal vectors consistently so that the frame moves smoothly along the spline.
Render rails that follow the track and reflect the moving coordinate frame.
[10 points] Use unit-quaternion splines to define the coaster’s orientation along its path.
Implement a method of your choice for defining a smooth, consistent orientation along the trajectory.
Let the user show or hide the spline’s control quaternions.
In your report, compare unit-quaternion splines with the moving coordinate frame from the previous section, and discuss the advantages and disadvantages of each approach.
[5 points] Simulate physically plausible motion along the spline.
Implement arc-length reparameterization to convert between the geometric parameter u and the arc-length parameter s.
Compute the exact velocity at any value of u.
Move the coaster along the spline by integrating its motion over time and updating s.
Use a timer callback to keep the simulation synchronized with real time.
[5 points] Support both first-person and third-person views.
In the first-person view, place the camera on the coaster and orient it to face forward along the track.
In the third-person view, let the user control the camera with a trackball interface.
Let the user switch between the two views.
Render a ground plane using simple geometry and textures. A large ground plane may produce visible clipping at its far edge because of the far clipping plane, as well as aliasing. We will discuss aliasing in the lecture on sampling and reconstruction. You may use fog to make distant geometry fade smoothly into the background.
[5 points] Write a report that includes:
A description of what you implemented and how it meets the specifications
Detailed instructions for running and using your program
References you consulted, along with any third-party materials, code, or models you used
Discussion and comparison between quaternion splines and moving coordinate frames along splines.
Submit the following through ETL:
A single ZIP file containing your code, data, report, and all other files needed to run your program
A recorded video demonstrating your program