ICAT 2001
December 5-7, Tokyo, Japan

Representation of Swinging Liquid
on Virtual Liquid Manipulation
Kenji Funahashi, and Yuji Iwahori
Center for Information and Media Studies, Nagoya Institute of Technology
Gokiso-cho, Showa-ku, Nagoya 466-8555 Japankenji@center.nitech.ac.jp

Abstract
In this paper, a model to realize an interactive manipulationof virtual liquid using a virtual vessel is described first. Then,
this model is extended to represent the swinging liquid in a
vessel. The liquid receives reactionary acceleration according to
the acceleration of the vessel. This reactionary acceleration isconsidered to represent swinging liquid. Our system with this
proposed model makes it possible to swing the liquid surface
with swinging the vessel, then to spill the liquid with swinging it.
Key words: Virtual Reality, Interactive Manipulation, Virtual
Liquid, Liquid Manipulation, Particle and Volume Model

1. Introduction
In the field of virtual reality for the recent years, the limitationis that users can manipulate only the solid objects [1], [2], [3].
While in the computer graphics technology, the scene imageof water current has been represented by real-time simulation[4], [5], [6]. However, an interactive manipulation of the virtual
liquid is not considered in these papers including other studies,and direct application to the interactive manipulation is still
difficult.
In this paper, a model to realize an interactive manipulation ofvirtual liquid using a virtual vessel [7], [8] is described first.
A virtual vessel is introduced to detect the interference withliquid. We consider only the interaction between the virtual
vessel and the liquid. Then, this model is extended to represent
the swinging liquid in a vessel. The main purpose of thismodel is the realization of the virtual liquid manipulation, while
the generation of high quality computer graphics images nor
simulating the exact behavior of the liquid, are not the main.
Our system with this proposed model makes it possible to catchthe liquid using the virtual vessel, to swing liquid surface withswinging the vessel, then to spill the liquid with swinging it.
Also the system realizes the manipulation to spill the liquid bytilting it and skim the liquid from another liquid vessel.

2. Liquid Manipulation Using Vessel
2.1 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.
It also represents the liquid in the condition (2) as volume. The
exchange rate between each condition is taken to be N [numberof particles / volume]. When user falls all liquid by tilting
the vessel of the volume V , the volume of liquid in the vessel
becomes 0 and the number of particles of liquid in free fallcondition increases by NV .
2.2 Virtual Vessel in Virtual Space
We consider a vessel with the convex shape and a sphere including the vessel (Fig. 1). The center of the sphere is designatedas C and its radius is designated as r. Then, the position of
the vessel is represented by C. The direction of the vessel isrepresented by θ,φ and ψ (Fig. 2), while the tilt parameters are
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 statusmeans 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 overflow point F is represented by the relative vector from the pointC.
F = f (θ,φ,ψ).
(1)
When the volume of the liquid in a vessel is V (V ≥ 0), theheight level of the liquid surface H is represented by the relative
distance from the point C.
H = h(θ, φ,V ).

(2)over flow
pointChighest level




r

C

F

H height level ofliquid surface

Vvirtual vessel

volume ofliquidFig. 1: Virtual vessel and a sphere including it

Fig. 3: Each parameter of virtual vessel
yc
d1
d2
d3

θ

ψ

φ



liquid

xc

V

C

V

zc

+

vesselFig. 4: Volume considering thickness of virtual vessel
Fig. 2: Representation of tilting of virtual vessel
2.3.1 Liquid in Free Fall Condition and Vessel
When the parameter V of the function h is over the maximum
volume Vm, H becomes Fy (Fy is defined as the vertical coordinate of F). The above equation 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 ψ).
When the height level is H, define the volume under H considering the thickness of vessel (Fig. 4) as++

V = v (θ,φ,H).

(4)

When the volume of liquid is Vm, V + becomes Vm+ . When the
thickness of vessel is not considered, V + is regarded as V .
2.3 Interaction Model of Liquid and VesselFirst, the system gets C(t), θ(t), φ(t) and ψ(t); the position andthe direction of the vessel moved by the user in the 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 be deleted forthe drawing.

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) = V (t − ∆t) + n/N,

(5)

where n (n ≥ 0) means the number of particles which movethrough the mouth. When the liquid in the vessel is notinterfered with another vessel, the height level is updated simply
according to the equation (2).
2.3.2 Liquid in Stay Condition and Vessel
In this section, we describe the interaction model between a vessel and the liquid in another vessel. In the following, let each
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 the equation (6) holds, vessel 1 and theliquid in vessel 2 are interfered each other (Fig. 6).
C1y − r1 < C2y + h2 (θ2 ,φ2 ,V2 ),(6)

C2y + h2 (θ2 ,φ2 ,V2 +Vm+
1 ) < C1y + F1y ,(7)

where C jy is the vertical coordinate of the position C j .
When the equation (7) also holds, the situation is that the partof vessel 1 under the over flow point interferes with the liquidsurface of vessel 2. Then, let the volume that vessel 1 upholds
the height level of vessel 2 be U. When it does not hold,particles fall throughthe mouth of the vessel

fall





the volume is overthe maximum volume

exchange rate: N

stay

stay

U

exchange rate: N

add the volume
of liquid in the vessel

flow liquid
as particles

fallFig. 7: Relation between two conditions of liquid (2)vertical axis

Fig. 5: Relation between two conditions of liquid (1)

C1y
C2y

80

vessel 1

F1y



1
φ: -

r1

-90

...

90
(degree)100

liquid surface
of vessel 2

U: upheld
volumevessel 2

...

V2

e)
gre
(de

..

θ
H.100/rVm1+

h2(V2)

0
. 18

[V]

-100

Fig. 6: Interference between virtual vessel and liquid of
another vessel

the situation is that the liquid in vessel 2 flows into vessel 1,
the volume of the liquid in each vessel is changed with theappropriate rate [8].
2.3.3 Spilling Liquid from Vessel
When next equation holds at time t by the above interference andtilting of a vessel, the liquid spills from the vessel (Fig. 7).
V +U > Vm.

(8)

The part of the liquid in the vessel, which is expressed using
the volume, spills at the over flow point F as N(V + U − Vm)particles according to the gravity. The volume in the vessel attime t is determined as
V (t) = Vm −U.

(9)

(%)

Fig. 8: Look up table for calculation volume

LUT, if the height level is under the vessel, the volume is set
to 0. If it is above the over flow point, the volume is set to the
maximum volume Vm(θ, φ).
The volume of liquid in a vessel can be calculated by the interpolation from the elements of the LUT. The height level withvolume parameter (equation (2)) can be obtained by searchingelements which are located nearby the value of the volume thenby interpolating the height level parameter of elements. The overflow point of a vessel (equation (1)) can be obtained by the sequential search for the vertices of the polygon which expresses
the mouth of the vessel. The thickness of the vessels is ignoredin this system. To consider the thickness, it is necessary to makeanother LUT for the equation (4).

While if the equation (8) does not hold, the liquid dose not spill.

3. Representation of Swinging Liquid
2.4 Implementation of Functions
For the implementation of a system, each function of each
vessel expressed by equations (1) – (4) should be made basedon the shape of each vessel respectively. In this system, each
virtual vessel are expressed by a convex shape polyhedron. At
loading up the shape of vessels, the LUTs (look up table) for
each vessel are made to calculate the equation (3). This LUT
gives V from the parameters θ,φ and H ·100/r (Fig. 8). In this

3.1 Absolute Stay Condition
The stay condition; the condition (2) mentioned above is theabsolute stay condition. The liquid surface is horizontal whenthe vessel is swung. However, many trial people swung thevessel vertically and horizontally at the demonstration hall ofIEEE-VR2001 [9].

C (t-2∆t)

C (t)C (t-∆t)
D (t) =

D (t-∆t)

C (t) -C (t - ∆t)velocity
andaccelerationof vessel

D (t-∆t)/∆t

D (t)/∆ta (t) = (D (t) -D (t-∆t))/∆t2

Fig. 9: Position, Velocity and Acceleration of Vessel




 
F=Fa

Fr-a : reactionary
accelerationHαg - a : relative
gravity vectorθ = θaφ = φaψ = ψcθ = θr

V

spill

α

φ = φrψ = ψcg-aθ = θaφ = φaψ = ψcg : gravity
acceleration

Fig. 10: Relative Stay Condition

3.2 Reactionary Acceleration and Relative Gravity Vectors
We extend the absolute stay condition to the relative stay condition for a vessel. When the position of a vessel is C(t) at time t,
the moving vector of its position is defined as D(t) (Fig. 9).
D(t) = C(t) −C(t − ∆t).

(10)

Then the velocity vector is
D(t)/∆t.

(11)

The acceleration vector of the vessel; a(t) at time t is obtainedasD(t) − D(t − ∆t).
(12)a(t) =∆t 2
The liquid in the vessel receives the reactionary acceleration(−a) according to the acceleration of the vessel. The sum vectorof the reactionary acceleration and the gravity acceleration is
calculated as g − a. This vector is used to realize the relative
gravity vector (See Fig. 10(left)).

we consider that the vessel is rotated by α as the relative gravity
overlaps with the actual gravity. Then the relative direction isdetermined asθ = θr ,φ = φr ,ψ = ψc

(14)

for the following calculations (See Fig. 10(middle)). The heightlevel of the liquid surface is calculated by equation (2) with θrand φr , and the liquid surface is set up. Also the relative overflow point Fr is determined by equation (1).
Then, the vessel is rotated and returned in the direction of origin. The liquid surface is rotated with the vessel for the drawing.
Also Fr is rotated to the point Fa (See Fig. 10(right)). When theliquid spills from the vessel;
V +U > Vm(θr ,φr ),(15)

each liquid particle flows out from the point F(= Fa ) according
to the relative gravity (g − a).

4. Experimental Results
3.3 Relative Stay Condition
When the direction of the vessel isθ = θa ,φ = φa ,ψ = ψc,(13)

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the experiment, 1 cc of the falling liquid is generated per 1 CG
frame.
An example operation is shown in Fig. 11. This system getsthe position and the direction of the real vessel via the motion
sensor using a low-frequency magnetic field. As shown in
the Fig. 12(right), the user can catch the falling liquid using
the virtual vessel, hold the liquid in it, then spill the liquid.
Fig. 12(left) shows that the user can skim the liquid fromanother vessel. As shown in Fig. 13, the user can swing liquidsurface with swinging the virtual vessel, then spill the liquid.
The present situation is that the surface is still flat and therepresentation of a wave cannot be fully performed.
Through this virtual liquid manipulation system in our laboratory, we get some positive evaluations such that “I feel that I
really manipulate the 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
to users. It is considered that this system can keep the essential
characteristics of real liquid manipulation. This system can refresh its screen at 24 frames/sec as the average speed when there
are about 500 particles.

5. Conclusion
In this paper, we proposed a model for liquid manipulation
using virtual vessels and realized the implementation of anexperimental system as a virtual reality system. Using thevirtual vessel, the system can swing the liquid surface, and spill
the liquid at an interactive refresh rate. Also the system cancatch the falling liquid, skim the liquid from another vessel.
Users have an impression close to that in the real world.
The system reported in this paper is under the stage of the realization of the basic functions, and the following subjects areremained as the future subjects.
• Representation of the waving liquid such as the ocean surface.
• Interaction with the liquid such as the water current in theriver.
• Manipulation of the liquid using the vessels with the generalconcave shape.
The addition of these functions will be required. It is consideredthat the wave and current condition is represented as both particles and volume. For the latter, it is considered that a concave
polyhedron vessel should be divided into some neighboring
convex polyhedrons.
Acknowledgments
We are grateful to our colleagues in our laboratory for the useful
discussions. This research was supported in part by the NIT
research promotion program.

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. Braff: “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, 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, pp. 167–176(1998).
4. M. Kass, and G. Miller: “Rapid, Stable Fluid Dynamics
for Computer Graphics,” Computer Graphics (Proc. SIGGRAPH), Vol. 24, No. 4, pp. 49–55 (1990).
5. M. E. Goss: “A Real Time Particle System for Display of
Ship Wakes,” IEEE Computer Graphics and Applications,Vol. 10, No. 3, pp. 30–35 (1990).
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, pp. 52–61 (1997).
7. K. Funahashi, and Y. Iwahori: “Virtual Liquid Manipulation Using General Shape Vessel,” Proc. IEEE-VR2001,
pp. 283–284 (2000).
8. K. Funahashi, and Y. Iwahori: “A Model for Liquid Manipulation Using Vessel in Virtual Space,” Proc. IIIS SCI2001,
Vol.XI, pp.83-88 (2001).
9. K. Funahashi, and Y. Iwahori: “Getting Your Hands Wet
with Water – Virtual Liquid Manipulation Using Vessel,” booklet of Exhibits/Research Demos on IEEE-VR2001(2001.3, Pacifico Yokohama, Japan).

Fig. 11: Appearance of proposed system

Fig. 12: Manipulation of liquid using virtual vessel

Fig. 13: Swinging liquid surface and spilling liquid