Graphics Reference
In-Depth Information
Figure 9.20.
The relationship between CRT
gun voltage and luminance.
bright, but that is not what happens. Figure 9.20 shows the relationship between elec-
tron gun voltage V and luminance I. The formula relating the two has the form
g ,
IcV
=
where c and g are constants that are different for each monitor. The typical range for
g is a value between 2.0 and 3.0 with g=2.2 being the NTSC signal standard. The com-
pensation for this nonlinearity is called the gamma correction and is accomplished by
using a lookup table. For example, if intensities are translated into 8-bit integer values,
then one would have a table of size 256 and location k in the table would hold the
value k 1.0/g . The same lookup table would be used for the red, green, and blue com-
ponents of a color.
9.12
P ROGRAMMING P ROJECTS
Section 9.3
9.3.1
Extension of programming project 7.5.1.
Now include shading. Compare the results you get from using the Bouknight and Phong
reflectance model.
Section 9.4
9.4.1
A simple shaded world.
(a) Display a shaded world of spheres and a “floor.” Also show shadows. Represent the floor
as a large rectangle in the plane with the spheres above it. Use a simple ray-tracing program.
Send out two rays: one from the camera (through each pixel in the view plane) to find the point
on the nearest object and then one from that point to the light to see if it is in the shadow. For
testing purposes, add the following submenu to your main menu
Search WWH ::




Custom Search