25
between different materials. This property implies that the scalars need to be accurate
only for cells that intersect the inter-material boundary. We call a cell homogenous if
its eight corners are marked as the same material; otherwise, a cell is inhomogeneous.
For the spherical brush, we use the following distance metric for the new scalar field
g(x, y, z) = ∣r- λ∕x2 + y2 + z2∖
if (τ, y, z) is part of an inhomogeneous cell (3.2)
g(x,y,z') = l otherwise
Here r is the radius of the brush, and x ∈ {0,1,..., nx — 1} denote the grid space
coordinates where nx is the number of grid points in the x direction, and similar
definitions holds for the variables y and z.
From Eq. 3.2 for any grid point (τ, y, z) on a inhomogeneous cell, the associated
scalar is bounded by 0 ≤ g(x,y,z) ≤ vz3. Because the Euclidean distance function
ensures that the distance between any two points in a cell cannot exceed -√z3. In
contrast, the squared distance function g(x, y, z) = ∖r2 — (x2 + y2 + z2)∣ does not have
this property; that is, the absolute difference ∣g(pι) — <7(p2)∣ for any two points P1,P2
within a single cell is unbounded.
The bounded property of the Euclidean distance enables us to easily convert to an
8-bit representation, and it concentrates the precision only to inhomogeneous cells.
This boundedness means that we can minimize the amount of texture memory and
retain sufficient accuracy for our representation.