How to calculate the area within a circle that is closest to a point? First, some discourse on the problem motivation. I am building a model for estimating subway usage in big cities. For a set of subway stations mapped by their geo coordinates, I want to find out, for each station, the total area that is within 1 km of this subway station, and closer to this  subway station than any other. 
For example, given this map centered on Downtown Crossing in Boston, I want to know the total area that is closer to Downtown Crossing than to State, Park Street, Chinatown, or South Station. 
My algorithm is as follows. For each base station: 


*

*Select all stations that are within 2 km, then find the midpoint of a line between them and the base station.

*Draw a chord on the 1km circle around the base station, that passes through each midpoint and is perpendicular to the radius of the circle.

*Find all points where those chords intersect each other or the circle

*Draw a triangle between each pair of adjacent points and the base station (conveniently isosceles)

*Find the angle of all portions of the circle with no inscribed triangle.

*Divide that angle by $2\pi$, add that fraction of the circle's area to the sum of the triangles to get total area. 


Here a picture for funzies:

I know its a mess, but you can see three stations with lines connecting to a base station (one station is off the picture to lower right), three corresponding triangles marked $T_1, T_2, T_3$, and two areas with no triangles, described by angles $\alpha_1, \alpha_2$.
The problem is basically that this is all pretty hard. I feel like I am brute forcing this, and some of the code for calculating chord intercepts and ordering the intercept points is non-trivial. I think my code is working fine, but I don't think I am using the optimal geometric solution. 
I believe that there is a simpler geometric solution to this, but I can't find it. How can I calculate the area within 1 km of a station and closer to that station than any other station?
 A: Well, to compute the area closest to the station, you could use the Voronoi diagram; computing this in 2D is straightforward and well-documented, and it's really easy to find code for it. But you want to limit yourself to 1km, so that's kind of a pain. 
Here's an alternative that'll do the job within any precision you like, and is far simpler than just about any geometric method: 


*

*Draw a box around the city, extending at least 1 km beyond the outermost subway stations in all directions. 

*Pick $N$ points at random within this box by picking two numbers, $u$ and $v$, uniformly between $0$ and $1$, say, and then adjusting to max and min latitude and longitude of your box by scaling and translation. 

*For each station, $s$, make a counter, $c[s]$, which is initially 0. 

*For each point,
i. Compute the distance to all subway stations; if none of these is less than 1km, move on to the next point. 
ii. If one of them is less than 1 km, pick the smallest, and whatever station $s$ is closest, increment $c[s]$ by one. 

*When you've allocated (or discarded) each of the $N$ points this way, compute, for each station $s$, the number $ U(s) = \frac{A}{N} c[s]$, where $A$ is the total area of the rectangle from which you selected the points. 
The numbers $U(s)$ will be roughly the areas associated to each station. If you let $N$ be, say, $100,000$ to $1,000,000$, you'll have an estimate of the area that's probably good within a couple of percent, which is way better than the approximations of your model, hence good enough. 
If you'd like, I can write 10 lines of matlab code that'll do this for you, but you'll have to enter the lat/lon positions of all the stations yourself...
N.B.: the kind of uniform sampling suggested here isn't great. If you go with some sort of stratified sampling, you can get much better estimates...but it'll take longer to get the program right, and your model probably isn't accurate enough to merit that effort. 
