I was going to ask this on SO but I think its more math than programming:
Given the sidelength, number of vertices and vertex angle in the polygon, how can I calculate the radius of its circumscribed circle.
The polygon may have any number of sides greater than or equal to 3.
The wikipedia entry only discusses circumscribed circle of a triangle...
Thanks!
edit: Also, the polygon is centered around the point (0,0). So I guess I'm asking what is the distance from the origin to any of its points..
double tempX = circumcircleRadius * Math.Sin(i * vertexAngle); double tempY = circumcircleRadius * Math.Cos(i * vertexAngle);
for each point. $\endgroup$