Linearly interpolated opacity results in an unwieldy form for
.
Instead of trying to calculate
directly, we can use an
approximation similar to that given by Wilhelms and van Gelder
[102]. We assume that
is constant in
Equation 1.3. In this case,
. To get a value for
, we average the opacity (
) and then convert
that to an attenuation coefficient (via
Equation 1.12).
Figure 1.6 demonstrates that this
approximation is quite close.
![]() |
![]() |
| (a) |
(b) |
When
varies linearly (
varies logarithmically),
(Equation 1.4) does not have a closed
form. We can approximate
in the same manner as we approximate
: by averaging
. If we constrain the opacity and
attenuation to be constant, Equation 1.4 reduces
to
![]() |
![]() |
![]() |
| (a) |
(b) |
Appendix 1.5 lists Cg code that we can use to perform this volume rendering integral approximation. However, under rare circumstances when the opacity changes drastically over a large cell, errors can become noticeable.