This page was last updated: July 21, 2024
This project requires you to draw something fun and cool in 3D. It must be your own creation.
Just as an inspiration, here is what the CS 450/550 Class of 2022 did with this assignment, but I know you can do better.
When you are done with this assignment, you will understand how to generate and manipulate 3D graphics objects using OpenGL. At this point, you will realize that you can basically draw anything just by repeatedly applying what you did here.
Go to the Class Resources Page and scroll down to Downloadable Files. Then download one of the SampleWindows.zip, SampleLinux.tar, or SampleMac.tar files (by right-clicking on them). This will produce a folder full of all the other files you need. You do not need to go hunt the internet for any other files. Use the ones that have been given to you.
Start by getting the sample program to work. If you are on Windows, double-click on the .sln file. If you are on Linux or Mac, type make
Then start modifying the function InitLists( ) to draw something of your own design.
No, using a GLUT object or an OSU object or an OBJ file will not count.
Sometimes it is fun to use random numbers when drawing your scene.
They can be used to modify several graphical things such as positions and colors.
The functions below are included in your Sample code.
the Ranf function will return a number between the low and high values.
For example, to pick a random color, call:
glColor3f( Ranf(0.,1.) , Ranf(0.,1.) , Ranf(0.,1.) );
Every time you run your program, the random number sequence starts from the same seed. If you want your program to behave differently every time you run it, call the function TimeOfDaySeed( ) first thing in your main.
float Ranf( float low, float high ) { float r = (float) rand(); // 0 - RAND_MAX float t = r / (float) RAND_MAX; // 0. - 1. return low + t * ( high - low ); } // call this if you want to force your program to use // a different random number sequence every time you run it: void TimeOfDaySeed( ) { struct tm y2k = { 0 }; y2k.tm_hour = 0; y2k.tm_min = 0; y2k.tm_sec = 0; y2k.tm_year = 100; y2k.tm_mon = 0; y2k.tm_mday = 1; time_t timer; time( &timer ); double seconds = difftime( timer, mktime(&y2k) ); unsigned int seed = (unsigned int)( 1000.*seconds ); // milliseconds srand( seed ); }
Use the Teach system to turn in your:
Feature | Points |
---|---|
At least 100 vertices | 20 |
At least 5 colors | 20 |
3D rotation and scaling | 10 |
Potential Total | 50 |