CIS 736 (Computer Graphics)
Spring, 2000
Homework Assignment 2
Monday, January 31, 2000
Due: Friday, February 18, 2000 (by 5pm)
This machine problem is designed to introduce you to the OpenGL
graphics programming library and help start using it for rendering.
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.
-
(15 points) Drawing a simple 2D scene. Construct a simple 2D scene,
in color, containing at least the following primitives:
-
Circles or ellipses
-
Irregular polylines
-
Irregular polygons
-
Regular polygons
and render it using an OpenGL program (you may write this in C or
C++). For example, draw a side-view orthographic projection of your car.
Submit a screen shot of the final scene and the source code that produced
it.
-
(15 points) Drawing a simple 3D scene and using the matrix stack.
Construct a simple 3D scene such as the house in Chapter 6 of FVD and perform
the following sequence of OpenGL operations on it:
-
Translate the object or scene to the origin (if you didn?t start there).
-
Rotate the scene by 15° about x, 30°
about y, and 45° about z.
-
Scale the scene by a factor of 2.
-
Translate the object to (+10, +10, +10).
Render the scene after each step and take a screen shot. Attach these
4 screen shots as a JPEG in your machine problem submission, along with
the source code that invokes the matrix operations.
-
(15 points) Projecting a simple 3D scene. To the 3D scene you designed
in Problem 2, apply the following projections using OpenGL:
-
Parallel
-
Top, side, and front view orthographic
-
Cavalier
-
Perspective
Attach 6 screen shots as JPEGs in your machine problem submission along
with the source code that invokes the matrix operations.
-
(15 points) Drawing curves and surfaces. Draw Figures 11.19 (both
curves) and 11.42 using Bézier cubic curves and bicubic patches,
respectively. You may use OpenGL for this, but in Homework 3, you
will be asked to implement the Bézier curve-drawing routine from
scratch.
Attach 3 screen shots of the displayed curves and surface along with
your source code.
Extra credit (10 points):
Draw a filled 2D monogram (in a cursive or serif font) of your
own initials using Bézier cubic curves and lines.