
be evaluated for any knot positions and distance pa-
rameter Λ. The generation of a closed-form represen-
tation of an orthogonal basis for variable knot posi-
tions and Λ has to be done only once as it does not
depend on the SPH kernel used. However, the ex-
plicit expression of the approximation error follow-
ing (4) requires closed-form solutions of the integrals
defining the inner products
⟨
A,B
Λ
⟩
for orthogonal ba-
sis functions A. In the case of an SPH kernel defined
by a continuous piecewise polynomial function such
as the cubic B-spline kernel (1), this can clearly be
achieved. In any case, as the symbolic computations
are rather involved, computer algebra systems are of
great help during this preparatory process.
We have conducted this process for the cubic B-
spline kernel, going to considerable length to find a
global optimizer for many discrete Λ. For Λ close to
the upper bound q, however, we have found the evalu-
ation of some of the formulae to become instable. To
obtain reliable results, we employed the GNU MPFR
library to perform the computations in multiple preci-
sion arithmetic. Since we have not encountered any
severe problems during these optimizations, we have
reason to hope they are manageable for any piecewise
polynomial SPH kernel function.
4 QUANTIZATION TO PREVENT
HIGHER-ORDER ERRORS
4.1 Higher-Order Rounding Error
Propagation
For the stated efficiency reasons, the recursive com-
putation of polynomial coefficients according to (2)
is an integral component to our particle-wise approx-
imation approach. However, it comes at a substan-
tial price which may not be obvious at first glance.
Directly applying (2) during the compositing sweep
using floating-point numbers is problematic because
rounding errors are propagated at higher order from
front to back along the viewing ray, resulting in unre-
liable coefficients especially for higher t.
To illustrate the issue, consider a piecewise poly-
nomial function modeling the contribution of a small
number of particles. Clearly, the last piece polyno-
mial of this approximation should be the zero polyno-
mial. However at its starting knot, its value is most
probably not computed to be zero but some value
close to zero, due to rounding errors in the compu-
tation. Although this zeroth-order distortion may be
negligible by itself, small rounding errors in higher-
order terms cause large errors further down the ray.
We may thus find the polynomial’s value to have
grown far from zero for larger t.
The direct effect of these errors is an unstable re-
sult: When using a transfer function with focus on
lower attribute values typically reached just before
leaving the volumes of influence of the last contribut-
ing particles, the resulting pixel colors are highly un-
stable and the generated images show strong “sprin-
kling” artifacts, as shown in Figure 2 (a). Hence,
solving this problem is indispensable if we want our
higher-order ray casting concept to be of any use.
There are several conceivable measures for allevi-
ation. One is to limit the maximum distance on the
ray that the error may use to grow by introducing a
number of special reinitialization knots at predeter-
mined t on all rays, as performed for the rendering
of Figure 2 (b). When processing a particle during
the first sweep, in addition to the knots encoding its
higher-order approximation as difference coefficients,
we also add to all covered reinitialization knots the
localized coefficients of this particle’s contributions.
Later when processing the sorted sequence of knots,
whenever we encounter a reinitialization knot, we di-
rectly take the coefficients attached to it instead of
computing the coefficients following the update rule
(2), thus eliminating the effect of past errors for fu-
ture pieces. However, this approach not only intro-
duces the complexity of two different kinds of knots
but also can only partially solve the problem. Besides,
defining how many reinitialization knots to utilize is
non-trivial.
Clearly, an alternative would be to avoid the cause
of higher-order error propagation altogether and pro-
ceed to a direct, possibly localized, coefficient repre-
sentation of the polynomials, considering for the com-
putation of each result piece only the contributions
with overlapping support. While this would most
probably facilitate stable results, it would mean ac-
cepting the expense of determining for each piece the
set of relevant contributions.
4.2 Exact Arithmetic Through
Quantization
We propose yet another approach to fully avoid
rounding errors during the computation of (2), namely
by transferring all involved quantities from floating-
point to fixed-point numbers, which allow an exact
arithmetic. More precisely, we slightly shift all num-
bers encoding the individual contribution approxima-
tions into integer multiples of some quantum values,
a process we call quantization. While this increases
the approximation errors for the individual contribu-
tions, the update operations in (2) are reduced to exact
Particle-Wise Higher-Order SPH Field Approximation for DVR
721