This page was last updated: July 3, 2025
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.
In your sample code, you have a function called Ranf( ).
Use it to select a random number between a low value and a high value.
For example:
float red = Ranf( 0.f, 1.f );
The way random numbers work, you will get the same sequence every time you run your program.
If you want to get a different sequence every time, seed the random numbers with the time of day.
To do this, call the function:
TimeofDaySeed( );
as the first thing your main program does.
How can you have fun with random numbers?
Well, for example, you could pick a random color like this:
glColor3f( Ranf(0.f,1.f) , Ranf(0.f, 1.f), Ranf(0.f,1.f) );
or you could draw a random collection of triangles like this:
int numTriangles = 33;
glBegin( GL_TRIANGLES );
for( int t = 0; t < numTriangles; t++
{
glColor3f( Ranf(0.f,1.f) , Ranf(0.f, 1.f), Ranf(0.f,1.f) );
for( int v = 0; v < 3; v++ )
{
glVertex3f( Ranf(-1.f,1.f) , Ranf(-1.f, 1.f), Ranf(-1.f,1.f) );
}
}
glEnd( );
This is just for fun. It doesn't count as one of your Project #1 objects!
Use Canvas to turn in your:
Feature | Points |
---|---|
At least 100 vertices | 20 |
At least 5 colors | 20 |
3D rotation and scaling | 10 |
Potential Total | 50 |