Given a unit circle and a step size, N degrees. How many steps of N degrees until there is no gap between points greater then epsilon deg?

Assumptions: yes I know there is logics needed to check for even division into 360, leading to repeat steps.

I am aware of a simple iterative solution where you add a step, do the logic, check conditions and repeat. I am trying to consider if there is a more “mathematical approach” or closed form solution.


I can see that if the rotation is rational, then the set of points is eventually periodic, so that is a good first logic check to see if there even is a solution.

For an irrational rotation, the set of points visited is not periodic, thus eventually the solution will be met but not sure how to equate that to how many steps it will take

  • $\begingroup$ After some exploring, I have come across irrational rotations, and i can see the relationship with how that can drive the "non-repeating" steps, but having trouble tying it to this actual calculation. $\endgroup$
    – S moran
    Commented Dec 3, 2020 at 12:49
  • $\begingroup$ I can see how you could use a kind of Extended Euclidean algorithm applied to $N$ and $360$ until the remainder is less than epsilon, and this would give you the number of steps until you first see a gap smaller than epsilon. I don't know what you'd need to do to then get the number of steps until all gaps are smaller than epsilon. $\endgroup$ Commented Dec 3, 2020 at 13:02
  • $\begingroup$ I'll have to look into this. Added some notes to problem $\endgroup$
    – S moran
    Commented Dec 3, 2020 at 13:21


You must log in to answer this question.

Browse other questions tagged .