• No results found

2.4 Pick’s formula

2.6.7 An improved Pick count

Our Pick-count policy was to assign a count value of 1 for grid points inside the polygon and a count value of 1/2 for grid points on the polygon itself. This was certainly successful since it gave us the formula

Area(P) =Pick(P)1

which works, as we now have proved, for all possible polygons with vertices at grid points.

There is another rather compelling and elegant way to do the count. This makes for a neater proof. This is not a new or different proof, we should point out. But it is a rather tidy way of expressing the same ideas.

The idea behind it is that the additive formula for the Pick count, Pick(P) +1=Pick(P1) +Pick(P2)

for the situation when the polygon P is split into two polygons P1 and P2 with

a common edge is not quite as “additive” as we would prefer: it has this extra 1 that must be included. The additional 1 comes from the two vertices that get assigned 1/2 in both the counts. That destroys the additivity, but only by a little bit. To get true additivity we will use the idea that angles are naturally additive. Angle of visibility We do a different Pick count. For each point in or on a polygon P we decide what is its angle of visibility. This is the perspective from which standing at a point we see into the inside of the polygon. For points interior to P we see a full 360 degrees. For points on an edge but not at a vertex we see only one side of the edge, so the angle of visibility is 180 degrees. Finally for points at a vertex the angle of visibility would be the interior angle and it could be anything between 0 degrees and 360 degrees. We would have to measure it in each case.

Modified Pick’s count Our modified Pick’s count is to take each grid point into consideration, compute its angle of visibility, and divide by 360 to get the contribution. Points inside get 360/360=1. Points on the edge but not at a vertex get 180/360=1/2. And, finally, points at the vertex get a/360 where a is the degree measure of the angle. The new Pick count we will write as

Pick∗(P).

Add up the count for the vertices At first sight this seems terribly compli- cated. How would we be prepared to measure all of the vertex angles? We would never be able to perform this count. But that is not so.

Take a triangle for example. Except for the three vertices the count is (as usual) to use 1 for inside points and 1/2 for edge points. The three vertices taken

2.6. SUPPLEMENTARY MATERIAL 59 together then contribute

a+b+c 360 .

While we may have trouble measuring each of angles a, b and c, we know from elementary geometry that the angles in any triangle add up to 180 degrees. So we see that the contribution at the vertices is

a+b+c 360 = 180 360= 1 2.

The old way of counting would have given us 1/2+1/2+1/2 which is 1 larger than this. Thus for any triangle T

Pick∗(T) =Pick(T)1=Area(T).

In general for a polygon with n vertices it might appear that we would have to compute the angles at each of the vertices to get the contribution

a1+a2+···+an

360 .

But the angles inside any polygon with n vertices add up to 180(n2)degrees. This is because any such polygon can be triangulated in the way we described earlier in the chapter. For example, a quadrilateral can be decomposed into two triangles by introducing a diagonal. Each of the triangles contributes 180 degrees, so the quadrilateral has a total of 2×180 degrees as the sum of its interior angles at the vertices.

Thus we see that the contribution at the vertices of a polygon with n vertices is a1+a2+···+an 360 = 180(n2) 360 = n 2−1.

Compare the old count to the new count The old way of counting would have given us 1/2 for each of the n vertices for a total of n/2 which is again 1 bigger. Thus we see that for any polygon P

Pick∗(P) =Pick(P)1=Area(P).

This also explains the mysterious1 that needed to occur in Pick’s formula. Additivity The ordinary Pick count using Pick(P)is not quite additive. Every use of the additive rule required a bookkeeping for the addition 1 in the formula

Pick(P) +1=Pick(P1) +Pick(P2).

That made our computations a bit messier and gave us a slightly non-intuitive formula

Area(P) =Pick(P)1.

Now that we have a better way of counting grid points we have a precisely additive formula

and an intuitive area formula

Area(P) =Pick∗(P).

That supplies a different way of writing our proof for Pick’s formula that is rather simpler in some of the details. See Problem67.

Problem 66 Prove the additive formula

Pick∗(P) =Pick∗(P1) +Pick∗(P2)

for the modified Pick count for the situation when the polygon P is split into two

polygons P1and P2with a common edge. Answer

Problem 67 Reformulate the proof of Pick’s formula using now the modified

Pick count to show that

Area(P) =Pick∗(P).

Answer

Problem 68 Determine a formula for the area that remains inside a polygon

with n polygonal holes using the modified Pick count idea. Answer

Problem 69 Does the formula you found in Problem68help clarify the formula we have found in Problem65for the area inside polygons with holes? Does it explain why that formula needed us to count the number of holes (i.e., why the

formula had an n that appeared)? Answer