This question is a bit different than what I have seen here. I know how to calculate the positions such that
n points will be equally spaced around a circle however I am trying to solve a different problem. Lets say I am trying to draw a circle with a computer program and I want to intelligently decide how many points will be needed such that the lines between the points are
d units a part. This formula would allow for small circles to be drawn with few points but large circles to be drawn with many.
I have tried to solve for d using the following formula however I am not sure I solved it right. In this formula I am solving for dr or the ammount I will need to increment the angle by for each of these points. The number of points needed would then be
ceil((2 * PI) / dr)
d = |(r*(cos(dr) - cos(0)))^2 + (r*(sin(dr) - sin(0)))^2|
And I solved this down to
dr = (((d/r*r)-2)/-2.0f) but I do not think that that is right.
I am also told the solution may be
dr = d / (2.0 * r * PI + 6) but I have no idea where this came from.