# Transfinite mean value interpolation over polygons

Mean value interpolation is a method for fitting a smooth function to piecewise-linear data prescribed on the boundary of a polygon of arbitrary shape, and has applications in computer graphics and curve and surface modelling. The method generalizes to transfinite interpolation, i.e., to any continuous data on the boundary but a mathematical proof that interpolation always holds has so far been missing. The purpose of this note is to complete this gap in the theory.

## Authors

• 4 publications
• 4 publications
03/15/2021

### Lectures on error analysis of interpolation on simplicial triangulations without the shape-regularity assumption, Part 2: Lagrange interpolation on tetrahedrons

This is the second lecture note on the error analysis of interpolation o...
05/29/2021

### Fit without fear: remarkable mathematical phenomena of deep learning through the prism of interpolation

In the past decade the mathematical theory of machine learning has lagge...
01/21/2021

### Positive Geometries for Barycentric Interpolation

We propose a novel theoretical framework for barycentric interpolation, ...
04/14/2021

### Five Degree-of-Freedom Property Interpolation of Arbitrary Grain Boundaries via Voronoi Fundamental Zone Octonion Framework

We introduce the Voronoi fundamental zone octonion interpolation framewo...
02/19/2019

### Interpolation of scattered data in R^3 using minimum L_p-norm networks, 1<p<∞

We consider the extremal problem of interpolation of scattered data in R...
06/24/2018

### Golden interpolation

For the classic aesthetic interpolation problem, we propose a novel thou...
08/30/2021

### Constructive interpolation points selection in the Loewner framework

This note describes a constructive heuristic to select frequencies of in...
##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

One of the main uses of generalized barycentric coordinates (GBCs) is to interpolate piecewise-linear data prescribed on the boundary of a polygon with a smooth function. This kind of barycentric interpolation has been used, for example, in computer graphics, as the basis for image warping, and in higher dimension, for mesh deformation.

One type of GBC that is frequently used for this is mean value (MV) coordinates due to a simple closed formula. MV coordinates have been studied extensively in various papers [3] but while they are simple to implement, a mathematical proof of interpolation seems surprisingly difficult. A proof for convex polygons is relatively simple and follows from the fact that MV coordinates are positive in this case. Interpolation for a convex polygon holds in fact for any positive barycentric coordinates; see [4]. For arbitrary polygons, a specific proof of interpolation for MV coordinates was derived in [6].

The MV interpolant to piecewise-linear boundary data is based on integration with respect to angles around each chosen point inside the polygon. This construction extends in a natural way to any continuous boundary data thus providing a transfinite interpolant [7, 1]. Such interpolation could have various applications, one of which is its use as a building block for interpolants of higher order that also match derivative data on the boundary. However, there is currently no mathematical proof of interpolation in the transfinite setting in all cases, only numerical evidence. Like in the piecewise-linear case, when the polygon is convex, interpolation is easier to establish. In fact it was shown in [1] for more general domains, convex or otherwise, under the condition that the distance between the external medial axis of the domain and the domain boundary is strictly positive. This latter condition trivially holds for convex domains since there is no external medial axis in this case.

This still leaves open the question of whether MV interpolation really interpolates any continuous data on the boundary of an arbitrary polygon, and this is what we establish in this paper. The proof parallels that of [6] in that we treat interpolation at edge points and vertices separately: in Theorems 1 and 2 respectively. At the end of the paper we give two examples that numerically confirm the interpolation property.

In the future we would like to extend the proof of interpolation to 3D geometry such as volumes enclosed by triangular meshes [5, 7] but there does not seem to be any straightforward generalization of the proof in the 2D case, not even for piecewise-linear boundary data. It would also be interesting to establish transfinite interpolation over more general domains with weaker conditions on the shape of the boundary than those used in [1].

## 2 Definitions

Let be a polygon with vertices and edges . Suppose that is a continuous function on the boundary . We define a function as follows. For each edge , let denote the outward unit normal to with respect to , and for each point , let be its signed distance to ,

 he(x)=(y−x)⋅ne,

for any . We let be the sign of the distance,

 τe(x)=sgn(he(x)).

Let denote the unit circle in . For , let denote the circular arc on formed by projecting onto the unit circle centred at ,

 ˆe(x)={y−x∥y−x∥:y∈e},

with the Euclidean norm. This arc is just a point in the case that . Suppose

. Then for each unit vector

, let be the unique point of such that

 ye(x,μ)−x∥ye(x,μ)−x∥=μ,

and let

 Ie(x)=∫ˆe(x)1∥ye(x,μ)−x∥dμ>0,Ie(x;f)=∫ˆe(x)f(ye(x,μ))∥ye(x,μ)−x∥dμ.

In the case that , we define .

We now define

 g(x)=If(x)=∑e∈Eτe(x)Ie(x;f)/ϕ(x), (1)

where

 ϕ(x)=∑e∈Eτe(x)Ie(x). (2)

As shown in [2], if then

 Ie(x)=tan(αe(x)/2)(1∥v1−x∥+1∥v2−x∥), (3)

where is the angle at of the triangle . It was shown in [6] that for all , and in the case that is linear, interpolates .

## 3 Interpolation on an edge

###### Theorem 1

Let be an interior point of some edge of . Then as for .

• Proof. From the form of (1),

where and therefore

 |g(x)−f(y∗)|≤∑e∈EIe(x;|~f|)/ϕ(x). (4)

Let be the edge containing , as in Figure 1.

Let . By the continuity of , there is some , where

 0<δ

such that if and then . Let , , be the point such that , and let . Then,

 ∑e∈EIe(x;|~f|)=Ie0(x;|~f|)+∑e∈FIe(x;|~f|),

where

 F={[v1,y1],[y2,v2]}∪(E∖[v1,v2]),

and it follows that , where

and

 M:=supy∈∂Ω|f(y)|. (5)

Similar to , we can express as

 ϕ(x)=τe0(x)Ie0(x)+∑e∈Fτe(x)Ie(x).

For close enough to , , and then

 γ(x)ϕ(x)=ϵ+2M∑e∈FIe(x)/Ie0(x)1+∑e∈Fτe(x)Ie(x)/Ie0(x).

As , , and since for all ,

 αe(x)→αe(y∗)<π,e∈F.

Therefore, by (3), as ,

 Ie0(x)→∞andIe(x)→Ie(y∗)≠∞,e∈F.

Thus as . Hence,

 limsupx→y∗|g(x)−f(y∗)|≤ϵ

for any which shows that as .

## 4 Interpolation at a vertex

###### Theorem 2

For , as for .

• Proof. Similar to (4), from the form of (1),

 |g(x)−f(v)|≤∑e∈EIe(x;|~f|)/ϕ(x),

where .

Let and be the two neighbouring vertices of with ordered anticlockwise w.r.t.  as in Figures 2 and 3.

Let . By the continuity of , there is some , where

 0<δ

such that if is in or and then . Let , , be the point such that , and define and . Then,

 ∑e∈EIe(x;|~f|)=Ie1(x;|~f|)+Ie2(x;|~f|)+∑e∈FIe(x;|~f|),

where

 F={[v1,y1],[y2,v2]}∪(E∖{[v1,v],[v,v2]}).

It follows that , where

 γ(x)=ϵ(Ie1(x)+Ie2(x))+2M∑e∈FIe(x),

and is as in (5). We can similarly express as

 ϕ(x)=τe1(x)Ie1(x)+τe2(x)Ie2(x)+∑e∈Fτe(x)Ie(x).

Then using (3), and multiplying both and by , we have

 γ(x)ϕ(x)=ϵ(tan(αe1(x)/2)+tan(αe2(x)/2))+A(x)τe1(x)tan(αe1(x)/2)+τe2(x)tan(αe2(x)/2)+B(x),

where as . Letting and , , and using the fact that for , we can rewrite this as

 γ(x)ϕ(x)=ϵ(tan(α1(x)/2)+tan(α2(x)/2))+A(x)tan(τ1(x)α1(x)/2)+tan(τ2(x)α2(x)/2)+B(x).

Next, using the identity

 tan(β1)+tan(β2)=sin(β1+β2)cos(β1)cos(β2),

and the fact that , it follows that

 γ(x)ϕ(x)=ϵsin((α1(x)+α2(x))/2)+~A(x)sin((τ1(x)α1(x)+τ2(x)α2(x))/2)+~B(x),

where

 ~A(x) =cos((α1(x)/2)cos((α2(x)/2)A(x), ~B(x) =cos((α1(x)/2)cos((α2(x)/2)B(x),

and so also as .

Finally, we consider the two cases (i) is a convex vertex and (ii) is a concave vertex. In case (i), referring to Figure 2 we see that for close enough to , and so

 limx→vγ(x)ϕ(x)=ϵ. (6)

In case (ii), the values of and depend on the location of , even when is close to . However, for any that is close enough to , we have the identity (observed in [6])

 τ1(x)α1(x)+τ2(x)α2(x)=α[y1,y2](x).

This can be verified in the three cases illustrated in Figure 3. In the three configurations, from left to right, we have, respectively,

 α[y1,y2](x)=⎧⎨⎩α1(x)+α2(x),α1(x)−α2(x),−α1(x)+α2(x).

Thus,

 limx→v(τ1(x)α1(x)+τ2(x)α2(x))=α[y1,y2](v)=α[v1,v2](v)∈(0,π).

Since , it follows that in case (ii),

 limsupx→vγ(x)ϕ(x)≤ϵsin(α[v1,v2](v)/2). (7)

From (6) and (7) we deduce that for any type of vertex , as .

## 5 Numerical examples

In this section we present two examples of transfinite mean value interpolants of different functions over a polygonal-shaped domain in order to confirm the theoretical interpolation property proven in Sections 3 and 4. For the implementation we have evaluated the mean value interpolant using the boundary integral formula of [1]. This is more efficient than applying the definition, equation (1), which would require computing intersection points.

The first function we consider is

 f(x,y)=x2−y2

defined on the non-convex polygon in Figure 4a. Figures 4a and 4b illustrate the exact surface and Figures 4c and 4d the corresponding interpolant . Figure 4e shows the absolute error . The darker the colour the smaller the error and, as expected, the error vanishes as we get close to the boundary.

For our second example we chose the function

 f(x,y)=19[tanh(9x−9y)+1].

Figures 5a and 5b and Figures 5c and 5d show the exact surface and the interpolant, respectively, while Figure 5e shows the absolute error.

Acknowledgement.  This project has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 675789.

## References

• [1] C. Dyken and M. S. Floater, Transfinite mean value interpolation, Comput. Aided Geom. Design 26 (2009), 117–134.
• [2] M. S. Floater, Mean value coordinates, Comput. Aided Geom. Design 20 (2003), 19–27.
• [3]  , Generalized barycentric coordinates and applications, Acta Numerica 24 (2015), 161–214.
• [4] M. S. Floater, K. Hormann, and G. Kós, A general construction of barycentric coordinates over convex polygons, Adv. Comput. Math. 24 (2006), 311–331.
• [5] M. S. Floater, G. Kos, and M. Reimers, Mean value coordinates in 3D, Comput. Aided Geom. Design 22 (2005), 623–631.
• [6] K. Hormann and M. S. Floater, Mean value coordinates for arbitrary planar polygons, ACM Trans. on Graph. 25 (2006), 1424–1441.
• [7] T. Ju, S. Schaefer, and J. Warren, Mean value coordinates for closed triangular meshes, ACM Trans. on Graph. 24 (2005), 561–566.