Area of a decentered circunference 
Possible Duplicate:
Area of a portion of an arbitrarily-placed circle? 

Given a circunference of radius $R$ with the center in $P\equiv(x_0,y_0)$
$$(x-x_0)^2+(y-y_0)^2=R^2$$
I need to know the area of the circunference in each of the four quadrants of the cartesian plane, assuming the following inequality holds:
$$R^2\gt (x_0^2+y_0^2)$$
Obviously in the centered case 
$$x_0=0,y_0=0$$
the area in each sector is equivalent and it's:
$A=\frac{1}{4}\pi R^2$
Thanks in advance
 A: I imagine that this problem has something to do with superimposing a circle onto a square grid, although I of course could be wrong.  (I did similar computations a long time ago, in connection with a lithography simulation software package I was writing.)
I am not going to write you up a complete solution because I believe such a solution involves enumerating special cases for various values of $x_0$, $y_0$, and $R$ that will produce different geometrical considerations.  I will, however, work out a simple case that I hope will be able to help you see how to proceed.  I apologize for not having a picture available.
Consider the case where $(x_0,y_0)$ is in the first quadrant so that the circle crosses both the $x$ and $y$ axes (i.e., $x_0<R$ and $y_0<R$).  One may think that the job is merely solving for $y(x)$ in terms of $x$ and evaluating $\int dx \: y(x) $.  The problem is that, within the quadrant, the circle is not really a function.  In this case (and a picture would help enormously here, I again apologize), there is a point at which the circle doubles back on itself, then crosses the $x$ axis.  We can compute where the circle crosses the $x$ axis:
$$ x_{\pm} = x_0 \pm \sqrt{R^2 - y_0^2} $$
We are interested in $x_+$ here.  When $x \in [0,x_+]$, the circle is indeed a function, and we can consider this a first part of the area $A_1$:
$$A_1 = \int_0^{x_+} dx \: y_+(x) $$
where $y_+(x) = y_0 + \sqrt{R^2-(x-x_0)^2}$.  (I will return to the evaluation of this integral momentarily.) There is another area portion, however, I'll call $A_2$, which represents that portion of the circle that doubles back on itself.  This portion of the area is not bounded by the $x$ axis, but by $y_-(x)= y_0 - \sqrt{R^2-(x-x_0)^2}$, i.e., the part of the circle that doubled back and is now the lower branch of the circle.  We may then write the area of the circle in quadrant I as
$$  A = A_1 + A_2 = \int_0^{x_+} dx \: y_+(x) + \int_{x_+}^{x_0+R} dx \: [y_+(x) - y_-(x)] $$
Now that this is set up, the task is merely one of evaluating the integrals.  I'll do the integral for $A_1$.  Do a trig substitution, i.e., $x=x_0+R \sin{\theta}$, $dx = R \cos{\theta}$ and get
$$A_1 = x_+ y_0 + R^2 \int_{- \arcsin{\frac{x_0}{R}}}^{\arcsin{\frac{x_+-x_0}{R}}} d \theta \: \cos^2{\theta} $$
I leave it to you to fill in the details here.  Similar calculations of course will be needed for the $A_2$ integral.  You may then follow this procedure for the other quadrants.  To write a complete solution, you must, as I alluded above, formulate what happens when the circle doesn't have an area in all 4 quadrants.
A: This can be dealt with in terms of elementary geometry. In the following I assume that $P=(x_0,y_0)$ lies in the first quadrant.
Let $A=(a,0)$, $B=(0,b)$, $C=(-c,0)$, $D=(0,-d)$ be the points where the circle intersects the axes. Then $a=x_0+\sqrt{R^2-y_0^2}$, and similarly for the other three.
Let $\alpha$, $\beta$, $\gamma$, $\delta$ be the arguments of the points $A$, $\ldots$, $D$,  as seen from $P=(x_0,y_0)$. Then $\alpha=-\arcsin(y_0/R)$, $\ \beta={\pi\over2}+\arcsin(x_0/R)$, and similarly for the other two.
Now each piece of the circle is an algebraic sum (i.e. $+$- and $-$-terms) of a circular sector and two triangles. The pieces in the first two quadrants therefore have area
$$A_1={1\over 2} \left(R^2(\beta-\alpha)+ ay_0+ b x_0\right)\ ,\qquad
A_2={1\over2}\left(R^2(\gamma-\beta)-b x_0+c y_0\right)\ ,$$
and for the other two pieces you get  similar formulae.
