27.01.2014 Views

Barycentric Coordinates for Arbitrary Polygons in the Plane

Barycentric Coordinates for Arbitrary Polygons in the Plane

Barycentric Coordinates for Arbitrary Polygons in the Plane

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

BARYCENTRIC COORDINATES FOR ARBITRARY POLYGONS 5<br />

r i+1<br />

v i–1<br />

v<br />

v i+1<br />

α<br />

α i<br />

r i–1 i–1<br />

A i Ψ<br />

v i<br />

A i–1 r i<br />

v<br />

B i<br />

Ψ<br />

C i<br />

v i–1<br />

v i<br />

v i+1<br />

Figure 2: Notation used <strong>for</strong> angles, areas, and distances.<br />

and<br />

B i (v) = r i−1 (v)r i+1 (v) s<strong>in</strong>(α i−1 (v) + α i (v))/2 (6)<br />

are <strong>the</strong> signed areas of <strong>the</strong> triangles [v, v i , v i+1 ] and [v, v i−1 , v i+1 ], respectively 4 ; see<br />

Figure 2. It is well-known (Coxeter, 1969) that<br />

A i (v), −B i (v), A i−1 (v)<br />

are <strong>the</strong> homogeneous barycentric coord<strong>in</strong>ates <strong>for</strong> any v ∈ IR 2 with respect to <strong>the</strong> triangle<br />

△ i = [v i−1 , v i , v i+1 ], <strong>in</strong> o<strong>the</strong>r words,<br />

A i (v)(v i−1 − v) − B i (v)(v i − v) + A i−1 (v)(v i+1 − v) = 0. (7)<br />

Note that every vertex v i of Ψ has a correspond<strong>in</strong>g coord<strong>in</strong>ate <strong>in</strong> each of <strong>the</strong> three<br />

triangles △ i−1 , △ i , and △ i+1 . We can now take <strong>for</strong> every v i a weighted average of<br />

<strong>the</strong>se three coord<strong>in</strong>ates and def<strong>in</strong>e<br />

w i (v) = b i−1 (v)A i−2 (v) − b i (v)B i (v) + b i+1 (v)A i+1 (v), (8)<br />

where <strong>the</strong> weight functions b i : IR 2 → IR can be chosen arbitrarily. Then it follows<br />

immediately from (7) that <strong>the</strong>se functions w i are homogeneous barycentric coord<strong>in</strong>ates<br />

with respect to Ψ, i.e. <strong>the</strong>y satisfy Equation (2).<br />

The critical part now is <strong>the</strong> normalization of <strong>the</strong>se homogeneous coord<strong>in</strong>ates, i.e. to<br />

guarantee that <strong>the</strong> denom<strong>in</strong>ator <strong>in</strong> (3) is non-zero <strong>for</strong> every v ∈ IR 2 .<br />

For convex polygons this is relatively easy to achieve. Indeed, it can be derived<br />

from (8) that<br />

n∑<br />

n∑<br />

W (v) = w i (v) = b i (v)C i , (9)<br />

i=1<br />

where C i = A i−1 (v) + A i (v) − B i (v) is <strong>the</strong> signed area of △ i ; see Figure 2. Now, if<br />

Ψ is convex <strong>the</strong>n all C i have <strong>the</strong> same sign (which depends on <strong>the</strong> orientation of Ψ) and<br />

so as long as all <strong>the</strong> weight functions b i are positive (or negative) <strong>the</strong>n W (v) can never<br />

be zero.<br />

4 Note that we always treat <strong>in</strong>dices cyclically with respect to each of <strong>the</strong> components <strong>in</strong> Ψ. Hence, if<br />

Ψ is a set of two polygons with n 1 and n 2 vertices, <strong>the</strong>n e n1 = (v n1 , v 1 ) and B n1 +1(v) is <strong>the</strong> area of<br />

[v, v n1 +n 2<br />

, v n1 +2].<br />

i=1<br />

Technical Report IfI-05-05

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!