Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given a point $(x,y)\in [0,1]^2$ and $r > 0$, I would like to derive a general formula for the area of the intersection of the circle of radius $r$ centered at $(x,y)$ and the unit square.

What is the best approach for this?

I have thought of a divide-and-conquer approach using cases, but there are quite a few, so I'm wondering if this could be done more elegantly. Perhaps a double integral could help?

enter image description here

share|cite|improve this question
up vote 0 down vote accepted

Here's the closest I can think of to a general formula, which will be much easier if we let the circle be a unit circle such that the 'corner' still exists in the top left. I.e. let there be four points of intersection.

Let the orange path be denoted by $C_1$ and the green path by $C_2$. Then the area of the region will be the areas enclosed by the paths $C_1$ and $C_2$ subtracted from the total area of the circle. For a general circle centered at $(x, y)$ of radius $1$, you should be able to find a general formula for the intersection points. From there, you need to find parametrizations for the paths $C_1$ and $C_2$. If you haven't given up in frustration by this point, you can now apply the following:

$$Area = \pi r^2 -\iint_{C_1}dA - \iint_{C_2}dA$$

And applying Green's theorem:

$$Area = \pi r^2 - \int_{C_1}(xdy - ydx) - \int_{C_2}(xdy - ydx)$$

From here, you can get a general solution to this, but it will take a lot of work, and the final result will be a mess, even with the simplifications at the beginning. If you further add the restriction that the circle be translated equal amounts up and to the left, that will further simplify things.

share|cite|improve this answer

The formula will be a mess, no matter how you look at it. There will be a lot of cases, period. My advice is that you should look at which sides of the square the circle intersects with, and how many times (once, twice or zero times for each side). Of course, there are some combinations which will not be possible, but the only way I see how to do it is this "brute force" approach.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.