1077-2626 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/TVCG.2015.2476788, IEEE Transactions on Visualization and Computer Graphics
JOURNAL OF IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, VOL. 13, NO. 9, SEPTEMBER 2015 3
Fig. 1. Update of the distance and indicator functions. Middle: For a point
(green) in space, we trace back a step to find its previous position (blue).
Left: Distance and indicator functions are then updated by exact com-
putation from the interface meshes in previous position. Right: Once the
distance and indicator functions are updated, we process to construct a
new interface mesh with the contouring algorithm.
Now we outline our method, formally. Given an N-
phase problem (see Figure 1) equipped with an unsigned
distance function
φ(x), which denotes the distance mea-
sured from
x to the nearest point on the interface, an
indicator function
χ(x), which indicates the phase material,
and an explicit surface mesh, we formulate the tracking
of multiphase interfaces as a contouring problem which
consists of three steps as follows:
1) Update
φ and χ using semi-Lagrangian method. φ
and χ are computed exactly to improve the accura-
cy.
2) Contour
φ and χ to get the new interface meshes.
This is performed with precomputed stencils com-
bined with bisection to get accurate estimations of
intersections and junctions.
3) Redistance
φ and χ.Asφ is most accurate near the
interface, we propagate the values near the interface
to the whole domain to stay in good accuracy.
To advect
φ(x) and χ(x) forward, we use the semi-
Lagrangian method [33] to backtrace the point
x through the
streamline of the velocity field
v over a time Δt and assign
the new value with the value at its previous location, i.e.,
φ(x)=φ(x − Δtv), χ(x)=χ(x − Δtv). Here, φ(x − Δtv)
is computed from the explicit surface mesh at the previous
time step, according to [7], and the calculation of
χ(x−Δtv)
requires a special treatment to the representation of the
surface meshes (Section 4). Then, we will reconstruct the
surface meshes from
φ and χ instead of advancing the
meshes forward to avoid the complex remeshing during the
topological changes. The key point of this part is to guar-
antee that the reconstructed surface meshes are watertight
and smooth (Section 5). Finally, since it is expensive to track
multiphase interfaces on a uniform grid, we use an octree
(quadtree in 2D) to store
φ and χ. We only maintain the
finest cells near the interfaces. As long as the interfaces
are moved, we will adjust the tree’s structure to keep it
balanced. Section 6 gives the details how to build the octree
to well resolve
φ and χ and how to compute φ and χ for the
tree structure efficiently.
4DISTANCE AND INDICATOR COMPUTATION
Our multiphase system consists of two parts: an implicit
part, which contains an unsigned distance function
φ as
well as an indicator function
χ, and an explicit part, which
corresponds to the surface meshes. Since the implicit part is
Fig. 2. Indicator computation near a vertex. Only when two neighboring
segments form an angle no less than 180 degrees, the closest point y
can lie on the vertex. In such case, x must lie in the region form by l
1
and l
2
. l
1
and l
2
are perpendicular to t
1
and t
2
respectively. For x
1
, n
1
is used to compute the indicator value while n
2
is used for x
2
according
to our method. In a non-manifold setting, there can be a third segment
incident on a vertex, say t
3
. Imagine rotating t
1
and t
2
about vertex y to
t
3
, we can easily see that |E| = |(x − y ) · n
3
| is always smaller than that
of t
1
or t
2
as |E| keep decreasing to zero when rotating t
1
and t
2
to l
3
until one of them gets over t
3
. Thus, t
1
or t
2
is always used to compute
the indicator value accurately.
similar to the one in VIIM, we only discuss the explicit part
here.
To avoid complicated remeshing operations, we will
always reconstruct the surface meshes from the isocontour
φ(x)=0, from which both the distance function and the
indicator function can be updated accurately. The explicit
representation of the surface mesh is similar to [7], except
that the triangle mesh in our method may be non-manifold
(one edge is shared by more than two triangles) and contains
complex structures such as the T-junctions. Then, it raises
a question: how can we identify a material at any point
x without using a binary inside/outside classification of
space? In our implementation, we follow Da and the col-
leagues’ work [34] to assign a unique integer label to each
material and apply different labels to the front and back
of each triangle. Besides, we store an extra normal on each
face of the triangle mesh to facilitate the calculation of the
indicator function. The normal will be always pointing from
a higher material label to a lower one. Now, we will show
how such information is used to divide the entire problem
domain into separate regions of materials.
4.1 Material Identification
Since the distance function can be computed according
to [7], we only discuss how to get the indicator function
here. We first consider a 2D case. For an arbitrary point
x, we denote its closest point on the curve as y and the
corresponding normal as
n(y), which is assumed to point
from material
A to B. To identify the material label for x,
we first calculate the following quantity:
E =(x − y) · n(y) (1)
If
y lies inside the edge, the material label can easily be
determined from the sign of
E. More specifically, E > 0
means the point x belongs to material B while E < 0
means it belongs to material A. However, if the point y
lies on the vertex, different values of E can be obtained if we
use the normal defined on different edges. We remove this
ambiguity by choosing the one with the maximum value of