1
$\begingroup$

This is a variation on a question that's been asked a few times, but I'm currently brain fogged enough that I apparently can't see the forest for the trees.

Given a circle with radius r, I need to determine how many points I can put on the circle that are at least 2 (linear, not measured along the arc) units apart from each other. I'm working in radians, if that matters at all.

enter image description here

(Edit, the '2' in the diagram above should be '$\ge$2')

2 Answers 2

2

I'm going to assume (without any real basis except a certain amount of experience) that an optimal solution is one that starts with a point at $(r, 0)$, follows with another point whose distance from that is exactly 2, and so on, until you go "all the way around the circle."

To make life easier for myself, I'm going to replace the question with "On a unit circle, how many points with distance $h = \frac{2}{r}$ can I fit?" (That's the original question, scaled down by a factor of $r$ in all directions.)

Well, you need a point $$ P = (\sin t, \cos t) $$ with the property that $$ (1 - \sin t, \cos t) $$ has length $h$, so \begin{align} h^2 &= 1 - 2\sin t + \sin^2 t + \cos^2 t \\ h^2 &= 1 - 2\sin t + 1 \\ h^2 &=2 - 2\sin t \\ h^2 &=2 - 2\sin t \\ 2-h^2 &= 2 \sin t \\ 1-\frac{h^2}{2} &= \sin t \end{align}

so $t = \arcsin \left( 1 - \frac{h^2}{2} \right)$.

You're now going to mark off points at angles $0, t, 2t, 3t, \ldots$ until you've gone almost all the way around the circle. There will be two cases:

  1. $n = \frac{2\pi}{t}$ is an integer. In this case, the $n$ angles $0, t, 2t, \ldots, (n-1)t$ determine the points you desire.

  2. $n$ is not an integer. In that case, the $n-1$ angles $0, t, 2t, \ldots (n-2)t$ determine the points you desire.

Converting back to your notation:

  1. Let $t = \arcsin(1 - \frac{2}{r^2})$.
  2. Compute $n = \frac{2\pi}{t}$.
  3. If $n$ is an integer, then you can fit $n$ points with all pariwise distances at least $2$.
  4. Otherwise, you can fit $\lfloor n \rfloor$ such points. (Note: $\lfloor n \rfloor$ denotes the largest integer less than or equal to $n$, i.e., the result of "rounding $n$ down".)

Note that if $r < 1$, then in step 1 you're computing the arcsine of a number less than $-1$, which is impossible. This corresponds to the notion that on a circle smaller than the unit circle, you cannot find even two points whose distance is at least $2$.

  • 1
    good, but if $n$ is not integer, you cant have $n-1$, yet $floor(n)$. And the scale factor is $r$ not $2$.2017-01-10
1

Two points on the circle that are 2 units apart form a line segment that subtends an angle of $2\sin^{-1}\frac1r$ radians at the centre (bisecting the angle yields two right-angled triangles with opposite 1 and hypotenuse $r$). Therefore the number of points that can be put in is $$\left\lfloor\frac{2\pi}{2\sin^{-1}\frac1r}\right\rfloor=\left\lfloor\frac\pi{\sin^{-1}\frac1r}\right\rfloor$$ where the floor function is used to return a whole number.

  • 0
    Clear and effective !2017-01-10