views:

92

answers:

1

Hi there,

I have to write an algorithm in AS3.0 that plots the location of points radially. I'd like to input a radius and an angle at which the point should be placed. Obviously I remember from geometry coursework that 2(pi)r will give me an x on the point at the radius distance. The problem is I need to produce the x, y and the calculation is a bit more complicated.

A small push (or answer) would be wonderful.

Thanks.

+1  A: 

Conversion from polar coordinates (r,theta) to cartesian coordinates (x,y):

x = xc + r cos(theta)
y = yc + r sin(theta)

where r = radius and theta = angle in radians and (xc,yc) is the center of the circle
Jacob
x = x0 + r*cos(theta); y = y0 + r*sin(theta). (x0, y0) is the center of the circle. :)
bhups
Thanks :) - will correct!
Jacob