SA-E3-4

SCIS & ISIS 2008

Representation of Wave Surface
on Virtual Water Manipulation
Takuya Tanabashi

Hirotaka ItohKenji Funahashi

Nagoya Institute of Technology Nagoya Institute of Technology
Gokiso-cho, Showa-ku,
Gokiso-cho, Showa-ku,
Nagoya, Japan
Nagoya, Japanemail:tana@center.nitech.ac.jp

Abstract—In this paper, a model to realize an interactive manipulation of virtual water using a virtual container is describedfirst. Then, this model is extended to represent the wave surface
in the container. The mesh model are introduced for the wave
representation so that the waves are propageted. Proposed systemwith this integrated model makes it possible to swing the water
surface and to spill and/or stir the water.

I. I NTRODUCTION
Recent years, there are many studies of virtual reality thatusers can manipulate only the solid objects [1][2]. But, in thefield of industry and the medical service, there are demands
to make it possible to manipulate virtual fluid. So virtual fluidstudies using the technique called SPH is performed [3][4]. In
these studies, expression of correct fluid behavior is realized.
However, there are some problems at a point of the drawing
speed, and direct application to the interactive manipulation isstill difficult.
On the other hand, the virtual water model named Particle
and Volume Model is proposed [5], where a virtual container
is introduced to detect the interference with water, and only
the interaction between the virtual container and the water istreated. The main purpose of this model is the realization of
the virtual water manipulation, while the generation of highquality computer graphics images nor simulating the exact
behavior of the water are not the main. In addition, virtualwater model to focus waves and splash of the water surface
is proposed [6][7]. This model enables high speed processing
without calculating the currrent water behavior.
The proposed method improves the Particle and Volume
Model at the surface. The mesh model is used as the wave
representation so that and the waves are propageted.
Our system with this proposed model makes it possible tocatch the water using the virtual container, to spil the waterby tilting the container, and to skim the water from anotherwater container. Further, our system enables to wave the water
surface with swinging the container.
II. WATER M ANIPULATION U SING C ONTAINER
In this section, a model to realize an interactive manipulation of virtual water using a virtual container is discribed [5].
Our system is based on this virtual water model.

Yuji Iwahori

Nagoya Institute of Technology
Chubu University
Gokiso-cho, Showa-ku,
1200 Matsumoto-cho,Nagoya, Japan
Kasugai,email:kenji@nitech.ac.jp
Aichi, Japan

A. Virtual Water in Virtual SpaceIn this study, the water is concidered under the following
conditions.
(1) free fall condition (such as flowing water from a faucet)(2) stay condition (such as holding water in a cup)
The proposed model represents the water in the condition(1) as particles. Each particle moves according to the gravity
and the inertia. It is assumed that the size of the particle
is ignored and each particle does not interfere with otherparticles.
While, the water in the condition (2) is represented asvolume. The exchange rate between each condition is taken
to be N [number of particles / volume]. When user falls allwater by tilting the container of the volume V , the volume ofwater in the container becomes 0 and the number of particles
of water in free fall condition increases by N V .
B. Virtual Container in Virtual SpaceA container with the convex shape is used and a sphereincluding the container (Fig. 1) is introduced for detecting
the interference. The center of the sphere is designated as C
and its radius is designated as r. Then, the position of thecontainer is represented by C. The direction of the container
is represented by θ, φ and ψ (Fig. 2), while the tilt parameters
are represented by θ and φ. First, a container is rotated by φon axis xc , and rotated by θ on axis zc . Then it is rotated byψ on axis yc . When θ and φ of a container are set to be 0
respectively, the status means that it is not tilted.
Fig. 3 shows a virtual container with the water. Functionsof the container with the water are defined in the following.
The over flow point F is represented by the relative vector
from the point C.
F = f (θ, φ, ψ).

(1)

When the volume of the water in a container is V (V ≥ 0),
the height level of the water surface H is represented by the
relative distance from the point C.

1460

H = h(θ, φ, V ).

(2)over flowpointhighest level

C
r

C

F

H
V

virtual container
Fig. 1.

volume ofwater

Virtual container and a sphere including it

d1

d2
d3

θ

yc

Fig. 3.

Each parameter of virtual container

ψ

φ

water

xc
C

V
V

zc
Fig. 2.

height level ofwater surface

Fig. 4.

+container

Volume considering thickness of virtual container

Representation of tilting of virtual container

When the parameter V of the function h is over the
maximum volume Vm, H becomes Fy (Fy is defined as thevertical coordinate of F ). The above equation is translated to(3)

V = v(θ, φ, H).

When the parameter H of the function v is under thecontainer, V becomes 0. When H is above the point F , V
is taken as v(θ, φ, Fy ) = Vm(θ, φ) (Fy is independent of ψ).
When the height level is H, define the volume under H
considering the thickness of container (Fig. 4) as(4)

V + = v + (θ, φ, H).

When the volume of water is Vm, V becomes Vm . Whenthe thickness of container is not considered, V + is regarded
as V .
++

C. Interaction Model of Water and ContainerFirst, this system gets C(t), θ(t), φ(t) and ψ(t); the position
and the direction of the container moved by the user in thevirtual space. (This can be done using the 3-D position sensor.)
In the following discussions, the value at time t is assumed
when the description of the parameter t is omitted. Eachparticle is moved according to the gravity and the inertia. The
particles moved under the predefined threshold plane will bedeleted for the drawing.
1) Water in Free Fall Condition and Container: When thefalling water (each particle) moves through the mouth of acontainer, the status of the water changes from the condition(1) to the condition (2), and the volume of the water in it will
be increased according to the exchange rate N (Fig. 5).

V (t) = V (t − ∆t) + n/N,

(5)

where n (n ≥ 0) means the number of particles which movethrough the mouth. When the water in the container is notinterfered with another container, the height level is updated
simply according to the equation (2).
2) Water in Stay Condition and Container: In this section,
it describes the interaction model between a container and thewater in another container. In the following, let each container
be designated as container 1 and container 2 respectively, also
let the symbol of each container be designated as subscript 1
and 2 for the distinction. When the equation (6) holds,
container 1 and the water in container 2 are interfered eachother (Fig. 6).
C1y − r1 < C2y + h2 (θ2 , φ2 , V2 ),C2y + h2 (θ2 , φ2 , V2 + Vm+
1 ) < C1y + F1y ,

(6)
(7)

where Cjy is the vertical coordinate of the position Cj .
When the equation (7) also holds, the situation is that thepart of container 1 under the over flow point interferes withthe water surface of container 2. Then, let the volume that
container 1 upholds the height level of container 2 be U .
When it does not hold, the situation is that the water incontainer 2 flows into container 1, the volume of the waterin each container is changed with the appropriate rate [5].
3) Spilling water from Container: When next equation
holds at time t by the above interference and tilting of acontainer, the water spills from the container (Fig. 7).

1461

V + U > Vm.

(8)

fall

particles fall throughthe mouth of the container

the volume is overthe maximum volume

exchange rate: N

stay

U

exchange rate: N

add the volume
of water in the container

flow wateras particles
Fig. 7.

Fig. 5.

stay

fall

Relation between two conditions of water (2)Relation between two conditions of water (1)vertical axis

X

C 1y
C 2y

point 1

container 1
F 1y

V m1+

h2(V 2)

r1

xxxxx
xxxxxxxxx
point2 x x x x x x x x x xxxxxxxxxxx
xxxxxxxxxx
xxxxxxxxx
x x x x x x point4
xwater surfaceof container 2

U: upheld
volumecontainer 2

V2

point 5point 3Z

Fig. 6. Interference between virtual container and water of another container
Fig. 8.

The part of the water in the container, which is expressedusing the volume, spills at the over flow point F as N (V +U − Vm) particles according to the gravity. The volume in thecontainer at time t is determined as
V (t) = Vm − U.

(9)

While if the equation (8) does not hold, the water dose notspill.
III. M ODEL OF WAVEAs another virtual water study that we refer, there is amethod to express water wave and splash for virtual swimmingas artwork; Swimming Across the Pacific [6][7].
A. Representation of Wave
This water simulation is based on the method in which thewater surface is modeled as a thin film. For the sea surface
plane waves, the systems use recurrence relations to solve thepartial differential equation for the 2D wave. The sea surface
is modeled as a mesh in this method. The height of the grid at
point [i][j] at time t + ∆t on the sea surface is h[i][j][t + ∆t].
And the height h[i][j][t + ∆t] is determined ash[i][j][t + ∆t] =(h[i − 1][j][t] + h[i + 1][j][t]+h[i][j − 1][t] + h[i][j + 1][t])/ (2 − h[i][j][t − ∆t]) .
(10)

A meshed surface and grid points in a polygon

B. Interaction between surface and objects
In this system, the vitual object consists of some boundingboxes. When they move and intersect with any of the water
grids, the height of the gird is reset as follows:• When the bounding box goes into a water grid, the heightof the grid increases with a predefined value.
• When the bounding box goes out from the water surface,
the height of the grid decreases with a predefined value.
When these two conditions occur, the system makes waves
and propagates them.
IV. R EPRESENTATION OF WAVING WATER
A. Formation of Water Surface
In our system, a part of waving water is based on themodel of a wave mentioned above. The model of the wave,
the surface is limited to only rectangle, while, the surface of
virtual water in a container is represented by any polygon. The
water surface is modeled as a mesh, so we note grid points todisplay the multilaternal surface (Fig. 8).
Then, the grid points shown as X in the Fig. 8 are simply
calculated, and they form the water surface in the container.
In this way, any multilaternal surface can be displayed in ashort time.
B. Wave with Shaking Container
For the water in the glass in reality, a wave occurs according
to the movement of the glass. This paper realizes the behavior

1462

TABLE IC OMPARISON OF DRAWING UPDATE SPEED

X

t1

d(t)

t 1’

t5

Mouse

t 5’
t2

Motion senser

t 2’
t4

Only drawing
Operating
Only drawing
Operating

Conventional model
250fps230fps65fps
65fps

Proposed model
120fps
80fps
60fps
60fps

t 4’
t3
t 3’

V. E XPERIENTAL R ESULTS
Z

Fig. 9.

Movement of the water surface and moving vector
X

t1

d(t)

t2

d(t)
t5

θ(5)

d(t)

θ(4)

θ(1)
d(t)
θ(2)

θ(3)

t4
d(t)

t3

Z

Fig. 10.

Included anglesof the surface by performing a simple vector calculation whena container is moved. The moving vector of its poisition isdefined as d(t). The container moves three-dimensional virtual
space in general, but we treat 2 dimensions of d(t) to pay
attention to the movement of the surface (Fig. 9,10).
When the container moves, the system judges the included
angles θ(n). When θ(n) are less than 180 degree, waves are
generated at the face of wall.
C. Virtual Water
1) Interaction between the Container and the Surface:
When a countainer includes water of other containers, a holeis opened in the surface according to shapes of the container.
In addition, the behavior is realized that when the water ofcontainer reachs the surface or moves in water according to
the above-mentioned model of the wave.
2) Interaction between the Falling Water and the Surface:
When the water (particles) in free fall condition reaches thesurface, waves are generated at the surface. We convert theposition Pi (t − ∆t) of particles reaching the surface justbefore that into a container coordinate system from a threedimensional image coordinate system. And according to theposition, it decreases the height of the grid point.

The virtual water system using the model mentioned above
was implemented with C language. The specification of PC
used is the following; CPU: AMD Athlon(tm) MP Processor
1.2GHz × 2. The exchange rate N is taken to be 10 [numberof particle / cc]. In the experiment, 1 cc of the failling water
is generated per 1 CG frame.
An example operation is shown in Fig. 11. Our system has
two containers. One is a movable container and it can becontrolled by the user. Another is a fixed large container. We
gets the position and the direction of the movable containerfrom a real cup with the motion sensor using a low-frequentry
magnetic field. The device we used is 3SPASE ISOTRAK2 ofPolhemus company.
As shown in the Fig. 12, the user can spill the water and thesurface waves when the falling water reaches another water
surface. Fig. 13 shows that containers interact with virtualwater. The surface of virtual water waves according to moving
the container in the water. If we replace the container to a
spoon, we can experience the virtual water manipulation using
a virtual spoon, as shown in Fig. 14.
We compare our system with Particle and Volume model(conventional approach) from the aspect of the drawing update
speed [fps].
The results are shown in TABLE1, and it is suggested that
our system has enough processing speed for an interactive
manipulation of virtual water. Through the experiments of thisvirtual water manipulation system in our laboratory, we got
some positive evaluation like;• It looks like a real water considerably.
• It feels that the virtual container and virtual water are
operated by myself.
These results lead to the conclusion that an interactive
manipulation of virtual water was achieved.
VI. C ONCLUSIONSIn this paper, we proposed a model for water manipulaion
using virtual containers and realized the implementation ofan experimental system as a virtual reality system. Using
the virtual container, the system can swing the water, andwave the water surface at an interactive refresh rate. Also
the system can catch the falling water, skim the water fromanother container. The representation of splash in the Virtual
Swimming System has been extended to achieve our system.
The following subjects are remained as the future subjects.
• Representation of the virtual current.

1463

Fig. 11.

Environment of experimentInteraction with the water which has information ofcolors.
• Interaction between the virtual water and the virtual
object which has information of weight.
As an application of this approach, there is a work toapply our system with VR contents. The ideas are now underconsideration but ”Virtual Cooking System” is developped in
our laboratory as an example [8].
•R EFERENCES[1] S.Suzuki, M.Yamada, S.Miyazaki, J.Hasegawa, T.Yasuda, S.Yokoi. Realtime Elastic Object Interaction Constructed by Computation Accelerated
Elastic Models, The Jornal of the Society for Art and Science, Vol.2,
No.1, pp.8-14, 2003.
[2] X.Guo, J.Hua, H.Qin. Touch-Based Haptics for Interactive Editing on
Point Set Surfaces, IEEE CG& A, pp.31-39, 2004.

[3] M.Muller, S.Schirm, M.Teschner. Interactive Blood Simulation for Virtual
Surgery Based on Smoothed Particle Hydrodynamics, ACM Technology
and Health Care, Vol.12, No.1, pp.25-31, 2004.
[4] M.Imura, T.Amada, Y.Yasumuro, Y.Manabe, K.Chihara. Interaction with
Virtual Fluid in Mixed Reality Environment, Transactions of the Virtual
Reality Society of Japan, pp.549-552, 2005.
[5] K.Funahashi, Y.Iwahori. Representation of Swinging Liquid on Virtual
Liquid Manipulation, Proc. ICAT2001, vol.11, pp.179-184, 2001.
[6] K.Funahashi, Y.Iwahori. Expression of Water Wave and Splash forInteractive Virtual Swimming, Transactions of the Virtual Reality Societyof Japan, Vol.10, No.3, pp.421-428, 2005.
[7] S.Fels, Y.Kinoshita, T.G.Chen, Y,Takama, S.Yohanan, S.Takahashi,
A.Gadd, K.Funahashi. Swimming Across the Pacific: A VR Swimming
Interface, IEEE CG& A, Vol.25, No.1, pp.24-31, 2005.
[8] S.Oguri, K.Funahashi. A Study of a Group of Individual Bodies Modelfor VR Cooking System, The Graduation Thesis of Nagoya Institute ofTechnology, 2008.

1464

Fig. 12.

Fig. 13.

Interaction between container and surface

Fig. 14.

Interaction between container and surface

Falling water

1465