NKU CSC 480 - Programming Assignment 1

Unformatted text preview:

NKU CSC 480 Spring 2006 Programming Assignment 1 __________________________________________ Write a C++ function that uses OpenGL to draw a “wormhole.” The signature should be: void wormhole( double length, double width, double sep, double rOuter, double rInner ) It will draw the wormhole using triangle strips. The five parameters determine the geometry as shown below: Enforce reasonable preconditions on these parameters using assertions. For example: assert( sep + 2*rOuter < length ) Choose the polygon levels to roughly match the illustrations above. Do not set colors, fill modes, and so on, in your function. It is client who calls your function who should be able to control those features. Leave the OpenGL state unchanged. You can test your function inside the program we used for displaying and spinning surfaces of revolution (Revo.cpp). I will call it from my own test driver. In later assignments, we will make the wormhole ripple, we will fly through it, and give it textures. DUE: By 9am Thursday February 9. Submit your function (along with any helper functions) in a single file named wormhole_*.cpp, with your last name replacing *. No late assignments will be accepted. As always, programs are graded on design and style as well as nominal correctness. Start early, work incrementally, test as you go. sep rInner rOuter length width half of a torus surface of revolution of a quarter circleCSC 480 Spring 2006 Program 1: Wormhole – Evaluation Sheet Correctness (20) ___ /3 plane drawn correctly ___ /10 tube drawn correctly ___ /5 tube-to-hole “adapters” drawn correctly ___ /1 assertion checks are thorough ___ /1 OpenGL state unchanged Design / Style (5) ___ / 3 appropriate modularity (helper functions) ___ / 2 style: appropriate commenting, layout, naming Total: ___ / 25


View Full Document

NKU CSC 480 - Programming Assignment 1

Download Programming Assignment 1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Programming Assignment 1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Programming Assignment 1 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?