Programming Project 2: Simulated flying over surface
DATE DUE: October 3, 2016
Points possible: 15 points
CS-116A: Introduction to Computer Graphics
Instructor: Robert Bruce

OVERVIEW

For this project, you will create a randomized rough terrain as a wireframe mesh then fly over the terrain from the perspective of the camera using C or C++ with the OpenGL Utility Toolkit (GLUT). The specifications are outlined below.

SPECIFICATIONS

The terrain should be created from a three-dimensional array of vertices (X, Y, Z).

Each vertex should be evenly spaced on a grid in the X plane (left to right) and Z plane (moving in and out of the screen).

Each vertex should have a randomized value in the Y plane (up and down). The Y plane is what gives the terrain a mountainous surface.

Draw an unfilled triangle (wireframe) between every adjacent vertex such that each triangle shares an edge with another triangle. The triangles should not overlap or encapsulate other triangles. This will create a giant, tesselated, polygonal surface mesh.

The camera will be controlled using the following keys:

  • The up-arrow key moves the camera and the camera focus forward.
  • The down-arrow key moves the camera and the camera focus backward.
  • The left-arrow key moves the camera and camera focus right.
  • The right-arrow key moves the camera and camera focus left.
  • The 'a' key moves the camera and the camera focus up (further above the ground).
  • The 'z' key moves the camera and the camera focus down (closer to the ground).

The camera should not move beyond the edges of your ground terrain (in the X and Z planes).

It is ok for the camera to fly through a mountain peak.

Here is a video demonstration of what your program should look like. I wrote this program in C using GLUT.

PLEASE INCLUDE THE FOLLOWING WITH YOUR PROGRAM

1. Please submit your program to the Canvas dropbox. I only need the source code. I will build the program myself.

2. Please name your programming project file with the following naming convention:

Lastname_Firstname_programming_project_2.c (for C programs)

Lastname_Firstname_programming_project_2.cpp (for C++ programs)

3. Please include your name as a comment at the beginning of your program like this:

/* Rob Bruce */

or this:

// Rob Bruce

4. I usually do not need a makefile to build your programs; however, in the unlikely event that I cannot build your project, I will send an email inquiry as appropriate.

5. I expect your program to compile without syntax errors.

6. I expect your program to execute without run-time errors.

GRADING

Points will be deducted for any program that does not meet the specification as outlined above.

LATE ASSIGNMENTS

Assignments submitted after the due date will be worth, at most, 7.5 points. Additional points will be deducted for programs not meeting the specification as outlined above.