C481 B581 Computer Graphics
Dana Vrajitoru

Interpolation Methods

Why. Polygon representations (like the triangulation) are often a discretization of a smooth object. We would like the final image to look smooth also.

The color of each polygon is constant. Could be produced by the Phong model with directional light sources.

Interpolated shading - Each point of the polygon has its own color. These models aim at a smooth transition from a polygon to its neighbor.

Gouraud Interpolation


Color with Gouraud Normals


Phong Shading


Light in OpenGL

Define the shade as interpolated or not;

Smooth Color in OpenGL

Specifying the normal before each vertex in any sequence of geometrical commands. All transformations apply equally to the normals.

glBegin(GL_QUADS);
...
glNormal3f(nx, ny, nx);
glVertex3f(vx, vy, vz);
...
glEnd();
Light Sources in OpenGL From the program sphere.c from the textbook CD (no normals, wireframe, normals specified):
Left: normal defined for one vertex of each triangle. Middle: wireframe. Right: normals defined in each vertex of each triangle.

Spotlight in OpenGL (Projection Light Source)

Material Properties in OpenGL

Lights and glColor


Last modified: April 12, 2017.
danav@cs.iusb.edu.