Graphics Reference
In-Depth Information
The different appearance of cloth under fluorescent light and sunlight is the
first example of the Noncommutativity principle—the idea that order matters
in some operations we perform in graphics, but that this is often ignored for
the sake of speed or simplicity. In this case, the computation of the spectrum of
reflected light should be carried out with a full representation of the spectrum,
and the light should be represented by three samples only when it comes time to
store an image preparatory to it being shown on a three-color display. Instead,
we've sampled both the spectrum of the emitted light from the source and
the reflectance characteristics of the cloth, and multiplied samples rather than
spectra. This often produces good-enough results, but can lead to errors.
T HE NONCOMMUTATIVITY PRINCIPLE : The order of operations often mat-
ters in graphics. Swapping the order of operations can introduce both efficien-
cies in computations and errors in results. You should be sure that you know
when you're doing so.
14.4.1.2 Propagation
The speed of propagation of a photon is determined by a material. In a vacuum, it
is about c = 3
10 8 m
s, which is therefore called the speed of light. The index
of refraction of a material is the ratio of the speed of light in a vacuum to the rate
s of propagation in that material:
×
/
= c
η
s .
(14.1)
1. 5).
The exact propagation speed and index of refraction depend on the wavelength
of the photon, but the variation is small within the visible spectrum, so it is
common to use a single constant for all wavelengths. The primary limitation of
this approximation is that the angle of refraction at the interface to a transmis-
sive material is constant for all wavelengths, when it should in fact vary slightly.
Effects like rainbows and the spectrum seen from a prism cannot be rendered
under this approximation—but when simulating only three wavelengths, rainbows
would have only three colors anyway.
Beware that it is common in graphics to refer to the wavelength
For everyday materials, s
<
c ,so
η ≥
1 (e.g., household glass has
η ≈
λ
of a photon,
which is related to temporal frequency 3 f by
= s
λ
f .
(14.2)
Because the speed of propagation changes when a stream of photons enters a
different medium, the wavelength also changes. Yet in graphics we assume that
each of our spectral samples is fixed independent of the speed of propagation, so
frequency is really what is meant in most cases.
3. Waves have a temporal frequency measured in 1 / s (i.e., Hz) and a spatial frequency
measured in 1 / m. The spatial frequency of a photon is necessarily 1 and is rarely
used in graphics because it varies with the speed of propagation.
 
 
Search WWH ::




Custom Search