CS 535 Fall 2007
Midterm Solution Set (100 points)
Closed books and closed notes
(a) Is it possible to use a 512 512 frame buffer (bitmap) to control a
1024 1024 display? Justify your answer. (5 points)
Yes, use each entry
Viewing Transformations I
Want to see our virtual 3-D world on a 2-D
Projection & Window
What is Color?
Color is the spectra of light being perceived by
the human visual system
Visible light is electromagnetic energy in the
400 to 700 nm wavelength range
Why discuss color?
Many ways to talk about color: tint, shade, hue,
Rasterization takes shapes like triangles and
determines which pixels to fill.
1. Polygon Scan-Conversion
Rasterize a polygon scan line by scan line,
Curves and Surfaces
These curves are approximating rather than
The curves come close to, but may not actually pass
through, the control points.
Usually used as multiple, joined curve segments
B-splines have C2 con
(Some Images from Rosalee Wolff)
Problem with shading models:
They assume that a diffuse surface has uniform
This is okay for walls or solid balls, but not most
We could add geometric complexity
CS535 Homework 3
Homework 3 The Solid
Due March 23, 2012
In this assignment you will implement the functions to
show a solid and shaded Utah teapot like that shown on
You should extend your last
CS535 Homework 2
Homework 2 The Utah Teapot
In this assignment you will implement the
functionality for displaying Bezier surfaces under
different transformations. The goal is to give you
some first-hand experiences of parametric surface
CS535 Final Project
Due May 2rd, 2012
In this assignment you will implement a basic ray tracer. Use a recursive approach, as
suggested in Foley van Dam et al, paragraph 16.12 and the appropriate lecture notes.
Your program will
CS535 Homework 4
Due: April 5
In this homework, you will use the GLSL to implement per-pixel lighting with a reflection map.
You are required to draw the Utah Teapot with a mirror surface property. The input includes a
cube-map. A typical cube map is show
CS535 Spring 2012 (Homework 1)
Homework 1 2D Drawings
Due Feb 3rd, 2012
In this assignment you will implement an interactive sketchpad. The goal is to give you some
first-hand experience with OpenGL, GLUT, and basic knowledge 2D rasterization operations.
What is ray tracing?
Trace the path of a ray of light.
Model its interactions with the scene.
When a ray intersects an object, send off
secondary rays (reflection, shadow, transmission) and
determine how they interact wit
A ray can be represented explicitly (in parametric form)
as an origin (point) and a direction (vector):
Origin: ro yo
ro + rd = r(1)
The ray consists of al
Graphics and Multimedia
2D Graphics Primitives and Transformation
2D Coordinate Transforms
Basic Problem : Objects are typically defined in ideal
coordinate system, e.g. ideal coordinate system for a
circle is the origin coincides with the circle c
2D Drawings: Lines, Circle, and Spline
Primitive Drawing Operations
Digital Concepts of Drawing in Raster Arrays
PIXEL is a single array element at (x,y)
- No smaller drawing unit exists
0 1 2
What happens when one or both endpoints of
a line segment are not inside the specified
Strategies for clipping:
a) Check (in inner loop) if each point is inside
Works, but slow
Surface modeling problem
Parametric bicubic surfaces
Monday, January 23, 2012
Surface Modeling Problem
How to model a complex
surface in 3D space.
Accurately represent the
Introduction to Computer
Graphics with OpenGL/GLUT
What is OpenGL?
OpenGL (Open Graphics Library)
A software interface to graphics hardware
a standard specification defining a cross-language,
cross-platform graphics rendering API for writing
Window to Viewport
Does order matter?
Case 1: translate by (2, 0), scale by (2, 2)
Case 2: scale by (2, 2), translate by (-2, 0)
1 0 2
T 0 1 0
0 0 1
Begin: red, 1st transform: blue, 2nd: green
We want to extend the idea of transformations to
deal with 3D objects
More complex than 2D, but essentially the same
We will use a right-handed syst
Representing A Circle
y r x
F ( x, y) x y r
F ( x, y) ( x xc ) ( y yc ) r
x r cos
y r sin
Equation for a circle:
Suppose we want to look at the environment from
somewhere besides the z-axis.
How do we do this?
What is the perspective matrix?
Where should an object project onto our new view plane?
Set up our
Illumination & Shading
What is a Shading Model?
Model of how light interacts with materials
We will discuss the common, heuristic shading
Not physically based: work well in practice and are
common on most graphics boards
Light received and reflected
Bidirectional reflectance distribution function
Different energy transfer
Light transport is e