Currently, our triangle scan-converter draws only solid colored triangles. Next we'll
discuss how to smoothly vary parameters as we fill the
triangle. In this case the parameters that are interpolated are
the red, green, and blue components of the color. Later on, when
we get to 3D techniques, we'll also interpolate other parameters
such as the depth at each point on the triangle.
First, let's frame the problem. At each vertex of a triangle we
have a parameter, say its redness. When we actually draw the vertex,
the specified shade of red is exactly what we want, but at other
points we'd like some sort of smooth transition between the values
given. This situation is shown to the right:
Notice that the shape of our desired redness function is planar.
Actually, it is a special class of plane where there exists a
corresponding point for every x-y coordinate. Planes of this type
can always be expressed in the following form: