
282 III Lighting
f
0
f
1
f
2
z
x
y
Figure 5.14. Layered heightfields for the x axis.
These heightfields define the split between neighboring cells. They produce a
collection of cells that can be indexed using three integers (i, j, k), where 0 ≤ i ≤
n
x
,0≤ j ≤ n
y
,and0≤ k ≤ n
z
. The resulting arrangement of cells are like a
distortion of an n
x
× n
y
× n
z
array of voxels.
The region covered by the cell (i, j, k) occupies the set of points (f
i
(y, z),
g
j
(x, z),h
k
(x, y)) where x ∈ (i, i +1),y ∈ (j, j +1),andz ∈ (k, k +1).
Defining the distortion in this way does not allow arbitrary distortions to be
represented. For instance, a twist distortion (like the “twirl” distortion