ends 375


Homework 9 Problems

1. What is the 'Z-buffer' algorithm? How is it different from the 'painters' visible surface algorithm?
The Z-buffer is for both depth and color. The color value and depth value of each pixel is compared to each surface. If the values change, the image is update. This allows for infinite image complexity. No explicit sorting is required, unlike the visible surface algorithm that’s based on sorting.

2. How is 'diffuse' lighting different from 'ambient' lighting? What factors determine 'diffuse' lighting?
Diffuse lighting is reflected lighting. Diffuse lighting can be determined by the relative angle of the light with the object, as opposed to the viewer’s location. Ambient light is determined by the sum of all the diffuse reflection from all surfaces around an object.

3. How is 'specular' lighting different from ' diffuse' lighting? What factors determine 'specular' lighting?
Both specular lighting and diffuse lighting include the angle between the surface normal and the light vector. Specular lighting also depends on the viewer’s position relative to the lit surface. In other words, surfaces that have secular lighting have a reflective surface. The color of specular light is highly dependent on the color of the light source, whereas diffuse light's color is more dependent on the color of the surface, but also dependent on the diffuse light source's color.

4. Most visible surface algorithms are applied after a perspective transformation and perspective division
are applied. Why?
The transformation and division are applied first in order to simplify the process. Then after these are done, the surface algorithms can be applied in orthogonal space.

5. Describe the "Gouraud" polygon shading algorithm. How is it different from 'faceted' polygon shading?
The Gouraud algorithm relies on vertex normals, by taking the color of vertices and interpolating the in-between color, causing color variation across the surface. Faceted shading tessellates curved surfaces into polygons (a polygon mesh). All pixels on each polygon have the same color. This shading depends on polygonal normals.

6. Describe the 'Phong' polygon shading algorithm. How is it different from 'Gouraud' polygon shading?

The 'standard' model in computer graphics that compromises between acceptable results and processing cost is the Phong model. This model reflects light in terms of a diffuse and specular component together with an ambient light term. The reflected light intensity at every point on a surface is taken to be the linear combination of these three reflection components.
Phong shading interpolates vertex normals, and Gouraud interpolates vertex color intensities linearly. Phong also requires much nor calculation and is more expensive.


7. For a curved surface, such as a sphere, how is the surface shading usually done?
Tessellation is used to divided a sphere into a number of connected, flat polygons and then each shades each polygon.


8. How is a scene transformed from the 'world' coordinates to the camera coordinates? Why do we need to do this?
When a camera is inserted into another ‘world’, it brings in its own “camera” coordinate system where the origin is at the camera and positive z-axis is directed out and away from the center of the camera (depth). All of the object coordinates in the world system must be transformed into the camera system to calculate the rendered image from the camera's point of view.

9. How is a vertex normal different from a polygon normal? How might the vertex normal be calculated?
A vertex normal is the average between two corner's of intersecting polygons. A polygon normal is perpendicular to the surface of a polygon. A vertex normal might be calculated by averaging the polygon normals of each polygon at their respective vertices.

10. How are multiple light sources included in lighting calculations? Give an example.
Every light has it's own properties, location, color, intensity. When multiple lights are used, you add each light's properties together. An example would be in my bedroom. There is the ceiling light, lamp light, outdoor light coming in the windows, and a glow off of the computer.

11. How is color usually handled in lighting calculations?
Ambient light exists and bounces off of everything. The light spectrum uses RGB color components The color of the light and object each greatly affect the color of the light that bounces off the objects. The surface color is affected by an objects specularity, reflection, transparency, and bump.