The Virtual Chemical Laboratory
Using Particle and Volume Based Liquid Model
Yuki Natsume

Andreas Lindroos

Hirotaka ItohKenji Funahashi

Nagoya Instituteof Technology
Gokiso-cho, showa-ku,
Nagoya, Japanemail: natsume@center.nitech.ac.jp

Nagoya Instituteof Technology
Gokiso-cho, showa-ku,
Nagoya, Japan

Nagoya Instituteof Technology
Gokiso-cho, Showa-ku,
Nagoya, Japan

Nagoya Instituteof Technology
Gokiso-cho, Showa-ku,
Nagoya, Japanemail: kenji@nitech.ac.jp

Abstract—We have researched an interactive manipulation
model of virtual liquid. Representing a vortex, a spinning ﬂow
of liquid, simulating a stirring action of liquid, and coloring of
the water object through changing the surface color has beendeveloped. In this paper we propose a VR chemical laboratory
system using these techniques. This system can be used for
different kind of purposes, for example e-learning. E-learning
offers potentially cheaper education, increased accessibility andconvenience for users. Most existing systems rely on transmitting
information through text material, but by adding virtual reality
content to the system the learning experience can surely be
improved.

I. I NTRODUCTION
Creating realistic looking liquids in realtime that can beinteracted with is a challenging problem. Highly accurate
models using methods such as the Navier-Stokes equations
can be used for achieving realistic liquids, but are as for
now unpractical for realtime simulations without specialized
hardware or e.g. GPU calculation [1][2][3][4].
On the other hand, simpliﬁed models are needed for creating
realtime liquid simulations which can be used for applications
that do not need a high degree of realism, such as experience systems and games, with restricted hardware. A particle
and volume based liquid model is proposed, which enables
manipulation of virtual liquid with high processing speed [5].
The interaction between containers and liquid is considered.
The features of the motion of liquid which humans expect
unconsciously is mainly represented. So we can manipulate
virtual liquid in the highly feeling of liquid manipulation. In
addition, virtual liquid model to focus waves and splash of theliquid surface, or to represent coloring is proposed [6][7][8].
These models avoid complex calculation for realizing the realtime simulation.
Our work focuses on a VR laboratory system which could
be used e.g. for e-learning or games, and is based on particle
and volume based liquid models. We propose a model which
represents color diffusion inside the liquid and a vortex createdby stirring for VR chemical laboratory systems. The system
uses a simpliﬁed model for representing the liquid, renderingand interactively manipulating it. For this kind of an application our criteria has been to make a model which is able torepresent interaction between two or more liquids, e.g. when

Fig. 1.

Virtual container inside a bounding sphere

two liquids are mixed in one container, since mixing liquids
is a common operation in chemistry experiments. In section
II a particle and a liquid based models are outlined, section
III outlines the method for the liquid surface’s diffusion andcoloring, section IV outlines the stirring motion and the vortex
that occurs and section V outlines the results of the developed
system.
II. PARTICLE AND VOLUME BASED MODEL
In this section, particle and volume based interactive liquid
manipulation models are described which is the foundation of
our work.
A. Virtual Container
For manipulating virtual liquid, we use a virtual container.
The virtual container is inside a bounding sphere and is used
for detecting the interference (Fig. 1). The center of the sphereis designated as C and its radius is designated as r. The
position of a virtual container is represented by C. Inclinationand direction of a virtual container is represented by θ, φ, andψ (Fig. 2). A virtual container is rotated by φ on axis xc ,and rotated by θ on axis zc . In short, the tilt parameters are
represented by θ and φ. Then a virtual container is rotated byψ on axis yc and its direction is changed.

Fig. 3.

Fig. 2.

on grid points. The surfaces on the sides are static and do not
deform.

Representation of tilting of virtual containers

B. The liquid model

III. D IFFUSION AND COLORING

Using purely a particle based system in three dimensions
using many particles the calculations become too heavy. Thisis the reason the liquid in the presented system is represented
with a volume and a particle based system. In this system,
we can manipulate virtual liquid using a container mentioned
above, e.g. by spilling and ladling. Although this model
doesn’t calculate the motion of liquid precisely, it represents
features of the motion of liquid which the human naturally
expect. It enables us to feel that the virtual liquid is real.
1) Particle based liquid: A particle system is used for representing liquid in free fall. Interaction between the particles
does not happen, but once a particle hits a volume liquid it
increases its volume by one unit. The particle is converted
into volume according to the rate of convertion N[number ofparticle / cc]. For instance, when the particles which is thenumber of N times V collide with the volume based liquid,
the volume of V is increased.
2) Volume based liquid: The volume based system is used
for liquids that are accumulated in e.g. containers. A volume
of liquid in our proposed model is a three-dimensional object
with an upper surface and several side surfaces. The uppersurface is deformable and is represented with a height grid andcan be manipulated and interacted with. A two-dimensional
wave equation (eq. 1) is used. The value v means the speedof the wave.
2
∂2z
∂2z
2 ∂ z
=
v
(
+
)
∂t2
∂z 2
∂y 2

(1)

The following equation is derived from (eq. 1), and is used for
calculating the height h of the grid point (i, j) at time t+∆t.
h[i][j](t + ∆t) =Multiple layers of grids for representing coloring((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)) × c(2)

The value c means damping coefﬁcient, which gives optional
consideration for the wave’s attenuation. The wave on theliquid surface is represented by calculating transmitting waves

When liquids of different colors are poured into the same
container in the volume based model, diffusion occurs i.e. theliquids in the container mix. The information of the diffusion ishandled in a three dimensional grid (the actual surface is a twodimensional grid, but a multiple layers of grids are used for
obtaining a sense of depth (Fig. 3)), and the diffusion happens
according to the equation below:∂P (x, y, z, t)∂t∂ 2 P (x, y, z, t) ∂ 2 P (x, y, z, t)
+
∂x2
∂y 2
2
∂ P (x, y, z, t)
+
)
(3)
∂z 2

= D(

P denotes the concentration of the liquid at a certain point,and D is the diffusion coefﬁcient. The solution to this equation
is calculated numerically, by doing the following calculations
on each time step:(C[i][j][k](t + ∆t) − C[i][j][k](t))
d2×P [i][j][k](t + ∆t) ×D∆t= C[i + 1][j][k](t) × P [i + 1][j][k](t)+C[i − 1][j][k](t) × P [i − 1][j][k](t)+C[i][j + 1][k](t) × P [i][j + 1][k](t)+C[i][j − 1][k](t) × P [i][j − 1][k](t)+C[i][j][k + 1](t) × P [i][j][k + 1](t)+C[i][j][k − 1](t) × P [i][j][k − 1](t)−6P [i][j][k](t)(4)

C contains the color information in RGBA-form, and d is thewidth of the grid. The difference in P causes a difference in thecoloring (Fig. 4). The colors for rendering the upper surface
is done in a simple manner. In the experiment section, thetwo-dimensional array surface[x][y][0], surface[x][y][1] andsurface[x][y][2] is used for representing diffusion of color on
the liquid surface.

Fig. 4.

Coloring with different values of P
Fig. 7.

Putting texture onto the side surface

This is done to save computation time. Instead of making
a projection calculation for each surface, only one calculation
is made greatly reducing computation time.
IV. VORTEX

Fig. 5.

A slice from the middle of container used for color diffusion

A similar method is used for the side surfaces. A slice fromthe middle of the container facing the viewer but parallel tothe y axis is used for diffusion of color as shown in Fig. 5.
The width of this grid which is used for the side projection is
πr, where r is the radius of the bounding sphere of the object.
Fig. 6 shows how this projection is done. This projection is put
onto the surfaces that are visible from the viewpoint and thatare facing forward. The length Lj of each side j is calculatedwith the following formula:Wi
Lj = ∑× πr
k Wk

Since mixing a liquid is a typical operation in chemistry
experiments e.q. by stirring liquids with spoon like objects,
its operation is needed in the model of interactive liquid
manipulation. Representation of a vortex on liquid surface
enables us to stir virtual liquid in high presence. To represent
the ﬂow of water precisely like a vortex, calculations which
are based on hydrodynamics are necessary, but it needs a lotof computing time, which means that it is not suitable forthe interactive manipulation model. Therefore, we represent a
vortex which is composed of spiral waves and a depression of
the liquid surface So far the meshed surface with grid points
is used for representation of the spreading waves on the liquidsurface (Fig. 8). In addition, we adopt the surface which have(5)

Wi denotes the length of a polygon and is calculated by
the difference of the biggest and smallest x-coordinate. The
diffusion is then represented by applying a texture on eachpolygon of the side surface (Fig. 7).

Fig. 8.

Spreading waves on the meshed surface

grid points on a concentric circle (Fig. 9). The waves spreadon it and the spiral waves is developed (Fig. 10). A depression
in the liquid surface is calculated by the following equation.
 2
ω 2



(r − 2a2 ) (r < a)

 8g
z=

Fig. 6.

Diffusion of the color on the projectionω 2 a4



8g r2

(6)
(r ≥ a)The value ω means the power of vortex, r means the lengthfrom the center of vortex, g means the gravitational acceleration, and a means the boundary between forced vortex andFig. 9.

Spreading waves on the concentric circle surface
Fig. 12.

Depression in the liquid surface (side viewing)

TABLE ID RAWING UPDATE SPEED OF PROPOSED MODEL
Action performed
No action / idle
Pouring liquid
Stirring

Fig. 10.

Spiral waves on the liquid surface

free vortex. The forced vortex and the free vortex are different
in the speed of liquid ﬂow. The value of a is the radius ofvortex. The size of the vortex is decided from the average
location of the object doing the stirring, and ω is decided
from the direction and distance of the object’s movement inthis model. The depression in the liquid surface is shown in
Fig. 11 and Fig. 12. Our vortex is done by applying the

Fig. 11.

Depression in the liquid surface

equation 5 on the height of the liquid surface, making thesurface appear concave. The vortex is made to form in thecenter of the container. To increase the strength of the vortex
by stirring, we look if the motion of the object doing thestirring is in a clockwise or an anti-clockwise motion andFrame rate
60 fps47 fps47 fpsincrease ω. If the object moves in an opposite direction of thevortex’s direction ω is decreased. If the motion continues in
the opposite direction the vortex disappears and a new vortex
is formed with the opposite direction. When stirring happens,
the diffusion is made faster.
V. EXPERIMENTAL RESULTThe virtual chemical laboratory system using the model
mentioned above was implemented with C language. The
speciﬁcation of PC is the following; CPU: Dual-Core AMD
Opteron Processor 1210 1.8GHz. The experimental system has
containers and/or objects, which one is movable and the otheris ﬁxed. The position and the direction of the movable object
are input from a real object with the motion sensor using a
low-frequently magnetic ﬁeld. The device we used is 3SPACEISOTRAK2 of Polhemus company.
In Fig. 13, the state of color diffusing inside of the liquid
is shown. Particles which are of white color are dropped
into brown water, and then the white color spread. In Fig.
14, the vortex is shown. The spiral waves and depression of
the liquid surface gives an impression of stirring. In Fig. 15,
simple chemical experiments which is conducted is shown. A
chemical experimental tool in the virtual world is manipulated
by using tool in the real world. An operater pours a chemical
into another chemical, and stir it with a glass stick, and thenchemical reaction happens (Fig. 16). The model we proposed
enables us to experience chemical experiments with highrealism.
The result about processing speed is shown in Table 1.
The calculations in the interactive liquid manipulation system
has a low cost of computation. Although the interactive
manipulation system needs at least 10-12 fps, the model we
proposed satisﬁes it enough.

Fig. 13.

Color diffusion

VI. C ONCLUSION
In this paper, we proposed a virtual chemical laboratory
system using methods of diffusing color inside the liquid
and representation of a vortex on the liquid surface. Thesemodels do not calculate complex processes but enable us
to manipulate virtual liquid with high realism. The level ofrealism of this system is further improved by focussing on theliquid behavior and the shape of containers. The realizationof liquid manipulation with concave containers, e.g. glasses
which are narrow in the middle and ﬂasks, is one of oursolutions. The vortex is not based on hydrodynamics, andthis model represents chemical reaction by coloring diffusion.

Fig. 14.

Stirring liquid and a vortex appears

Therefore the differences of the result caused from the factor
like temperature can not be expressed. So it is difﬁcult toapply to experiments we do not know the result of. Although
it is available for the e-learning systems which use VR
technology that have known results. Besides the e-learning
system, this model is useful for other applications or systems
with interactive manipulation because of its high processing
speed. Researching and devising the model for improvementof the feeling of liquid manipulation, e.g. representation of
the liquid tricked down container surface, is the subject of our
future work.

Fig. 15.

Using the VR chemical Laboratory

R EFERENCES[1] Matthias Muller, David Charypar, Markus Gross. Particle-Based Fluid
Simulation for Interactive Applications, Proceedings of Eurographics/SIGGRAPH Symposium on Computer Animation(2003), pp. 154-159,
2003.
[2] Matthias Muller, Simon Schirm, Matthias 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.
[3] Shoichi Hasegawa, Mitsuaki Kato, Yoshinori Dobashi, Makoto Sato,
Tsuyoshi Yamamoto, Tomoyuki Nishita. Virtual Canoe : Real-Time Realistic Water Simulation for Haptic Interaction, SIGGRAPH 2005 Emerging
Technologies Project, DVD-ROM, 2005.
[4] Masataka Imura, Takashi Amada, Yoshihiro Yasumuro, Yoshitsugu Manabe, Kunihiro Chihara. Synthetic Representation of Virtual Fluid for
Mixed Reality, Proceedings of 8th International Conference on Virtual
Reality, pp. 135-142, 2006
[5] Takuya Tanabashi, Hirotaka Itoh, Kenji Funahashi, Yuji Iwahori. Representation of Wave Surface on Virtual Water Manipulation, SCIS & ISIS
2008, pp. 1460-1465, 2008.
[6] Kenji Funahashi, Yuji 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. (in Japanese)[7] Sidney Fels, Yuichiro Kinoshita, Tzu-Pei Grace Chen, Yasufumi Takama,
Steve Yohanan, Sachiyo Takahashi, Ashley Gadd, Kenji Funahashi.
Swimming Across the Paciﬁc: A VR Swimming Interface, IEEE Comuputer Graphics and Applications, Vol.25, No.1, pp.24-31, 2005.
[8] Andreas Lindroos, Yuki Natsume, Kazuhiro Sugase, Takuya Tanabashi,
Kenji Funahashi. VR Chemistry Laboratory System Using Particle andVolume Based Liquid Model, Proceedings of the 15th Annual Conferenceof the Virtual Reality Society of Japan, 2C2-7 (DVD-ROM), 2010. (inJapanese)

Fig. 16.

Stirring chemicals in chemical experiment