PRESSURE BASED INK DIFFUSION MODEL FOR REAL-TIME
SIMULATION OF CHINESE CALLIGRAPHY
Ye Wang and Jon Rokne
Department of Computer Science, University of Calgary, Canada
Keywords:
Non-Photorealistic Rendering, Chinese Calligraphy and Ink Painting, Simulation of Ink Diffusion, Pressure
Based Modeling.
Abstract:
This paper describes a novel approach to simulating Chinese calligraphy for digital image purposes. The
approach includes an ink diffusion model, a multi-layer paper model, a brush model, and the simulation
of special effects. Special attention is given to the ink diffusion effect which is of importance in Chinese
calligraphy. When the ink is deposited onto absorbent paper, it spreads outside the original border of a stroke
since the flow of water will transport carbon particles along the capillary tubes found in the paper. The ink flow
model is based on a new algorithm simulating dynamic ink diffusion into absorbent paper. In this capillary
network based paper model, the pressure at each node can be obtained from Darcy’s law applied to the ink
used in the calligraphy on each edge and it is proportional to the density of capillaries. The deposition layer of
the paper is furthermore used to simulate the deposition of carbon particles into the paper and it is also used to
simulate the washing out effects. Ink effects such as irregular edges and back run effect can also be simulated.
The system is efficient and can create realistic Chinese calligraphy in real-time.
1 INTRODUCTION
Chinese calligraphy and Chinese painting have been
refined over thousands of years into distinctly Orien-
tal artforms. In the past, these artforms could only
be practiced using traditional tools and instruments.
With the advent of the computer, a powerful tool
that can be adapted to a variety of simulation tasks,
these artistic expressions can be simulated in a very
realistic manner. Since these artforms are artistic
expressions of reality they can be considered to be
non-photorealistic expressions, although calligraphy
might also be considered to be a photorealistic expres-
sion since the desired results shown should be as close
to the real ones as possible.
In this paper, an efficient novel approach to simu-
late ink diffusion and percolation based on the phys-
ical mechanism of ink diffusion in rice paper is pre-
sented. Together with simulation of ink dispersion,
paper and ink interaction and Chinese calligraphy
brush techniques, this forms a complete system con-
sisting of four main parts: the brush model, the ink
and water transfer model, the virtual paper simulation
and special effects simulation.
2 RELATED WORK
Simulating Chinese calligraphy and Chinese painting
on a computer is an interesting topic which has at-
tracted a number of researchers. One of the earliest
attempts is that of Strassmanns (Strassmann, 1986)
who simulated the calligraphy brush as a 1D array of
bristles. Following this Guo and Kunii (Guo and Ku-
nii, 1991) proposed a model to simulate rice paper
which consisted of a mesh with randomly distributed
fibers. They divided the simulation into small regions
and distributed the fibers so that the local fiber dis-
tribution was random and the global distribution uni-
form. However, the complex mechanisms of ink dif-
fusion and water percolation were not simulated ad-
equately. This meant that the characteristics of the
calligraphic brush interaction with the paper through
diffusion of the ink could not be simulated sufficiently
realistically.
Kunii et al. (Kunii et al., 1995) later proposed a
multidimensional diffusion model including three dis-
tinct zones (initial zone, black border, and gray zone).
Their model simulated ink diffusion, and it can also
be applied to black ink rendering. However, the dif-
271
Wang Y. and Rokne J. (2007).
PRESSURE BASED INK DIFFUSION MODEL FOR REAL-TIME SIMULATION OF CHINESE CALLIGRAPHY.
In Proceedings of the Second International Conference on Computer Graphics Theory and Applications - GM/R, pages 271-276
DOI: 10.5220/0002071902710276
Copyright
c
SciTePress
fusion rate was a constant in his model, which is not
realistic when ink is deposited on the highly absorbent
rice paper.
A paper model consisting of three layers was in-
troduced by Curtis et al. (Curtis et al., 1997). They
use a cellular automaton to simulate fluid flow and
pigment dispersion and the layering to simulate vari-
ous watercolor effects, such as edge-darking, granula-
tion, back runs, separation of pigments, and glazing.
Their approach did not include the permeability ef-
fect, which means that the subtle ink patterns of Chi-
nese calligraphy and painting can not be simulated by
their model. Lee (Lee, 2001) improved Kunii’s (Ku-
nii et al., 1995) model by using a two perpendicular
directions model that includes a texture structure and
sinusoidal variations to simulate rice paper. In this
paper model, the paper is divided into square regions
called ”papels”. They developed the sinusoidal wave
schema for representing the flow of ink through a fiber
mesh. However, the fiber mesh model used in the pa-
per is quite different from the fiber structure in real pa-
per and the wave algorithm for the diffusion process
is different from the real physical diffusion process.
This means that the model only simulates processes
of this kind which do not conform closely to the phys-
ical processes for ink flow in paper. Based on Lee’s
(Lee, 2001) fiber mesh structure and layer structure
for each paper cell, Yu et al. (Yu et al., 2003) pre-
sented a local equilibrium model (LEM) which sim-
ulated the movement of water and ink on and in pa-
per. Their modified layer model simulated overlapped
strokes successfully. However, without the physical
process based simulation, the simulation of the ink
diffusion phenomenon was not realistic. Xiaofeng
(Xiaofeng Mi, 2004) used different droplet models
to simulate the tangent area between brush and pa-
per and based on these models they developed a vir-
tual brush model which is inspired by calligraphy and
painting experience. Their models were able to create
realistic looking results in real time.
Huang et al. (Huang et al., 2003) presented a
method which can simulate a variety of tones on dif-
ferent types of paper. Both a regular fiber mesh whose
fibers are uniformly aligned and an irregularly dis-
tributed fiber mesh consisting of randomly positioned
fibers were simulated in this paper. The diffusion of
brush strokes can be easily controlled, according to
experimental data and users can specify parameters
to get the desired effects. Van et al. (T. V. Laer-
hoven, 2004) developed a layered paper model which
divides the paper into a grid of small subpapers. Each
layer is implemented as a two-dimensional grid of
cells that exchange certain amounts of water with ink.
It updates all cell values according to their neighbor-
ing cell values in the same layer, and possibly in a
layer above and below. They have to distribute the
system by breaking up the whole grid in smaller sub-
grids that are simulated on separate processing units.
The results are sent back to the parent application and
combined with the results of other subpapers to pro-
duce the final image. Tsai et al. (Tsai et al., 2005)
discussed diffusion rendering of ink painting and fo-
cussed on synthesizing artistic effects of ink-refusal
and stroke-trace-reservation. This was the first paper
to take the quantity of glue in the paper as one im-
portant parameters of the structure of paper in the ink
diffusion simulation.
Chu and Tai (Chu and Tai, 2005) presented a fluid
flow model based on the lattice Boltzmann equation
(LBE) (Succi, 2001) for simulating percolation in ab-
sorbent paper. Instead of starting with a macroscopic
description of the fluid, the LBE modeled the physics
of fluid particles at a macroscopic level. They adapted
the basic LBE method to incorporate various features
needed for the special case of percolation. The pa-
per thickness patterns obtained by scanning the paper
against a dark background were stored aa a texture
map.
3 CHINESE INK AND PAPER
Chinese ink is a mixture of soot and glue which is
ground together with water to get black liquid ink.
The soot is composed of carbon particles which are
easily dissolved in water. The dimension of a carbon
particle is in the range of 10-150 nm, thus it can seep
into the paper easily and produce the extraordinary
rendering effects of the Chinese calligraphy.
Rice paper is often used in Chinese calligraphy. It
is highly absorbent because of the special materials
used and the very thin fiber structures. To reduce its
absorbency, the paper can be soaked with alum water.
The higher the density of the alum water, the lower
the absorbency of the paper will be. So the rendering
effect is mainly determined by paper absorbency and
fiber structure.
The simulation of Chinese calligraphy includes
three parts:
1) Paper model: The paper consists of a mesh with
randomly distributed fibers. To model this fiber
structure, the paper is divided into small square
cells. Each cell has four neighbors which are con-
nected with fibers and each cell of the paper is
simulated as a network flow model with a node
and four edges. Each edge represents a bundle of
capillaries and the node acts as a reservoir which
stores the water flowing into it. The water will
GRAPP 2007 - International Conference on Computer Graphics Theory and Applications
272
flow out the cell along the edges only when it is
full of water.
2) Ink flow model: The two layer model, a diffu-
sion layer and a deposition layer, will be used to
simulate the ink flow on the rice paper. The net-
work based flow model will be used in the diffu-
sion layer to model the water flow in the paper and
also to determine the final region of the ink marks.
The deposition layer can model the carbon parti-
cles deposited into the paper. It is also used to
simulate the washing out effects when the area is
painted later.
3) Absorption: As the ink flows in the paper, the
carbon particles will be absorbed by the fibers and
deposited into the paper. Thus the density of the
ink changes as it flows along the fiber network.
These effects are considered in our simulation as
they affect the final rendering result.
4 PAPER MODEL
To simulate the texture of the paper, we add a uni-
formly distributed random number for modeling the
fiber density of each edge.
If the average fiber density is Den
ave
, the standard
deviation of the uniform distribution is Std
dev
, then
the fiber density of each edge will be:
Den
edge
= Den
ave
+2Xtd
dev
[rand(X
p
,X
p1
0.5]
(1)
where Y
p
and X
p
is the size of the fiber mesh of the
paper. rand(M, N) is an M × N matrix with random
entries chosen from a uniform distribution on the in-
terval (0.0, 1.0).
After the fiber densities of all edges of each node
were generated, the fiber density of each cell, Den
cell
,
could be obtained by averaging the densities of all
edges:
Den
cell
= (Den
edge1
+ Den
edge2
+ · · ·)/n.
where n is the number of edge connected with this
cell.
In our programme, Den
ave
= 1Std
dev
= 0.2
- The edge is modeled as a pipe which consists of
a bundle of capillaries. The cross section area S
and the diffusion coefficient K of each of the four
edges is a function of the local fiber density ρ
e
. It
is assumed that K and S are linear with ρ
e
.
- All cells have the same volume and the fiber den-
sity ρ
c
m,n
of the cell (m,n) is random. The fiber
density of each cell is obtained by using the aver-
age value of the four edges.
5 INK FLOW MODEL
A network based flow model can be used in the diffu-
sion layer.
5.1 Darcy’s law
Darcy’s law is commonly used to study the flow in
porous media in groundwater hydrology. As a macro-
scopic law, it doesn’t tell us about the flow through
individual pores. Since paper is a typical porous
medium, the water diffusion in it can also be mod-
eled by Darcy’s law. As the flow through the indi-
vidual pores formed by the fibers of the paper is not
important, we mainly consider the flow through the
capillary bundles from one cell to another. According
to Darcy’s law, the flow through the pipe composed of
capillary bundle is
Q = KJS (2)
where Q(m
3
/s) is the flux of the diffusion, S(m
2
) is
the area of the cross section of the pipe which is con-
sist of a bundle of capillaries, J is the gradient of the
pressure of the flow(the pressure on unit length of the
pipe along the flow direction), and K(m/s)is the dif-
fusion coefficient of the pipe.
5.2 Flow in Capillary Networks
For two nodes connected with capillaries as shown
in Figure 1(a), if the pressure at nodes m and m + 1
are p
m
and p
m+1
, the length of the edge is L
m
, the
diffusion coefficient is K
m
and the cross-section is S
m
,
then, the flux will be
Q
m
= K
m
S
m
p
m
p
m+1
L
m
(3)
according to Darcy’s law, so the flux can be derived if
the pressure at each node is known.
For the capillary network with nodes M × N as
shown in Figure 1(c), the pressure at each node can
be obtained by applying Darcy’s law on each edge.
For one node (m,n) in the network, if the pressure at
this node is p
m,n
, and the pressures at the four neigh-
boring nodes are p
m+1,n
, p
m,n1
, p
m1,n
and p
m,n+1
,
then the flux on the four edges are Q
1
,Q
2
,Q
3
and Q
4
,
and
Q
i
m,n
= K
i
m,n
S
i
m,n
ˆp
i
L
i
m,n
; i = 1,...,4 (4)
where ˆp
i
is the difference of the pressure on the edge,
ˆp
1
= p
m+1,n
p
m,n
(5)
ˆp
2
= p
m,n+1
p
m,n
(6)
PRESSURE BASED INK DIFFUSION MODEL FOR REAL-TIME SIMULATION OF CHINESE CALLIGRAPHY
273
Figure 1: Nodes and edges in the networks.
ˆp
3
= p
m1,n
p
m,n
(7)
ˆp
4
= p
m,n1
p
m,n
(8)
Since the flux is conservative, the flux flow into node
(m,n) is zero, that is
i
Q
i
m,n
= 0 (9)
Let
c
i
m,n
=
K
i
m,n
S
i
m,n
L
i
m,n
; i = 1,...,4 (10)
Then
c
1
m,n
p
m+1,n
+ c
2
m,n
p
m,n+1
+ c
3
m,n
p
m1,n
+c
4
m,n
p
m,n1
i
c
i
m,n
p
m,n
= 0 (11)
The same equation can be derived for each node,
and the following equation can be obtained
A
MN×MN
P
MN×1
= 0 (12)
where P
MN×1
is the pressure vector
P
MN×1
=
p
1,1
.
.
.
p
M,1
.
.
.
p
1,N
.
.
.
p
M,N
(13)
Figure 2: Diagram of the diffusion.
and A
MN×MN
is a coefficient matrix which is deter-
mined only by the properties of the paper.
The initial region of the ink is simulated as a reser-
voir, and for those nodes within this region, the pres-
sures can be assumed to be zero. Since the flow is
caused by the capillary attraction, it is also assumed
that the flow is driven by pressures on the front (the
boundary of the diffused area) nodes. The pressure at
the nodes on the front can be assumed to be a constant
p
0
.
When the ink is diffusing, the front is moving out-
wards. Therefore, at each step of the diffusion, only
pressures of the nodes in the diffused region have to
be calculated because pressures of the nodes in the
initial region and at the front are already given as
shown in Figure 2. Furthermore, pressures of the
nodes outside the diffusion region are not needed as
there is no ink there, and the matrix A can be sim-
plified when the corresponding components in P are
deleted from the equation. Now by replacing the com-
ponents corresponding to the pressures at the nodes in
the initial region and at the front in P with their val-
ues, eq. (12) can be written as
ˆ
A
ˆ
P = B (14)
where
ˆ
P is the pressures of the nodes within the dif-
fused region.
Since the pressure at nodes within the diffusion
region is varying as the ink is diffusing,
ˆ
A and
ˆ
P are
varying with time. However, at each time step, the
pressure
ˆ
P can be obtained by eq. (14). With the
pressure at each node, the flux can be then derived
with eq. (4) .
In this model, fiber texture is denoted by param-
eters K
m,n
and S
m,n
, which will affect the percolation
effect of the final rendering result. If the average val-
ues of K
m,n
and S
m,n
are K
0
and S
0
. So the three factors
K
0
, S
0
and the pressure p
0
at the front will determine
the diffusion speed. So in order to simulate the phys-
GRAPP 2007 - International Conference on Computer Graphics Theory and Applications
274
ical process of the ink diffusion in a paper, K
0
, S
0
and
p
0
are determined by experiments.
5.3 Algorithm
- Step 1: find the source region of the ink. The pres-
sure of the nodes in this region can be assumed to
be zero or a function of the amount of ink remain-
ing in this area.
- Step 2: find the front nodes. The pressure of the
node on the front is a function of the fiber density
of the cell. For simplicity, a constant pressure of
the node in the front can also be assumed.
- Step 3: find the mid-nodes of the diffusion net-
work and form the coefficient matrix A to obtain
pressures of these nodes.
- Step 4: solve the linear equation
ˆ
A
ˆ
P = B to get the
pressures.
- Step 5: calculate the flux of each edge. The evap-
oration of water can be considered in this step by
subtracting it from the flux of each edge.
- Step 6: calculate the time when a front cell is full
of ink and the amount of ink flows into each cell
on the front.
- Step 7: calculate the amount of the carbon parti-
cles deposited in the deposition layer.
- Step 8: update the amount of ink in the source re-
gion. If there is no ink left then stop the diffusion,
else go to step 2.
6 ABSORPTION
The size of the carbon particles in the ink is random
with a probability distribution. However, in order to
simplify the calculation, it is assumed that the carbon
particles all have the same size and all have the mean
dimension value. Thus the density of the ink is only
determined by the number of the particles in it.
The rendering effect can be calculated directly
from the carbon particles deposited in the paper. It is
assumed that the absorption rate is independent of the
velocity of the flow and only related to the local fiber
density of the paper and the diameters of the particles.
As the ink flows in the paper, the carbon particles will
be absorbed by the fibers and deposited into the paper.
Thus the density of the ink changes as it flows along
the fiber network. At the end of the diffusion, all par-
ticles in the ink remaining in each cell will deposit on
the paper after the water is evaporated. Furthermore,
following assumptions are made in our simulaition:
- The absorption rate of the paper is proportional to
the local fiber density of each cell.
- The color intensity of the image is a proportional
to the carbon density at each cell.
Since the source region is modeled as a reservoir,
the ink is uniformly distributed in this region and flow
out from its boundary. As the ink flows out and the
carbon particles deposit in the paper, there will be
a deep dark edge at the initial boundary if the ab-
sorbency of the paper is high. This is because the
ink flow in the initial region is ignored. In order to
avoid this unrealistic phenomena, the carbon particles
deposited in the diffusion region is re-distributed by
subtracting parts of the particles proportionally from
each cell and averagely putting them into the source
region to make the density of the deposited particles
continuous in the initial boundary.
If the density of the deposited carbon particles in
the diffusion region is d
m,n
and the average value at
the initial boundary is d
0
, the number of cells and the
average density in the source region are N
s
and d
s
.
Then
d
0
β = d
s
+ (1 β)
1
N
s
m,n
d
m,n
(15)
where
β =
d
s
+
1
N
s
m,n
d
m,n
d
0
+
1
N
s
m,n
d
m,n
(16)
is the coefficient to balance the dark edge,
Therefore, the carbon density at each cell in the
diffusion region can be balanced by multiplying β to
correct the dark edge problems.
7 EXPERIMENTS
7.1 Rendering of a Circular Region
For a drop of ink diffusing in a paper, the image is a
circle. The result is shown in Figure 3.
Paper size: 100 by 100 cells
Paper texture: Uniform distribution on
the interval (0.8,1.2)
Original region: a circle at the center,
diameter 40
Amount of ink: 1200
Ink density: 1
Brightness of the ink: 0.8(Maximum:1)
Average absorption rate: 0.2
PRESSURE BASED INK DIFFUSION MODEL FOR REAL-TIME SIMULATION OF CHINESE CALLIGRAPHY
275
Figure 3: Diffusion from a circular region (a) region
diffused; (b) rendering effect.
7.2 Rendering of a Chinese Character
Using the Chinese character ”ZHONG” as a sample to
show the rendering effect of our method. The result is
shown in Figure 4.
Paper size: 150 by 150 cells
Paper texture: Uniform distribution
interval (0.8,1.2)
Original region: Chinese character
"ZHONG"
Amount of ink: 2000
Ink density: 1
Brightness of the ink: 0.8(Max:1)
Average absorption rate: 0.2
Figure 4: Diffusion of a Chinese character ”Zhong”
(a) original character; (b) region diffused; (c) render-
ing effect.
The results of the two case studies showed that our
method can simulate the ink diffusion in the rice pa-
per very well. The effect of the paper texture on the
diffusion can be considered by randomized fiber den-
sity. The percolation effect can also be modeled in our
model by the randomized fiber density and absorption
rate of the paper.
8 CONCLUSION
Our ink flow model is based on the Darcy’s law. By
calculating the pressure of each node on the paper
we can simulate the physical process of ink diffusion
and percolation unlike many other methods which can
only simulate the effect of the diffusion but can not
simulate the physical process. The experiments show
that our new method can give very satisfied result in-
cluding to simulate the irregular edge and fiber struc-
ture in a realistic way. In addition, compared to the
fluid model, there is no need to solve the partial dif-
ferential equations. This means that the calculations
are fast. There are some other effects like wash out,
ink draw back which will be added into our model
later.
REFERENCES
Chu, N. S.-H. and Tai, C.-L. (2005). MoXi: Real-Time
Ink Dispersion in Absorbent Paper. SIGGRAPH 2005,
24(3):504–511.
Curtis, C. J., Anderson, S. E., Seims, J. E., Fleischer, K. W.,
and Salesin, D. H. (1997). Computer-Generated Wa-
tercolor. In Whitted, T., editor, SIGGRAPH97, CG-
PACS, pages 421–430, New York.
Guo, Q. and Kunii, T. L. (1991). Modeling the diffuse paint-
ing of sumie. IFIP Modeling in Computer Graphics,
pages 329–338.
Huang, S., Way, D., and Shih, Z. C. (2003). Physical-Based
Model of Ink Diffusion in Chinese Ink Paintings. In
Proceedings of WSCG 2003, volume 10, pages 520–
527.
Kunii, T. L., Nosovskij, G. V., and Hayashi, T. (1995). A
diffusion model for computer animation of diffuse ink
painting. pages 98–102, Geneva, Switzerland.
Lee, J. (2001). Diffusion Rendering of Black Ink Paintings
Using New Paper and Ink Models. j-CAG, 25(2):295–
308.
Strassmann, S. (1986). Hairy brush. Proc. of SIGGRAPH
’86, pages 225–232.
Succi, S. (2001). Lattice Boltzmann equation for fluid dy-
namics and beyond. Oxford University Press.
T. V. Laerhoven, J.Liesenborgs, F. R. (2004). Real-time wa-
tercolor painting on a distributed paper model. pages
640–643, Crete, Greece.
Tsai, C., Liaw, C., Huang, C., and Lee, J. (2005). Syn-
thesizing the artistic effects of ink painting. Optical
engineering, pages 359–368.
Xiaofeng Mi, Min Tang, J. D. (2004). Droplet: A virtual
brush model to simulate chinese calligraphy and paint-
ing. Journal of Computer Science and Technology,
19(3):393–404.
Yu, Y. J., Lee, D. H., Lee, Y. B., and Cho, H. G. (2003). In-
teractive Rendering Technique for Realistic Oriental
Painting. Journal of WSCG, 11:538–545.
GRAPP 2007 - International Conference on Computer Graphics Theory and Applications
276