A Model for Liquid Manipulation Using Vessel in Virtual Space
Kenji Funahashi
andYuji Iwahori
Center for Information and Media Studies, Nagoya Institute of Technology
Nagoya 466-8555 Japan

ABSTRACTThis paper describes a method to realize an interactive manipulation of virtual liquid using virtual vessels which are expressedby the general convex shape polyhedron. We have proposed theliquid manipulation model which has some functions to treat
the relation between the volume of liquid in a vessel and theheight level of liquid surface in it while it is tilted. For a generalshape vessel, the look up table to calculate the above functions
is implemented. Our system with this proposed model makes it
possible to catch the liquid using the virtual vessel, to hold theliquid in it, then to spill the liquid by tilting it. Also the system
realizes the manipulation to skim the liquid from another liquid
vessel.
Keywords: Virtual Reality, Virtual Liquid, Interactive Manipulation, Liquid Model, Particle and Volume Model

1. INRTODUCTION
In the field 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 the conventional researches,
the limitation is that users can manipulate only the solid objects
under these systems. However, there are many situations thatmanipulate liquid or gas object, as in the cooking or in theamusement.
In the field of the hydrodynamics, research on the analysis
of behavior of the liquid has been performed, while in thecomputer graphics technology, the scene image of water current
have been represented by real-time simulation [4], [5], [6].
However, an interactive manipulation of the virtual liquid is notconsidered in that and other studies.
In this paper, an interactive model to manipulate virtual
liquid using a virtual vessel [7] is described first. A virtual vessel
is introduced to detect the interference with liquid. We consider
only the interaction between the virtual vessel and the liquid notthat between the general object and the liquid. Then, a method is
extended to realize an interactive manipulation of virtual liquidusing a virtual vessel which is expressed by the general convex
shape polyhedron. The model represents the liquid in the free
fall condition as particles, while it does that in the stay conditionas volume. It has some functions to treat the relation between
the volume of liquid in a vessel and the height level of liquidsurface in it while it is tilted. For a general shape vessel, the lookup table to calculate the above functions is implemented. The
main purpose of this model is the realization of the 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 tocatch the liquid using the virtual vessel, to hold the liquid in it,then to spill the liquid by tilting it. Also the system realizes the
manipulation to skim the liquid from another liquid vessel.

2. MODEL FOR VIRTUAL LIQUID AND VESSEL
Virtual Liquid in Virtual SpaceIn this paper, we consider the liquid 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 liquid in the condition (1) asparticles. Each particle moves according to the gravity and theinertia. It is assumed that the size of the particle is ignored andeach particle does not interfere with other particles.
While, the liquid in the condition (2) is represented as volume. The exchange rate between each condition is assumed to
be N [particles / volume]. When user falls all liquid by tilting thevessel of the volume V , the volume of liquid in it becomes 0 andthe number of particles of liquid in free fall condition increases
by NV .
Model of Virtual Vessel
We consider a vessel with the convex shape and a sphere including the vessel (Fig. 1). The center of the sphere is designated as C
and its radius is designated as r. Then, the position of the vessel
is represented by C. The direction of the vessel is represented
by θ,φ and ψ (Fig. 2), while the tilt is represented by θ and φ.
First, a vessel is rotated by φ on axis xc, and rotated by θ on axis
zc . Then it is rotated by ψ on axis yc . When θ and φ of a vessel are set to be 0 respectively, the status means that it is not tilted.
Fig. 3 shows a virtual vessel with the liquid. First, functions of the vessel with the liquid are defined in the following.
The over flow point F is represented by the relative vector fromthe point C.
F = f (θ,φ,ψ).
(1)
When the volume of the liquid in a vessel is V (V ≥ 0), the heightlevel of the liquid surface H is represented by the relative distancefrom the point C.
H = h(θ, φ,V ).
(2)
When the parameter V of the function h is over the maximum volume Vm, H becomes Fy (Fy is defined as the vertical coordinateover flow
pointChighest level

AAAA
AAAA
AAAA

r

C

F

H height level ofliquid surface

Vvirtual vessel

volume ofliquidFigure 1: Virtual vessel and a sphere including it

Figure 3: Each parameter of virtual vessel
yc
d1
d2
d3

θ

ψ

φ

AAAA
AAAA
liquid

xc

V

C

V

zc

+

vesselFigure 4: Volume considering thickness of virtual vessel
Figure 2: Representation of tilting of virtual vesselof F). The above Eq. is translated to
V = v(θ, φ,H).

(3)

When the parameter H of the function v is under the vessel,
V becomes 0. When H is above the point F, V is taken asv(θ, φ,Fy ) = Vm(θ, φ) (Fy is independent of ψ).

where n (n ≥ 0) means the number of particles which movethrough the mouth and V (t)(0) means the assumed volume. Whenthe vessel dose not interfere with the liquid in another vessel, let
the assumed volume of the liquid in the vessel at time t be V (t)(1)=V (t)(0). Then the height level is updated according toH(t) = h(θ, φ,V (t)(1)).

(6)

When the volume of liquid is Vm, V + becomes Vm+ . When the
thickness of vessel is not considered, V + is regarded as V .

Liquid in Stay Condition and Vessel
In this section, we describe the interaction model between a vessel and the liquid in another vessel (Fig. 6). In the following, leteach vessel be designated as vessel 1 and vessel 2 respectively,
also let the symbol of each vessel be designated as subscript 1
and 2 for the distinction. When next Eq. holds at time t, vessel 1
and the liquid in vessel 2 are interfered each other.

3. INTERACTION OF LIQUID AND VESSEL

C1y − r1 < C2y + h2 (θ2 ,φ2 ,V2 ),When the height level is H, define the volume under H
considering the thickness of vessel (Fig. 4) as
V + = v+ (θ,φ,H).

(4)

(0)

First, the system gets the position and the direction(C(t), θ(t), φ(t), ψ(t)) of the vessel moved by the user inthe virtual 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.
Each particle is moved according to the gravity and the inertia.
The particles moved under the predefined threshold plane will bedeleted for the drawing.
Liquid in Free Fall Condition and Vessel
When the falling liquid (each particle) moves through the mouthof a vessel, the status of the liquid changes from the condition(1) to the condition (2), and the volume of the liquid in it will be
increased according to the exchange rate N (Fig. 5).
V (t)(0) = V (t − ∆t) + n/N,

(5)

(7)

where C jy is the vertical coordinate of the position C j of vesselj. When the interference is detected, let the volume that vessel 1

fall

AAAA
AAAA
AAAA

particles fall throughthe mouth of the vessel
exchange rate: N

stay

add the volume
of liquid in the vessel

Figure 5: Relation between two conditions of liquid (1)vertical axis

vertical axis

AAAA
vessel 1

F1y

C1y
C2y

Vm1+

-

r1

h2(V2(0))

C2y + H2 - C1y

C1y
C2y

H2

liquid surface
of vessel 2
V2(0)U21: upheld
volume(1)

V2

vessel 2

F1y

Vm1 - V1(0)C2yC1y + F1y - C2y

-

C1y
C2y

F1y
H2

V1(1)

V1(0)

V2(0)

Figure 7: Flowing liquid into virtual vessel (1)U2 = ∑ U2 j .

(8)jWhen vessel 1 and the liquid in vessel 2 are interfered each otherand next Eq. holds, the situation is that the part of vessel 1 under
the over flow point interferes with the liquid surface of vessel 2.
+Vm+1 ) < C1y + F1y .

(9)When the above Eq. does not hold, the situation is that the liquid
in vessel 2 flows into vessel 1.
Upholding of Liquid Surface: When a vessel and the liquid surface are interfered each other, vessel 1 upholds the liquidsurface of vessel 2. The height level H2 of vessel 2 should satisfy
next Eq.
(0)

H2 = h2 (θ2 ,φ2 ,V2 +U21 ),U21 = v+
1 (θ1 ,φ1 ,C2y + H2 −C1y ).
(0)

C2y

C1y

-

C2y

AAA
AAA
AAA

F1y

V1(1) = Vm1

H2

V1(0)

V2(1)

Figure 8: Flowing liquid into virtual vessel (2)upholds the height level of vessel 2 be U21 ≥ 0. Let the volume
that other vessels uphold the height level of vessel 2 be

(0)

F1y

V2(0)

V2(1)

C2y + h2 (θ2 ,φ2 ,V2

AAAAAA
AAA
AAA

C1y

vertical axis

AAA
AAA

vertical axis

AAAAAA
AAA
AAA

C1y

vertical axis

vertical axis

Figure 6: Interference between virtual vessel and liquid of another vessel

(10)

(1)

Let the volume in each vessel V j be updated as V j . Then theheight level of vessel 1 is determined from the Eq. (6).
Flowing of Liquid into Vessel: When the liquid in vessel
2 flows into vessel 1 and the next Eq. holds, the height level ofliquid in vessel 2 should be the height of the over flow point ofvessel 1 (Fig. 7).
(0)

V2 +U21 − v2 (θ2 ,φ2 ,C1y + F1y −C2y )(0)< Vm1 −V1 .

(11)

When the liquid flows into a vessel, vessel 1 upholds the heightlevel of vessel 2 with the volume U21 = Vm+
1 . The height levelof vessel 2 should be the height of the over flow point of vessel
1 (Eq. (12)). The volume of each vessel is determined from theEq. (13) and (14). Then, the height level of vessel 1 is determinedfrom the Eq. (6).
H2 = (C1y + F1y ) −C2y .
(1)V2 = v2 (θ2 ,φ2 ,H2 ) −U21 .
(1)
(1)
(0)
(0)
V1 +V2 = V1 +V2 .

(12)
(13)
(14)

When Eq. (11) does not hold, the liquid surface of vessel 2 should
be higher than the height of the over flow point of vessel 1 (Fig.
(1)8). Then, the volume V1 and the height level H1 of vessel 1 are
set as the maximum volume Vm1 and the radius r1 , respectively,
where the liquid surface of vessel 1 is not considered (not drawn).
The volume and the height level of vessel 2 are determined fromthe Eq. (14) and next Eq.
(1)

H2 = h2 (θ2 ,φ2 ,V2+U21 ).

(15)

When the liquid does not flow into another vessel, user can skim

the volume is overthe maximum volume

stay

180

flow liquid
as particles

e)

gre

(de

..

φ: -

U

exchange rate: N

0
. 18

θ
H.100/r

fall

-90

...

90
(degree)

100
[V]

...

Figure 9: Relation between two conditions of liquid (2)

-100
(%)

the liquid with the vessel by the above process.

Figure 10: Look up table for calculation volume
Spilling Liquid from Vessel
When next Eq. holds at time t by the above interference and tilting
of a vessel, the liquid spills from the vessel (Fig. 9).
V (1) +U > Vm.

V = Vm(θ, φ)(16)

The part of the liquid in the vessel, which is expressed using thevolume, spills at the over flow point F as N(V (1) +U −Vm) particles. The volume in the vessel at time t is determined asH

V (t) = Vm −U.

(17)

φ

V=0

While if the Eq. (16) does not hold, the liquid dose not spill andthe volume V (t) becomes V (t)(1).
Drawing and Other Processes
The virtual faucet which flows the infinite liquid is defined forthe experiment of the interaction between a virtual vessel and theliquid in the free fall condition. After the above processes, liquid
particles are generated from the faucet.
Actual shape of the liquid surface of each vessel is generated for the drawing of the CG image based on the shape of thevessel and the height level. When vessel 1 interferes with theliquid in vessel 2 and the height level of vessel 2 is not higher
than the over flow point of vessel 1, it is necessary that the partof the liquid surface of vessel 2 should be removed for vessel 1.
Then, each particle, each vessel, its liquid surface and its
shadow are drawn.

θ

Figure 11: Real look up table which is set on memory

The volume of liquid in a vessel can be calculated by the interpolation from the elements of the LUT. The height level with volume parameter (Eq. (2)) can be obtained by searching elements
which are located nearby the value of the volume then by interpolating the height level parameter of elements (Fig. 12). The overflow point of a vessel (Eq. (1)) can be obtained by the sequential
search for the vertices of the polygon which expresses the mouthof the vessel. The thickness of the vessels is ignored in this system. To consider the thickness, it is necessary to make another
LUT for the Eq. (4).

4. IMPLEMENTATION GENERAL SHAPE VESSELFor the implementation of a system, each function of each vessel
expressed by Eq. (1) - (4) should be made based on the shape ofeach vessel respectively. In this system, virtual vessels are expressed by convex shape polyhedron. At loading up the shapeof vessels, the LUTs (look up table) for each vessel are madeto calculate the Eq. (3). This LUT gives V from the parameterθ,φ and H ·100/r, where −90 ≤ θ ≤ 90 (degree), −180 ≤ φ ≤180 (degree) and −100 ≤ H ·100/r ≤ 100 (−r ≤ H ≤ r), withstep ∆θ,∆φ and ∆H, respectively (Fig. 10). In this LUT, if theheight level is under the vessel, the volume is set to 0. If it isabove the over flow point, the volume is set to the maximum volume Vm(θ, φ). This system has only cubic area shown with thicklines in Fig. 11 on a memory.

interpolate
and search

V

H
∆H

interpolate
∆θ

φ
θ

∆φ

Figure 12: Method obtaining height level by volume

Figure 14: Manipulation of liquid using virtual vessel

Figure 13: Appearance of proposed system

Eq. (10) is used to calculate the height level of vessel 2 that is upheld by vessel 1. This system gets the height level by the following numerical method. First, the initial value of the height levelof vessel 2 is set to the value that the liquid in vessel 2 does notinterfered with vessel 1. Then, the height level is updated fromthe following Eq. until the height level of vessel 2 is converged.
(0)

H2(0) = h2 (θ2 ,φ2 ,V2 ),U21(i) = v+
1 (θ1 ,φ1 ,C2y + H2(i) −C1y ),(0)

H2(i+1) = h2 (θ2 ,φ2 ,V2 +U21(i) ), i ≥ 0.

(18)

5. EXPERIMENTAL RESULTS
Using the model mentioned above, we implemented a system
for the manipulation of the virtual liquid using virtual vessels
in C language on a graphics workstation SGI OCTANE2. The
exchange rate N is taken to be 10 [number of particles / cc]. In theexperiment, 1 cc of the falling liquid is generated per 1 CG frame.
An example operation is shown in Fig. 13. This systemgets the position and the direction of the real vessel via the
motion sensor using a low-frequency magnetic field. Fig. 14(left)

shows that the user can skim the liquid from another vessel.
As shown in the Fig. 14(right), the user can catch the falling
liquid using the virtual vessel, hold the liquid in it, then spill
the liquid. In these figures, the vessel can be moved by a user
and it is implemented as a hemisphere whose radius is 5 cm,
and another fixed vessel is a cube whose edge length is 30 cm.
Examples of manipulation using several shape vessels expressedby convex shape polyhedron are shown in Fig. 15. As shown inthese figures, the user can manipulate liquid using general shapevessel in this system. This system can refresh its screen at 24
frames/sec as the average speed for the representation of around
500 particles.
Through this virtual liquid manipulation system in our laboratory,
we get some positive evaluations such that “I feel that I really manipulate the water (liquid) using a cup.” The real cup with sensor is passed to users and only the fact that users can manipulate
the water (liquid) in the screen using a real cup was explained tousers. As the time to make users to feel that they can manipulate
the liquid freely, it took 65, 75, 125, 41, 53, 42, 40, 48, 62 and66 seconds respectively, and the average time is about 1 minute.
From these results, it is considered that this system can keep theessential characteristics of real liquid manipulation. Other comments and the remained problems are as follows:• They could recognize the feeling about the position of vir-

Figure 15: Examples of vessel expressed by general convex shape polyhedrontual cup from the shadow of it, but they tend to take noticeto the shadow. They are able to catch the falling liquid moreeasily if the shadow of each particle is drawn.
• The feeling of the movement of a virtual cup is smaller thanthat of the actual movement of real cup. It is difficult tokeep 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 position of the screen. Introducing
the force feedback will also be required for the representation ofweight of the liquid in a vessel.

6. CONCLUSION
In this paper, we described a method for the liquid manipulation
using virtual vessels which are expressed by the general convex
shape polyhedron and an experimental system was implemented
as a virtual reality system. Using the virtual vessel, the system
can catch the falling liquid, skim the liquid from another vessel,
hold the liquid and spill 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 stage ofthe realization of the basic functions, and the following points
are remained as the future subjects.
• Manipulation of the liquid using the vessels with the generalconcave shape.
• Interaction with the liquid under the third condition such as
the water current in the river.
The addition of these functions will be required. For the former, it
is considered that a concave polyhedron vessel should be divided
into some neighboring convex polyhedrons. For the latter, it isconsidered that the third condition is represented as both particles
and volume.
Acknowledgments
The authors thank Takehiro Kuroiwa and Koji Nose for their help

in writing the software. We are grateful to our colleagues in ourlaboratory 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, 1995, pp. 188–201.
[2] D. Braff, “Interactive Simulation of Solid Rigid Bodies,”
IEEE Computer Graphics and Applications, Vol. 15, No. 3,
1995, pp. 63–75.
[3] K. Funahashi, T. Yasuda, S. Yokoi, and J. Toriwaki,“Knowledge and Model for Manipulation Using Tools witha Virtual Hand in Virtual Space,” (in Japanese) Trans. Virtual Reality Society of Japan, Vol. 3, No. 3, 1998, pp. 167–
176.
[4] M. Kass and G. Miller, “Rapid, Stable Fluid Dynamics
for Computer Graphics,” Computer Graphics (Proc. SIGGRAPH), Vol. 24, No. 4, 1990, pp. 49–55.
[5] M. E. Goss, “A Real Time Particle System for Display of
Ship Wakes,” IEEE Computer Graphics and Applications,Vol. 10, No. 3, 1990, pp. 30–35[6] J. X. Chen, N. da Vitoria Lobo, C. E. Hughes, andJ. M. Moshell, “Real-Time Fluid Simulation in a Dynamic
Virtual Environmen,” IEEE Computer Graphics and Applications, Vol. 17, No. 3, 1997, pp. 52–61.
[7] K. Funahashi and Y. Iwahori, “Virtual Liquid Manipulation
Using General Shape Vessel,” Proc. IEEE-VR2001, 2001,
pp. 283–284.