I'm trying to figure out how to dynamically place numbers around a circle (similar to a clock face) but dynamically so if the number of numbers around the circle is 5 or 27.. they would space out correctly.
I found some code (below) that looked like it might help but I'm having trouble implementing it. I don't know how I actually tie this back to the circle and numbers.
Any help would be much appreciated. Thanks
function getNPointsOnCircle( center:Point, radius:Number, n:Number = 10 ) : Array
{
var alpha:Number = Math.PI * 2 / n;
var points:Array = new Array( n );
var i:int = -1;
while( ++i < n )
{
var theta:Number = alpha * i;
var pointOnCircle:Point = new Point( Math.cos( theta ) * radius, Math.sin( theta ) * radius );
points[ i ] = center.add( pointOnCircle );
}
return points;
}