Interactive Computer Graphics: Assignment 1


Topics:



Part 1:

Create the following picture:




Use the glColor3f, glBegin(GL_POLYGON), and glVertex functions to create each of the shapes.

Use GLUT routines for the text.

The Circle: use the parametric equation of a circle to create multiple vertexes in a polygon. The parametric equations is:
y=sin( angle )
x=cos( angle )
You will need to step the angle between 0 and 2*pi to draw the circle. You can scale and move the circle by multiplying the coordinates and adding offsets to them. Vary the red color by the step of pi to get the shading effect.

The Ellipse: For the ellipse, use the same equation but scale the y down to 60% .

The Square: For the square, draw multiple squares on top of each other, varying the color from black to white. Its a good idea to base the square off of an angle, making the first point at pi/4, and then every pi/2 after that (this will help in the next assignment).

The Triangle: Its a good idea to use angle to draw the points here too.

The window should be 500x500 pixels.

Part 2:

Create another picture using what you have learned. Use points and lines, as well as polygons.



Last modified January 14, 2010.