Barycentric interpolation and mappings on smooth convex domains Michael S. Floater Jiˇrí Kosinka

Barycentric interpolation and mappings on smooth convex domains Michael S. Floater Jiˇrí Kosinka
Barycentric interpolation and mappings
on smooth convex domains
Michael S. Floater
Jiří Kosinka
Centre of Mathematics for Applications,
Department of Informatics, University of Oslo
PO Box 1053, Blindern
0316 Oslo, Norway
Centre of Mathematics for Applications,
Department of Informatics, University of Oslo
PO Box 1053, Blindern, 0316 Oslo, Norway
Department of Mathematics, Faculty of Applied
Sciences, University of West Bohemia
Univerzitní 8, 301 00 Plzeň, Czech Republic
[email protected]
[email protected]
ABSTRACT
In a recent paper, Warren, Schaefer, Hirani, and Desbrun
proposed a simple method of interpolating a function defined
on the boundary of a smooth convex domain, using an integral kernel with properties similar to those of barycentric coordinates on simplexes. When applied to vector-valued data,
the interpolation can map one convex region into another,
with various potential applications in computer graphics,
such as curve and image deformation. In this paper we establish some basic mathematical properties of barycentric
kernels in general, including the interpolation property and
a formula for the Jacobian of the mappings they generate.
We then use this formula to prove the injectivity of the mapping of Warren et al.
Categories and Subject Descriptors
G.1.1 [Mathematics of Computing]: Numerical Analysis—Interpolation
General Terms
Theory, Design
Keywords
Interpolation, barycentric coordinates, barycentric mapping,
injectivity.
1.
INTRODUCTION
Generalizations of barycentric coordinates to arbitrary polygons and polyhedra have become a useful mathematical tool
in various areas of computer graphics, such as shading, plane
and space deformation, and animation. Mean value coordinates have emerged as a popular choice, due to their generality and surprising robustness over complex geometric
shapes [5, 10, 18, 3, 7, 4, 8, 12, 15, 16]. For the specific case
of convex polygons and polyhedra, however, the coordinates
of Wachspress and their generalizations due to Warren et
al. [20, 22, 24, 13, 23] can be used instead, and the fact that
they can be expressed in the form of rational functions can
be viewed as an advantage; planar mean value coordinates
involve square roots. We also now know [8] that barycentric mappings between convex polygons are always injective
when based on Wachspress coordinates; in contrast, mean
value coordinates can lead to fold-over, albeit in rather extreme cases. Related studies of barycentric coordinates and
applications can be found in [6, 11, 15, 17, 21, 19, 25].
The main purpose of this paper is to investigate properties of
the integral-based coordinates proposed by Warren, Schaefer, Hirani, and Desbrun [24] for convex sets with smooth
boundary. These coordinates are a continuous analog of
Wachspress coordinates; there is now one coordinate function for every point on the boundary curve, and one can
view the whole set of coordinate functions as a single bivariate function that can be used as an integral kernel for
interpolating data on the boundary. Our main result is to
show that mappings between convex sets based on this kernel are always injective. In addition, we establish some basic
mathematical properties of barycentric kernels in general,
including the interpolation property and a formula for the
Jacobian of the mappings they generate.
Let Ω be a bounded, open, strictly convex region of R2 with
boundary ∂Ω. By strict convexity we mean that no three
points on ∂Ω are collinear. Suppose that p : [a, b] → R2 ,
with p(a) = p(b), is a continuous parametric representation
of ∂Ω, which is injective in [a, b). Given a continuous function f : ∂Ω → R we are interested in finding an interpolant
g : Ω → R, i.e., a function with the property that for any
t ∈ [a, b),
g(x) → f (p(t))
as
x → p(t),
for
x ∈ Ω.
One possible way of constructing such an interpolant is by
an integral of the form
Z b
g(x) =
λ(x, t)f (p(t)) dt.
(1)
a
Here, we assume that both f and the kernel λ are continuous in t. As we will see there are various choices of the
kernel λ that guarantee the interpolation property: that g
interpolates f .
One example is the Poisson kernel in the case that Ω is the
unit disc. With a = −π, b = π, and p(t) = (cos t, sin t), the
Poisson kernel is
1 − kxk2
.
2π(1 − 2x · p(t) + kxk2 )
λ(x, t) =
It is well known [1] that in this case g is the unique harmonic
extension of f to Ω, i.e., g is the solution to
∆g = 0
g=f
Lemma 1. For any s1 , s, s2 , with a ≤ s1 < s < s2 < b,
let J = [a, b] \ [s1 , s2 ]. If λ is barycentric then, for x ∈ Ω,
Z
λ(x, t) dt → 0 as x → p(s).
J
Proof. Let L be any infinite line passing through p(s)
that lies to one side of Ω. Such a line must exist because Ω
is convex. Then, for any x ∈ Ω let h(x) denote the perpendicular height of x from L. Algebraically we can express h
as the scalar product
in Ω,
h(x) = n · (x − p(s)),
in ∂Ω.
An interesting alternative construction of this harmonic interpolant in terms of averages of linear interpolants to f was
given in [9]. See also Section 3 of [2].
Recently, two kernels have been found that yield interpolation for any convex domain, with smooth enough boundary.
Warren, Schaefer, Hirani, and Desbrun [24] proposed the
kernel
.Z b
λ(x, t) = w(x, t)
w(x, s) ds,
(2)
a
where n is the unit vector perpendicular to L that points
into Ω. Since h is a linear function, the linear precision
property of λ implies that
Z b
h(x) =
λ(x, t)h(p(t)) dt.
a
Due to the non-negativity of λ(x, t) it follows that
Z
h(x) ≥
λ(x, t)h(p(t)) dt.
J
Moreover, due to the convexity of Ω, we have, for t ∈ J,
where
p′ (t) × p′′ (t)
,
w(x, t) =
((p(t) − x) × p′ (t))2
h(p(t)) ≥ min{h(p(s1 )), h(p(s2 ))},
(3)
for domains for which p ∈ C 2 [a, b], with × denoting the
cross product of vectors in R2 , i.e., p × q := p1 q 2 − p2 q 1 ,
where p = (p1 , p2 ) and q = (q 1 , q 2 ). Later, following the
integral construction of mean value coordinates [5], a ‘mean
value’ kernel was found [12, 4], namely (2) with w replaced
by
w(x, t) =
(p(t) − x) × p′ (t)
,
kp(t) − xk3
which is defined for p ∈ C [a, b].
INTERPOLATION
We will say that the kernel λ in (1) is barycentric if for all
x ∈ Ω,
λ(x, t) ≥ 0,
Z
Z
t ∈ [a, b),
and since h(x) → 0 as x → p(s), the lemma clearly follows.
Due to the lemma, we can now prove the interpolation property, using a similar approach to that of Theorem 4 of [4].
1
2.
which is strictly positive due to the strictness of the convexity of Ω. Thus we have the upper bound,
Z
h(x)
λ(x, t) dt ≤
,
min{h(p(s
1 )), h(p(s2 ))}
J
(4)
b
λ(x, t) dt = 1,
(5)
λ(x, t)p(t) dt = x.
(6)
a
b
a
In this section we show that if λ is any barycentric kernel
and f in (1) is continuous then g interpolates f . A crucial
point that makes this work is the strict convexity of Ω.
We start by deriving a property of the coordinates that
makes precise the intuitive idea that if λ is barycentric then
λ(x, ·) converges to a delta function as x converges to a
boundary point. To show this we will use the linear precision property of such λ, namely that if L is some linear
polynomial, L(x) = a0 + a1 x + a2 y, where x = (x, y), and
f = L|∂Ω then g = L|Ω . This follows from the two equations
(5) and (6).
Theorem 1. If λ is barycentric and f is continuous then
g interpolates f .
Proof. Let p(s) be any boundary point and let ǫ > 0.
Since f ◦ p is continuous at t = s, we can choose γ > 0
small enough that |f (p(t)) − f (p(s))| < ǫ/2 for t ∈ I, where
I = [s − γ, s + γ]. Next, observe that for x ∈ Ω,
Z b
`
´
g(x) − f (p(s)) =
λ(x, t) f (p(t)) − f (p(s)) dt.
a
R
Rb R
We can split this integral into two parts, a = I + J , where
J = [a, b] \ I. Then, with M := supy∈∂Ω |f (y)|,
Z
|g(x) − f (p(s))| ≤ sup |f (p(t)) − f (p(s))| λ(x, t) dt
t∈I
I
Z
+ 2M
λ(x, t) dt,
J
and since
R
I
λ(x, t) dt ≤ 1,
|g(x) − f (p(s))| <
ǫ
+ 2M
2
Z
λ(x, t) dt.
J
f
Ψ
Ω
q(t)
p(t)
Figure 1: Barycentric mappings between convex domains.
By Lemma 1, there is some δ > 0 such that if kx−p(s)k ≤ δ
then
Z
ǫ
λ(x, t) dt <
,
4M
J
in which case |g(x) − f (p(s))| < ǫ.
3.
BARYCENTRIC MAPPINGS
Let Ψ ⊂ R2 be a second convex domain, whose boundary
∂Ψ is represented parametrically as q : [a, b] → R2 , which is
continuous and injective in [a, b), with q(a) = q(b). We can
associate with any barycentric kernel λ a mapping f : Ω →
R2 by
Z b
f (x) =
λ(x, t)q(t) dt,
x ∈ Ω.
(7)
a
By the interpolation property, if Ω is strictly convex we know
that f (x) → q(t) as x → p(t) for x ∈ Ω and so we can
continuously extend f to ∂Ω by defining f (p(t)) = q(t).
An important question though is whether f is a one-to-one
mapping from Ω̄ to Ψ̄. Certainly, by the convexity of Ψ, the
point f (x), being a weighted positive average of the boundary points q(t), must belong to Ψ, so f maps Ω̄ to Ψ̄. The
remaining question is whether f is injective. Assuming p
and q are anticlockwise parameterizations, as in Fig. 1, the
injectivity of f reduces to the question of whether its Jacobian is positive in Ω. To help in answering this we derive a
useful formula for the Jacobian, analogous to the one in [8],
Let f (x) = (f (x), g(x)), and ∂r h(x) := ∂h/∂xr , r = 1, 2.
Then the Jacobian of f is the determinant
˛
˛
˛∂1 f ∂1 g ˛
˛.
˛
J(f ) = ˛
∂2 f ∂2 g ˛
For differentiable functions h1 (x), h2 (x), h3 (x), let
˛
˛
˛ h1
h2
h3 ˛˛
˛
D(h1 , h2 , h3 ) = ˛˛∂1 h1 ∂1 h2 ∂1 h3 ˛˛ .
˛∂2 h1 ∂2 h2 ∂2 h3 ˛
Moreover, we define A(a, b, c) as the signed area of the triangle [a, b, c],
˛
˛
˛1 1 1˛
1 ˛˛ 1 1 1 ˛˛
A(a, b, c) = ˛a b c ˛ ,
2 ˛ 2 2 2˛
a b c
where a = (a1 , a2 ), b = (b1 , b2 ), c = (c1 , c2 ).
Lemma 2. If λ is a barycentric kernel, differentiable with
respect to the second variable, then
ZZZ
J(f )(x) = 2
D(λ(x, s), λ(x, t), λ(x, u))
a≤s<t<u≤b
× A(q(s), q(t), q(u)) ds dt du.
Proof. Differentiating (5) and (7) gives the matrix equation
1
0
1 f (x)
g(x)
@0 ∂1 f (x) ∂1 g(x)A =
0R ∂2 f (x) ∂2 g(x) R
1
0 R
λ(x,
t)
dt
R
R λ(x, t)q1 (t) dt R λ(x, t)q2 (t) dt
A
@ ∂1 λ(x, t) dt
R
R ∂1 λ(x, t)q1 (t) dt R ∂1 λ(x, t)q2 (t) dt ,
∂2 λ(x, t) dt
∂2 λ(x, t)q1 (t) dt
∂2 λ(x, t)q2 (t) dt
with q(t) = (q1 (t), q2 (t)), and all integrals over t ∈ [a, b].
Therefore, J(f )(x) is the determinant of the 3 × 3 matrix
on the right hand side. We now use the integral version
of the Cauchy-Binet theorem (c.f. [14], Formula (2.5)). For
functions A1 , . . . An and B1 , . . . , Bn , the theorem states that
˛„Z
« ˛˛
˛
b
˛
˛
Ai (t)Bj (t) dt ˛ =
˛
˛
˛ a
ij
Z
˛
˛˛
˛
˛
˛˛
˛
˛(Aj (ti ))ij ˛ ˛(Bj (ti ))ij ˛ dt1 dt2 · · · dtn .
a≤t1 ≤t2 ≤···≤tn ≤b
Putting n = 3 and letting A1 (t) = λ(x, t), A2 (t) = ∂1 λ(x, t),
A3 (t) = ∂2 λ(x, t), and B1 (t) = 1, B2 (t) = q1 (t), and B3 (t) =
q2 (t) in this formula gives the result.
Since all areas A(q(s), q(t), q(u)) in Lemma 2 are positive
this gives a sufficient condition for injectivity.
Theorem 2. If
D(λ(x, s), λ(x, t), λ(x, u)) > 0
for all x ∈ Ω and all a ≤ s < t < u ≤ b then f is injective.
4. THE MAPPING OF WARREN ET AL.
Consider now the barycentric kernel (2–3). The barycentric
property (6) was established for this kernel in Section 3.2
of [24] as the special, planar case of a remarkable general
p(u)
r1
τt
r2
Ω
p(s)
τu
r3
p(t)
τs
Figure 2: A triangle formed by three tangents of p.
formula in arbitrary dimension involving Gauss curvature,
which was proved using Stoke’s theorem and an implicit representation of ∂Ω. For the planar case, we have found a
simpler proof of (6), which is as follows. We first note that
due to the form of λ in (2), equation (6) is equivalent to
Z b
w(x, t)(p(t) − x) dt = 0.
(8)
a
To show this we express the vector p(t) − x as a linear combination of the two vectors p′ (t) and p′′ (t):
Proof. By Theorem 2 and Lemma 2 of [8] it is sufficient
to show that
D(w(x, s), w(x, t), w(x, u)) > 0
for all a ≤ s < t < u ≤ b and for all x ∈ Ω, with w in (3).
The main steps of the proof are now similar to those in the
proof of Theorem 3 of [8]. One can see that
D(w(x, s), w(x, t), w(x, u)) = w(x, s)∇w(x, t) × ∇w(x, u)
+ w(x, t)∇w(x, u) × ∇w(x, s)
+ w(x, u)∇w(x, s) × ∇w(x, t),
p(t) − x = k(t)p′ (t) + l(t)p′′ (t).
Taking the cross product of this equation first with p′′ (t),
then with p′ (t) gives the solutions
(p(t) − x) × p′′ (t)
,
k(t) =
p′ (t) × p′′ (t)
(p(t) − x) × p′ (t)
l(t) = −
.
p′ (t) × p′′ (t)
where ∇w := (∂1 w, ∂2 w), and a simple calculation shows
that
∇w(x, t) = w(x, t)
where p⊥ = (−p2 , p1 ). It follows that
It follows that
w(x, t)(p(t) − x) = m(t)p′ (t) − n(t)p′′ (t),
∇w(x, s) × ∇w(x, t) = 4w(x, s)w(x, t)R(s, t),
where
where
′′
(p(t) − x) × p (t)
m(t) = `
´2 ,
(p(t) − x) × p′ (t)
n(t) =
1
.
(p(t) − x) × p′ (t)
Then, using the fact that
′ ′
′′
((p − x) × p ) = (p − x) × p ,
−2p′ (t)⊥
,
(p(t) − x) × p′ (t)
R(s, t) =
p′ (s) × p′ (t)
,
((p(s) − x) × p′ (s))((p(t) − x) × p′ (t))
and consequently
D(w(x, s), w(x, t), w(x, u))
= 4(R(t, u) + R(u, s) + R(s, t)).
w(x, s)w(x, t)w(x, u)
′
we have n (t) = −m(t). Hence
w(x, t)(p(t) − x) = −(np′ )′ (t),
and integrating this equation with respect to t from a to b
gives (8) because n(a)p′ (a) = n(b)p′ (b).
With the knowledge that the kernel (2–3) is barycentric, we
are now ready to establish the injectivity of the mappings it
generates.
Theorem 3. Let Ω be a strictly convex domain with a
C 2 boundary curve and let Ψ be any convex domain. Then
f : Ω̄ → Ψ̄ given by (7) and (2–3) is injective.
So, in analogy to the proof of Theorem 3 in [8], the task is
to show that the sum of the three terms R(u, s), R(s, t), and
R(t, u) is positive. By the convexity of Ω and the ordering
s < t < u, at least two of these terms must be positive.
Thus, without loss of generality, it is sufficient to show that
the sum is positive in the case that R(u, s) > 0, R(s, t) > 0,
and R(t, u) < 0, as illustrated in Fig. 2. Then, with τt
denoting the tangent line at p(t), consider the three lines
τs , τt , τu . They intersect in three points: r1 the intersection
of τu and τs ; r2 the intersection of τu and τt ; and r3 the
intersection of τs and τt . Then, it is easy to see that
R(t, u) =
(r3 − r2 ) × (r2 − r1 )
((p(t) − x) × (r3 − r2 ))((p(u) − x) × (r2 − r1 ))
and thus
R(t, u) = −
A(r1 , r2 , r3 )
,
2A(x, r2 , r3 )A(x, r1 , r2 )
[9]
R(u, s) =
A(r1 , r2 , r3 )
,
2A(x, r1 , r2 )A(x, r1 , r3 )
[10]
R(s, t) =
A(r1 , r2 , r3 )
,
2A(x, r1 , r3 )A(x, r2 , r3 )
[11]
and hence
R(t, u) + R(u, s) + R(s, t) =
A(r1 , r2 , r3 )2
> 0.
2A(x, r1 , r2 )A(x, r2 , r3 )A(x, r1 , r3 )
[12]
[13]
5.
EXAMPLES
In this section we illustrate our results by several examples.
The interpolation property of the kernel (2–3) is demonstrated in Fig. 3 a). Fig. 3 b) depicts a mapping between
strictly convex domains generated by it. The small circles denote points with the same parameter values. Several curves similar in shape to the domain boundary and
their images are depicted too. Since the image curves do
not mutually intersect, the figure confirms the injectivity of
the mapping.
Now consider the situation depicted in Fig. 4, top left. The
domain boundary is given by a C 2 cubic spline curve whose
control polygon is shown as well. By moving the control
points of the spline curve the domain is deformed accordingly. Several such deformations (taken from an animation)
are shown in Fig. 4. Observe in the last frame (bottom right)
that the deformation is no longer injective.
6.
REFERENCES
[1] S. Axler, P. Bourdon, and W. Ramey. Harmonic
Function Theory. Springer-Verlag, 1992.
[2] A. Belyaev. On transfinite barycentric coordinates. In
Eurographics symposium on geometry processing,
pages 89–99. Eurographics Association, 2006.
[3] S. Bruvoll, and M. S. Floater. Transfinite mean value
interpolation in general dimension. Journal of
Computational and Applied Mathematics,
233(7):1631–1639, February 2010.
[4] C. Dyken and M. S. Floater. Transfinite mean value
interpolation. Comp. Aided Geom. Design,
26(1):117–134, January 2009.
[5] M. S. Floater. Mean value coordinates. Comp. Aided
Geom. Design, 20(1):19–27, March 2003.
[6] M. S. Floater, K. Hormann, and G. Kós. A general
construction of barycentric coordinates over convex
polygons. Adv. in Comp. Math., 24(1–4):311–331,
January 2006.
[7] M. S. Floater, G. Kós, and M. Reimers. Mean value
coordinates in 3D. Comp. Aided Geom. Design,
22(7):623-631, October 2005.
[8] M. S. Floater and J. Kosinka. On the injectivity of
Wachspress and mean value mappings between convex
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
[22]
[23]
[24]
[25]
polygons. Adv. in Comp. Math., 32(2):163–174,
February 2010.
W. J. Gordon and J. A. Wixom. Pseudo-harmonic
interpolation on convex domains. SIAM J. Numer.
Anal., 11(5):909–933, October 1974.
K. Hormann and M. S. Floater. Mean value
coordinates for arbitrary planar polygons. ACM
Trans. on Graph., 25(4):1424–1441, October 2006.
P. Joshi, M. Meyer, T. DeRose, B. Green, and T.
Sanocki. Harmonic coordinates for character
articulation. ACM Trans. on Graph., 26(3):71, July
2007.
T. Ju, S. Schaefer, and J. Warren. Mean value
coordinates for closed triangular meshes. ACM Trans.
on Graph., 24:561–566, August 2005.
T. Ju, S. Schaefer, J. Warren, and M. Desburn. A
geometric construction of coordinates for convex
polyhedra using polar duals. In Eurographics
Symposium on Geometry Processing, pages 181–186.
Eurographics Association, 2005.
S. Karlin. Total positivity. Vol. I, Stanford University
Press, Stanford, CA, 1968.
T. Langer, A. Belyaev, and H.-P. Seidel. Spherical
barycentric coordinates. In Eurographics symposium
on geometry processing, pages 81–88. Eurographics
Association, 2006.
T. Langer, A. Belyaev, and H.-P. Seidel. Mean value
coordinates for arbitrary spherical polygons and
polyhedra in R3 . In Modern Methods in Mathematics,
pages 193–202. Avignon, 2007.
T. Langer and H.-P. Seidel. Higher order barycentric
coordinates. Computer Graphics Forum (Proc.
Eurographics), 27(2):459–466, April 2008.
Y. Lipman, J. Kopf, D. Cohen-Or, and D. Levin.
GPU-assisted positive mean value coordinates for
mesh deformation. In Eurographics Symposium on
Geometry Processing, pages 117–123. Eurographics
Association, 2007.
Y. Lipman, D. Levin, and D. Cohen-Or. Green
Coordinates. ACM Trans. on Graph., 27(3):1–10,
August 2008.
M. Meyer, A. Barr, H. Lee, and M. Desbrun.
Generalized barycentric coordinates on irregular
polygons. Journal of graphics tools, 7(1):13–22,
November 2002.
S. Schaefer, T. Ju, and J. Warren. A unified integral
construction for coordinates over closed curves. Comp.
Aided Geom. Design, 24(8–9):481–493, November
2007.
E. L. Wachspress. A rational finite element basis.
Academic Press, New York, 1975.
J. Warren. Barycentric coordinates for convex
polytopes. Adv. in Comp. Math., 6(1):97–108,
December 1996.
J. Warren, S. Schaefer, A. Hirani, and M. Desbrun
Barycentric coordinates for convex sets. Adv. in
Comp. Math., 27(3):319–338, October 2007.
O. Weber, M. Ben-Chen, and C. Gotsman. Complex
barycentric coordinates with applications to planar
shape deformation. Computer Graphics Forum (Proc.
Eurographics), 28(2):587–597, 2009.
Ω
a)
Ψ
b)
Figure 3: A barycentric interpolant and a barycentric mapping between convex domains.
Figure 4: A sequence of figures corresponding to several frames of an animation. Top left shows
the original shape, the others various deformations of the shape. Bottom right depicts a concave
shape inducing a non-injective deformation.
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement