This problem was inspired by Charlie's
"Continental Pole of Inaccessibility" problem.
An irregular two dimensional shape is depicted below. Using the unit markings find the following:
1. The "center of mass" for the shape.
2. The point on the shape that lies furthest from the edge.
8 +---+---+---+ +---+---+
| | | |
7+---+ +---+ +---+
| |
6+ +
| |
5+ +---+
| |
4+ +---+
| |
3+ +---+
| |
2+ +---+
| |
1+ +---+---+
| |
0+---+---+---+---+---+---+
0 1 2 3 4 5 6 7 8
The center of mass has an x coordinate that's the weighted average of the x coordinates of the pieces making it up. If it consists of all squares, then the weights are all 1. If we consider as vertical rectangles, then the weights are the heights of these rectangles (in the figure considered). The same applies to the y-coordinates.
For both the x and y coordinates, we need the total area, which is 7+3*8+7+8+7+4 = 57.
For the x coordinate:
The number of squares in each column is multiplied by the middle x-coordinate of the given column, and the results are added and the sum divided by the total number of squares:
(7*.5 + 8*1.5 + 8*2.5 + 8*3.5 + 7*4.5 + 8*5.5 + 7*6.5 + 4*7.5) / 57 = 3.76315789473684
Likewise for the y-coordinate:
(6*.5 + 8*1.5 + 7*2.5 + 8*3.5 + 7*4.5 + 8*5.5 + 8*6.5 + 5*7.5) / 57 = 3.95614035087719
So the center of mass is at (3.76315789473684, 3.95614035087719)
The point (3,3) is 3 units to the nearest border point, but the same is true for (3,y) where y is at least as high as 4. Furthermore, other points can be farther than 3 units from the border.
The point (3.5, 3.5) is 3.5 from the bottom and from the left side, and 3.535533905932738 from each of (4,7), (7,3) and (7,4), so it could use a motion toward the latter points, away from the left side and bottom sides.
As the point rises with increasing x and y, it will get closer to (4,7) and (7,4). It will also get closer to (7,3), but not as rapidly, so that point can be discounted.
By the symmetry we want a point where x=y and (7-y)^2+(4-x)^2 = x^2.
That's (7-x)^2 + (4-x)^2 = x^2
49 - 14x + 16 - 8x + 2x^2 = x^2
2x^2 - 22x + 65 = x^2
x^2 - 22x + 65 = 0
x = (22 +/- sqrt(224))/2
The one that makes sense in context is (22 - sqrt(224))/2 = 3.5166852264521, so the point farthest from the edge is (3.5166852264521, 3.5166852264521), and that x or y value is the distance.
|
Posted by Charlie
on 2008-09-09 16:15:31 |