Graphics Reference
In-Depth Information
number at the point of impact, and are then decreased as the wave passes the obstacle. As always, sto-
chastic perturbation should be used to control both speed and direction.
For a more complete treatment of modeling height-field displacement-mapped surface for ocean
waves using a fast Fourier transform description, including modeling and rendering underwater envi-
ronmental effects, the interested reader is directed to the course notes by J. Tessendorf [ 19 ].
Finding its way downhill
One of the assumptions used to model ocean waves is that there is no transport of water. However, in
many situations, such as a stream of water running downhill, it is useful to model how water travels
from one location to another. In situations in which the water can be considered a height field and
the motion is assumed to be uniform through a vertical column of water, the vertical component of
the velocity can be ignored. In such cases, differential equations can be used to simulate a wide range
of convincing motion [ 10 ] . The Navier-Stokes equations (which describe flow through a volume) can
be simplified to model the flow.
To develop the equations in two dimensions, the user parameterizes functions that are in terms of
distance x . Let z¼h ( x ) be the height of the water and z¼b ( x ) be the height of the ground at location x .
The height of the water is d ( x )
b ( x ). If one assumes that motion is uniform through a vertical
column of water and that v ( x ) is the velocity of a vertical column of water, then the shallow-water equa-
tions are as shown in Equations 8.12 and 8.13 , where g is the gravitational acceleration (see Figure 8.8 ).
Equation 8.12 considers the change in velocity of the water and relates its acceleration, the difference in
adjacent velocities, and the acceleration due to gravity when adjacent columns of water are at different
heights. Equation 8.13 considers the transport of water by relating the temporal change in the height of
the vertical column of water with the spatial change in the amount of water moving.
@v
¼h ( x )
@t þ v @v
@x þ g @h
@x ¼
0
(8.12)
@d
@t þ @
@x ðvdÞ¼
0
(8.13)
h 0
h 2
h 1
h n 1
h 3
...
b 0
b 1
b n 1
b 2
b 3
v n 2
v 0
v 1
v 2
v 3
FIGURE 8.8
Discrete two-dimensional representation of height field with water surface
h
, ground
b
, and horizontal water
velocity v.
 
Search WWH ::




Custom Search