Next: Average Luminance and Attenuation
Up: Color Computations
Previous: Color Computations
  Contents
  Index
Riemann Sum
A simple (albeit inaccurate) method for numerical approximations of
integrals is the Riemann sum. The idea behind
the Riemann sum is to take an integral, for example of the form
 |
(25) |
and break it up into a finite amount of pieces that we sum together.
The sum is
 |
(26) |
where
and the sample
s are chosen such that
. As
approaches zero
(and
approaches infinity), Equation 1.8
converges to Equation 1.7.
Consequently, using more terms in the sum results in a more accurate
numerical approximation.
Max [63] gives an overview of how we may apply the Riemann sum
to the volume rendering integral. The volume rendering integral
(Equation 1.6) actually has several integrals in
it. The first is the integral attenuating the incoming light. We
approximate
as follows.
 |
(27) |
Note that in Equation 1.9 I have substituted
for
. Assuming
that
is fixed, we can precompute values of
based on
the associated values for
.
We approximate the second outer integral of
Equation 1.6 in much the same way.
becomes
 |
(28) |
Putting Equation 1.9 and
Equation 1.10 together, we get the following
approximation for the volume rendering integral.
Equation 1.11 yields simple front-to-back or
back-to-front methods for computing it.
Until now, I have been intentionally vague on the form of
. Max
[63] defines it as the traditional Riemann sum form dictates
it:
. However, in
Section 1.3.3, I show that the output
intensity of a ray segment of length
is
 |
(30) |
Using Equation 1.12 for
results in a more
accurate approximation of the integral. Nevertheless, we may precompute
Equation 1.12 just as we can precompute
.
Furthermore, consider what happens when we substitute
Equation 1.12 for the
s in
Equation 1.11.
 |
(31) |
We can use graphics hardware to perform the basic operation
used in
Equation 1.13 as described in
Section 1.2.4.
Volume rendering systems use the Riemann sum method most often when
sampling of the data set along viewing rays is convenient and does not
result in a large loss of information. Such situations occur when
rendering rectilinear grids using methods such as those described in
Section 1.1.3.
Next: Average Luminance and Attenuation
Up: Color Computations
Previous: Color Computations
  Contents
  Index
Kenneth D Moreland
2004-07-16