Manipulation of Liquid Using Cases in Virtual Space
Kenji Funahashi

Yuji Iwahori

Center for Information and Media Studies
Nagoya Institute of Technology
Nagoya 466-8555 JAPAN

Abstract

This paper describes a new method to realize an interactive manipulation of virtual liquid using a virtual case.
The proposed model represents the liquid in the free fall condition as particles, while it does that in the stay
condition as volume. The main purpose of this modelis the realization of virtual liquid manipulation, while
the generation of high quality computer graphics images
or simulating the exact behavior of the liquid, are not
the main. Our system with this proposed model makes
it possible to catch the liquid using the virtual case, tohold the liquid in it, then to ow away the liquid withtilting it. Also the system realizes the manipulation toskim the liquid from another liquid case.

1 Introduction

In the eld of virtual reality for the recent years,
many researches such as [1], [2], [3] have been performed
for the interactive manipulation in virtual space. In theconventional researches, the limitation is that users canmanipulate only the solid objects under these systems.
However, there are many situations that manipulate liquid or gas object, as in the cooking or in the amusement.
In the eld of the hydrodynamics, research on theanalysis of behavior of the liquid has been performed,
while in the computer graphics technology, the scene
image in a fog or that of water current have been represented by the particle based system [4]. However, thesestudies cost much calculation time and the direct application to the interactive manipulation of the virtual
liquid is still dicult.
In this paper, a new method to realize an interactive
manipulation of virtual liquid using a virtual case [5]is proposed. The proposed model represents the liquidin the free fall condition as particles, while it does thatin the stay condition as volume. The main purpose ofthis model is the realization of the virtual liquid manipulation, while the generation of high quality computer
graphics images or simulating the exact behavior of theliquid, are not the main. A virtual case is introduced
to detect the interference with liquid. We consider only
the interaction between the virtual case and the liquid
not that between the general object and the liquid.
Our system with this proposed model makes it possible to catch the liquid using the virtual case, to holdthe liquid in it, then to ow away the liquid with tilting
it. Also the system realizes the manipulation to skim
the liquid from another liquid case.

Crvirtual case

Figure 1: Virtual case and a sphere including it
2 Model for Virtual Liquid and Case
2.1

Virtual Liquid in Virtual SpaceIn this paper, we consider the liquid under the following conditions.
(1) free fall condition (such as owing water from acock).
(2) stay condition (such as holding water in a cup).
The proposed model represents the liquid in the condition (1) as particles. Each particle moves according
to the gravity and the inertia. It is assumed that thesize of the particle is ignored and each particle is notinterfered with other particles.
While the liquid in the condition (2) is represented
as volume. The exchange rate between each condition isassumed to be N [particles / volume]. When user falls
all liquid by tilting the case of the volume V , the volume
of liquid in it becomes 0 and the number of particles ofliquid in free fall condition increases by N V .
2.2
Model of Virtual Case
We consider a case with the convex shape and asphere including the case (Fig. 1). The center of thesphere is designated as C and its radius is designated asr. Then, the position of the case is represented by C .
The direction of the case is represented by ;  and(Fig. 2), while the tilt is represented by  and . When and  of a case are set to be 0 respectively, the statusmeans that it is not tilted.
Fig. 3 shows a virtual case with the liquid. First,
functions of the case with the liquid are de ned in thefollowing. The over ow point F is represented by the
relative vector from the point C .
F = f (; ; ):
(1)

yc
d1
d2
d3

θ

AAA
AAA
liquid

ψ

φ

V

xc

V

C

+

case

Figure 4: Volume considering thickness of virtual casezc

Figure 2: Representation of tilting of virtual caseover flow
point

AAAA
AAAA
AAAA

highest level

AAAA
AAAA
C

F

H height level ofliquid surface

volume ofliquidFigure 3: Each parameter of virtual case
When the volume of the liquid in a case is V (V  0),
the height level of the liquid surface H is represented by
the relative distance from the point C .
H = h(; ; V ):(2)
When the parameter V of the function h is over the
maximum volume Vm, H becomes F (F is de ned as
the vertical coordinate of F ). The above equation istranslated to
V = v(; ; H ):(3)
When the parameter H of the function v is under thecase, V becomes 0. When H is over the point F , V istaken as v(; ; F ) = Vm(; ) (F is independent of).
When the height level is H , de ne the volume under
H considering the thickness of case (Fig. 4) as
V = v (; ; H ):(4)
When the volume of liquid is Vm, V becomes Vm .
When the thickness of case is not considered, V is regarded as V .
y

y

y

+

exchange rate: N

stay

add the volume
of liquid in the case

Figure 5: Relation for two conditions of liquid (1)Vyparticles fall throughthe mouth of the casefalltime t is assumed when the description of the parameter t is omitted. Each particle is moved according to
the gravity and the inertia. The particles moved under
the prede ned threshold plane will be deleted for thedrawing.
3.1
Liquid in Free Fall Condition and Case
When the falling liquid (each particle) moves throughthe mouth of a case, the status of the liquid changes fromthe condition (1) to the condition (2), and the volumeof the liquid in it will be increased according to theexchange rate N (Fig. 5).
V (t) = V (t 0 1t) + n=N;(5)where n (n  0) means the number of particles whichmove through the mouth and V (t) means the assumed
volume. When the case dose not interfere with the liquid
in another case, let the assumed volume of the liquid in
the case at time t be V (t) =V (t) . Then the heightlevel is updated according to
H (t) = h(; ; V (t) ):
(6)
(0)

(0)

(1)

(0)

(1)

+

+

+

+

3 Interaction Model of Liquid and CaseFirst, the system gets the position and the direction(C(t); (t); (t); (t)) of the case moved by the user inthe virtual space. (This can be done using the 3-D position sensor.) In the following discussions, the value at

3.2

Liquid in Stay Condition and CaseIn this section, we describe the interaction model between a case and the liquid in another case (Fig. 6).
In the following, let each case be designated as case 1
and case 2 respectively, also let the symbol of each casebe designated as subscript 1 and 2 for the distinction.
When next equation holds at time t, case 1 and theliquid in case 2 are interfered each other.
C 0 r < C + h ( ;  ; V );
(7)
1y

1

2y

2

2

2

(0)
2

vertical axis

vertical axis

case 1

AAA

F1y

C1y
C2y

h2(V2(0))

C2y + H2 - C1y

Vm1+

C1y

r1

C2y

H2

liquid surfaceof case 2
V2(0)U21: upheld
volumeV2(1)case 2

Figure 6: Interference between virtual case and liquid of another casewhere C is the vertical coordinate of the position C ofcase j. When the interference is detected, let the volume
that case 1 upholds the height level of case 2 be U  0.
Let the volume that other cases uphold the height levelof case 2 be
U =
U :
(8)
jy

j

X

2

21

2j

j

When case 1 and the liquid in case 2 are interferedeach other and next equation holds, the situation is thatthe part of case 1 under the over ow point interfereswith the liquid surface of case 2.
C + h ( ;  ; V
+ Vm ) < C + F : (9)When the above equation does not hold, the situationis that the liquid in case 2 ows into case 1.
2y

3.2.1

2

2

(0)
2

2

+
1

1y

1y

Upholding of Liquid Surface

When a case and the liquid surface are interfered eachother, case 1 upholds the liquid surface of case 2. The
height level H of case 2 should satisfy next equation.
H = h ( ;  ; V
+ U );
U = v ( ;  ; C + H 0 C ):(10)
Let the volume in each case V be updated as V .
Then the height level of case 1 is determined from theequation (6).
2

2

2

21

+
1

2

2

1

1

(0)
2

21

2y

2

1y

(0)

(1)

j

j

Then, the height level of case 1 is determined from theequation (6).
H = (C + F ) 0 C :(12)V= v ( ;  ; H ) 0 U :(13)V+V =V +V :(14)
When equation (11) does not hold, the liquid surfaceof case 2 should be higher than the height of the overow point of case 1 (Fig. 8). Then, the volume V andthe height level H of case 1 are set as the maximum
volume Vm and the radius r , respectively, where theliquid surface of case 1 is not considered (not drawn).
The volume and the height level of case 2 are determinedfrom the equation (14) and next equation.
H = h ( ;  ; V
+ U ):(15)
When the liquid does not ow into another case, user
can skim the liquid with the case by the above process.
3.3
Flowing Away Liquid from Case
When next equation holds at time t by the above
interference and tilting of a case, the liquid ows awayfrom the case (Fig. 9).
V+ U > Vm:
(16)
The part of the liquid in the case, which is expressedusing the volume, ows away at the over ow point F
as N (V + U 0 Vm) particles. The volume in the caseat time t is determined as
V (t) = Vm 0 U:
(17)
While if the equation (16) does not hold, the liquid dose
not ow away and the volume V (t) becomes V (t) .
3.4
Drawing and Other Processes
The virtual cock which ows the in nite liquid is dened for the experiment of the interaction between avirtual case and the liquid in the free fall condition. After the above processes, liquid particles are generated
from the cock.
Actual shape of the liquid surface of each case is generated for the drawing of the CG image based on the
2

1y

(1)
2
(1)
1

2

1y

2

2

(1)
2

2y

2

(0)
1

21

(0)
2

(1)
1

1

1

1

2

2

2

2

(1)
2

21

(1)

(1)

3.2.2

Flowing of Liquid into Case

When the liquid in case 2 ows into case 1 and the next
equation holds, the height level of liquid in case 2 shouldbe the height of the over ow point of case 1 (Fig. 7).
V+ U 0 v ( ;  ; C + F 0 C )< Vm 0 V :(11)When the liquid ows into a case, case 1 upholds theheight level of case 2 with the volume U = Vm . The
height level of case 2 should be the height of the overow point of case 1 (equation (12)). The volume of eachcase is determined from the equations (13) and (14).
(0)
2

21

2

2

2

1y

1y

2y

1

(0)
1

21

+
1

(1)

vertical axis

vertical axis

AAAAAA
AAA
AAA

C1y

F1y

C1y

Vm1 - V1(0)C2yC1y + F1y - C2y

C2y

AAA
AAA

F1y
H2

V1(1)

V1(0)

V2(0)

V2(1)

vertical axis

vertical axis

Figure 7: Flowing liquid into virtual case (1)AAAAAA
AAA
AAA

C1y

F1y

C1y

C2y

C2y

AAA
AAA
AAA

F1y

V1(1) = Vm1

H2

V1(0)

V2(0)

V2(1)

Figure 8: Flowing liquid into virtual case (2)the volume is overthe maximum volume

be made based on the shape of each case respectively. In this experimental system, a hemisphere is used
as a moved case 1 and a cube is used as a xed case 2.
Two volume functions with height level parameter are

stay

U

exchange rate: N( ) = (0H + 3r H + 2r )=3; 0r < H < F ; (18)v (H ) = a (H + a=2); 0a=2 < H < a=2: (19)
3

v1 H

3
1
2

2

flow liquid
as particles

fall

Figure 9: Relation for two conditions of liquid (2)shape of the case and the height level. When case 1 interferes with the liquid in case 2 and the height level ofcase 2 is not higher than the over ow point of case 1,
it is necessary that the part of the liquid surface of case
2 should be removed for case 1.
Then, each particle, each case, its liquid surface andits shadow are drawn.
4 System

For the implementation of a system, each functionof each case expressed by equations (1) - (4) should

3
1

1

1y

If the height level H is under the case, v (H ) is set to
0. If H is over F , v (H ) is set to Vm . The thicknessof the case is ignored in this system. Two height level
functions with volume parameter can be obtained bytranslating the above functions. The over ow pointof case 1, in general, can be obtained by the geometricmethod. In this paper, each geometrical expression isomitted to avoid the complexity. The over ow point ofcase 2 is set to one vertex and it is xed.
Equation (10) to calculate the height level of case 2that is upheld by case 1 can be solved by the algebraic
method for these cases, i.e., a hemisphere and a cube.
However, this system gets the height level by the following numerical method. First, the initial value of theheight level of case 2 is set to the value that the liquidin case 2 is not interfered with case 1. Then, the heightlevel is updated from the following equations until the
j

jy

j

j

 The feeling of the movement of a virtual cup is s-maller than that of the actual movement of realcup. It is dicult to keep the virtual cup (the liquid surface in it) horizontally.
For the former, introducing stereo graphics may solve
the problem of the sense of depth. For the latter, a calibration is necessary to consider the size and the positionof the screen. Introducing the force feedback will also
be required for the representation of weight of the liquid
in a case.

(θ1, φ1)

AAAAAAAAAAAAAAAAAAAAAAAA

r1 C1

C2

case 1case 2aFigure 10: Shape of two cases de ned in experiment
systemheight level of case 2 is converged.
H2(0)U21(i)= h ( ;  ; V );= v ( ;  ; C + H 0 C );= h ( ;  ; V + U ); i  0: (20)H2(i+1)

2

2

2

(0)
2

+
1

1

1

2y

2

2

2

(0)
2

5 Experimental Results

2(i)

1y

21(i)

Using the model mentioned above, we implemented asystem for the manipulation of the virtual liquid using
virtual cases in C language on a graphics workstation
SGI O2. The exchange rate N is taken to be 10 [numberof particles / cc]. The case can be moved by a user and
it is implemented as a hemisphere whose radius is 5 cm,
and another xed case is a cube whose edge length is
30 cm (Fig. 10). In the experiment, 1 cc of the falling
liquid is generated per 1 CG frame.
An example operation is shown in Fig. 11. This system gets the position and the direction of the real case
via the motion sensor using a low-frequency magnetic
eld. As shown in the Fig. 12(left), the user can catchthe falling liquid using the virtual case, hold the liquid
in it, then ow away the liquid. Fig. 12(right) showsthat the user can skim the liquid from another case.
This system can refresh its screen at 24 frames/sec as
the average speed for the representation that there areabout 500 particles.
Through this virtual liquid manipulation system in
our laboratory, we get some positive evaluations suchthat "I feel that I really manipulate the water (liquid)using a cup." The real cup with sensor is given to users
and only what users can manipulate the water (liquid)in the screen using a real cup was explained to users. As
the time to make users to feel that they can manipulate
the liquid freely, it is 65, 75, 125, 41, 53, 42, 40, 48,
62 and 66 seconds respectively, and the average time isabout 1 minute. From these results, it is considered that
this system can keep the essential characteristics of real
liquid manipulation. Other comments and the remained
problems are as follows: They could recognize the feeling about the positionof virtual cup from the shadow of it, but they tend
to take notice to the shadow. They are able to catchthe falling liquid more easily if the shadow of eachparticle is drawn.

6 Conclusion

In this paper, we proposed a model for the liquid
manipulation using virtual cases and implemented anexperimental system as a virtual reality system. Using
the virtual case, the system can catch the falling liquid,skim the liquid from another case, hold the liquid andow away the liquid at an interactive refresh rate. Users
have an impression close to that in the real world.
The system proposed in this paper is under the stageof the realization of the basic functions, and the following points are remained as the future subjects.
 Manipulation of the liquid using the cases with thegeneral shape which is expressed by polyhedron.
 Interaction with the liquid under the third condition such as the water current in the river.
The addition of these functions will be required. We
consider the further realization method for a generalpolyhedron case. At starting up a system, it is considered that the LUT (look up table) is made to calculate the equations (1)-(4). It is also considered thata concave polyhedron case should be divided into someneighboring convex polyhedrons.
Acknowledgments
We thank our colleagues in our laboratory for useful
discussions.
References[1] M. Shinya and M.-C Forgue, \Laying out objects
with geometric and physical constraints," The Visual Computer, Vol. 11, No. 14, pp. 188-201, 1995.
[2] D. Bra , \Interactive simulation of solid rigid bodies," IEEE Computer Graphics and Applications,Vol. 15, No. 3, pp. 63-75, 1995.
[3] K. Funahashi, T. Yasuda, S. Yokoi, J. Toriwaki, \Knowledge and Model for Manipulation Using
Tools with a Virtual Hand in Virtual Space," (inJapanese) Trans. VRSJ, Vol. 3, No. 3, pp. 167-176,
1998.
[4] N. Chiba, S. Sanakanishi, K. Yokoyama, I.
Ootawara, K. Muraoka, N. Saito, \Visual Simulation of Water Currents Using a Particle-based Behavioural Model," The Journal of Visualization andComputer Animation, Vol. 6, pp. 155-171, 1995.
[5] K. Funahashi, Y. Iwahori, \Interactive Manipulation of Virtual Liquid Based on Particle and Volume Model," (in Japanese) Tech. Rep. IEICE, Vol.
99, No. 723, MVE99-80, pp. 25-30, 2000.

Figure 11: Appearance of proposed system

Figure 12: Examples of manipulation of liquid using virtual case