0
$\begingroup$

I want to place points at equal angles of a range. The first point should always be at 0 and the last point should always be equal to the range amount (unless 360 since I don't want points to overlap). For example:

if my range is 90 degrees and I want to place 3 points:

  • 1st @ 0 degrees
  • 2nd @ 45 degrees
  • 3rd @ 90 degrees

if my range is 180 degrees and I want to place 5 points:

  • 1st @ 0
  • 2nd @ 45
  • 3rd @ 90
  • 4th @ 135
  • 5th @ 180

if my range is 0 / 360 degrees and I want to place 3 points:

  • 1st @ 0 degrees
  • 2nd @ 120 degrees
  • 3rd @ 240 degrees

Is there a math formula for this?

$\endgroup$
0

1 Answer 1

0
$\begingroup$

The first point is at zero. The remaining $n-1$ points divide the range into equal parts.

$\endgroup$
2
  • $\begingroup$ This works fine unless the range is 360. When it's 360, 0 and 360 will cause the last point to overlap with the first point. $\endgroup$
    – user442660
    May 2, 2017 at 17:05
  • $\begingroup$ You exclude the point at 360 because it is already covered $\endgroup$
    – Triatticus
    May 2, 2017 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy