next up previous contents index
Next: Improved Approximation Up: Linear Interpolation of Opacity Previous: Linear Interpolation of Opacity   Contents   Index


Initial Approximation

Linearly interpolated opacity results in an unwieldy form for $ \zeta $. Instead of trying to calculate $ \zeta $ directly, we can use an approximation similar to that given by Wilhelms and van Gelder [102]. We assume that $ \tau (s)$ is constant in Equation 1.3. In this case, $ \zeta_{D,\tau } = e^{-D \tau }$. To get a value for $ \tau $, we average the opacity ( $ \alpha (s) \approx
\frac{1}{2}\left({\alpha }_{\,\mathrm{b}}+{\alpha }_{\,\mathrm{f}}\right)$) and then convert that to an attenuation coefficient (via Equation 1.12). Figure 1.6 demonstrates that this approximation is quite close.

Figure 1.6: Approximation of $ \zeta $ for linearly interpolated opacity ($ \alpha $). Both computations are with unit length segments.
\includegraphics[width=.45\linewidth,bb=88 4 376 238,clip=true]{ray_integration/zeta_linear_alpha} \includegraphics[width=.45\linewidth,bb=88 4 376 238,clip=true]{ray_integration/zeta_average_alpha}
(a) $ \zeta $ with linearly interpolated opacity. (b) $ \zeta $ approximated with average opacity.

When $ \alpha $ varies linearly ($ \tau $ varies logarithmically), $ \Psi $ (Equation 1.4) does not have a closed form. We can approximate $ \Psi $ in the same manner as we approximate $ \zeta $: by averaging $ \alpha $. If we constrain the opacity and attenuation to be constant, Equation 1.4 reduces to

$\displaystyle \Psi_{D,\tau } = \frac{1-e^{-D\tau }}{D\tau } = \frac{1-\zeta}{D\tau }$    

Figure 1.7 shows us that this approximation is also reasonable.

Figure 1.7: Approximation of $ \Psi $ for linearly interpolated opacity ($ \alpha $). Both computations are with unit length segments.
\includegraphics[width=.45\linewidth,bb=88 4 376 238,clip=true]{ray_integration/Psi_linear_alpha} \includegraphics[width=.45\linewidth,bb=88 4 376 238,clip=true]{ray_integration/Psi_average_alpha}
(a) $ \Psi $ with linearly interpolated opacity. (b) $ \Psi $ approximated with average opacity.

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.


next up previous contents index
Next: Improved Approximation Up: Linear Interpolation of Opacity Previous: Linear Interpolation of Opacity   Contents   Index
Kenneth D Moreland 2004-07-16