CIS 736 (Computer Graphics)
Spring, 2000
Homework Assignment 3
Tuesday, March 7, 2000
Due: Friday, March 31, 2000 (by 5pm)
This machine problem is designed to give you experience in designing, specifying,
and implementing some graphics functions from scratch. For this assignment,
you will also get some more practice in using the OpenGL graphics
programming library and some hands-on experience with rendering curves
and surfaces.
Refer to the course intro handout for guidelines on working with other
students. Remember to submit your solutions in electronic form to cis736ta@ringil.cis.ksu.edu
and produce them only from your personal notes (not common scratch
work, notes, or sources other than the OpenGL library). If you intend
to use other references (e.g., A. Watt’s books or Graphics Gems),
get the instructor’s permission, and cite your reference properly.
-
(40 points) "Flying through" a simple 3D scene. In this machine
problem, you will design and implement two "camera tracks" to display a
fly-through animation of the 3D scene similar to the one you designed in
Homework 2.
-
(10 points) Draw a 3D wireframe scene with 2 connected components (2 cubes
or 2 houses, for example).
-
(10 points) Implement a Bézier curve that flies through this scene,
subject to the following view specification:
-
Both components of the scene should be visible for part of the animation.
-
In part of the animation, one of the components should partially occlude
the other. You do not have to perform visible surface determination
for this machine problem.
-
The camera (eyepoint) should pass through one of the components.
To complete this problem, you need to:
-
Write down the appropriate control polygon endpoints in world coordinates
for the scene you drew in part (a).
-
Use either the OpenGL Bézier code or deCasteljau’s algorithm
(as specified in Section 11.2.7 of Foley et al) to interpolate each
segment of the curve.
-
At each interpolated point, call gluLookAt() to update the view.
When your interpolation granularity is fine enough, you should get a smooth
animation.
-
(20 points) Implement a Catmull-Rom spline (see Equation 11.47 in Foley
et al) with the same knots as the Bézier control polygon
endpoints and use it to perform a similar fly-through.
Attach a screen shot from your fly-through and your source code, along
with specific instructions for compiling and running your code. The instructional
staff will build your display executable and test it during grading. (Note:
if you are using the MS Windows operating system, attach a compressed binary
of your standalone application).
-
(20 points) Drawing curves and surfaces. Draw Figure 11.42 of Foley
et al using a Bézier bicubic surface patch. You may use the
2D Bézier curve functions in OpenGL as primitives, but you
should write the bicubic surface interpolation code yourself (from scratch).
You may use your own estimate for the points on the control polyhedron.
Attach a screen shot of the displayed curve and surface along with your
source code.
Extra credit (20 points):
Use the OpenGL Gouraud shading functions to illuminate
the surface from Problem 2. Attach a screen shot of the result and your
source code.