Distribution of the intersection between a grid and a circle I am looking for the expression of the distribution of the intersection of a grid and a circle. The problems looks like that:

Let's say the circle has radius R and the grid has unit spacing. Is there a formula for the average distribution of their intersection points viewed from the center of the disk, as in an angular distribution.
It has to be invariant under $\frac{\pi}{2}$ rotations and intuitively I am expecting more intersections along the diagonals but I don't know how it depends on R.
I am not expecting an analytical expression much more a quantitative behaviour or an asymptotic.
 A: If I understand correctly, you have a circle of radius $R$ centered at the origin and want to know which circle points have integer $x$ or $y$ coordinate.
The answer is quite immediate: a point on the circle in the first quadrant ($0\le\theta\le \pi/2$, where angle $\theta$ is measured from the $x$-axis) has coordinates $x=R\cos\theta$ and $y=R\sin\theta$, so that the angles corresponding to integer coordinates in the first quadrant are:
$$
\theta=\arccos{n\over R}\quad\hbox{and}\quad
\theta=\arcsin{n\over R},\quad\hbox{with}\quad
0\le n\le\left\lfloor{R}\right\rfloor.
$$
Of course you also have the symmetric of these points in the other quadrants.
EDIT
The distribution in the limit $R\to+\infty$ (see MvG's answer) is easy to find, because in that case $n/R$ varies smoothly and approaches $(x+y)/R$, so that
$$
{n\over R}=\cos\theta+\sin\theta,
\quad \hbox{for}\ 
0\le \theta\le{\pi\over2},
\quad \hbox{in the limit}\ 
R\to+\infty.
$$
A: 
I am expecting more intersections along the diagonals

You are right. Using Aretino's answer, for $R=10.000$ you get this histogram:


but I don't know how it depends on $R$

Qualitatively, this doesn't seem to depend too much on $R$, as you can see with $R=1.000$:

Of course, the smoothing of the histogram, i.e. the ratio between $R$ and the number of bins, has a large impact on how apparent this effect is. E.g. with $R=100$ and $100$ bins it's very hard to see this shape:

I guess there should be a nice (and perhaps even closed form) description for the shape of the histogram curve you'd get in the limit for an infinite number of bins, and an “even more infinite” size $R$, but I don't know how to find it.
