Homework List


Homework 1 (Text Exercises - pages 36 - 38)

1.4, 1.5, 1.8, 1.13 - for your information, summarize what you discovered in a manner relevant to the question.


Homework 2

1. Given the vertex command glVertex2s(2,4) what is the value of z?

2. Show the openGl code segment necessary to draw a 3X3 grid. The viewport has dimensions; height = 100, width = 100 and the origin is in the lower left corner. The grid should be centered in the viewport. Adjacent grid lines should be spaced 15 pixels apart.

3. Given a line segment defined by the endpoints (0,0) and (0,50). Show the openGL code segment necessary to place fat points (markers) along the line segment and spaced at 10 unit intervals along the line. Place the first marker at the starting endpoint (0, 0).

Modify the code to handle the case where the ending coordinate is not a multiple of 10.

4. Does the GLUT window environment support "Sampling" or "Event-Driven" interaction? Explain briefly.

5. What is the purpose of the glFlush() function?

6. Show the openGL code segment necessary to display a wireframe model of a rectangle with height = 50, width = 100, and upper-left hand corner at (25,25).

7. Exercise 2.9, pg. 96.

8. Exercise 2.14, pg. 97.


Homework 3

1. Rewrite the Sierpinski triangle program from chapter 2 ( the iterative point drawing version in BookCode/A.1CH2/gasket.c). Use the glutSpecialFunc to register a special keys callback. The special keys callback should start drawing the points when the left arrow key is pressed, stop drawing points when the right arrow key is pressed, and exit the program when the up arrow key is pressed.

2. Alter the square drawing program of section 3.5 (BookCode/A.5CH3/square.c) to incorporate menus. Allow the user to select from at least 6 different colors or to select random coloring for the squares. Allow the user to increase or decrease the size of the square.


Homework 4

1. Given : a viewport whose lower left-hand corner is at (0,0) and whose width = w and height = h. Given : gluOrtho(-1.0, 1.0, -1.0, 1.0, 1.0, 20.0). Show the transformation matrix necessary to perform view window to viewport mapping.

2. Show the sequence of openGL transformation commands necessary to rotate a unit square centered at point (2, 3), 45 degrees around its center. Show the sequence of openGL transformation commands necessary to rotate the same square 45 degrees around the y-axis.


Homework 5 - due 11/5

UNDER CONSTRUCTION


Homework 6

1. Give the geometry vectors for 2 Hermite curve segments for the following 3 cases

a. The curves join with only G0 continuity.

b. The curves join with only G1 continuity.

c. The curves join with C1 continuity.

2. Identify the case where C1 continuity does not imply G1 continuity.

3. Give the geometry vectors for 2 Bezier curve segments for the following 3 cases

a. The curves join with only G0 continuity.

b. The curves join with only G1 continuity.

c. The curves join with C1 continuity.