Radial plotting algorithm
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 wonde开发者_JAVA百科rful.
Thanks.
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
精彩评论