views:

116

answers:

3

Hi, I'm not a genius in geometry, I'd like to find a point in as3 with the radius and a angle but I don't remember the rule, I know this should be simple!

Here's an example:

alt text

+2  A: 
as3.x = centerX + radius * cos(angle)
as3.y = centerY + radius * sin(angle)

Note that the rotation in the picture linked to is in the "negative direction". I.e, an increase of the angle, yields a counter-clockwise rotation.

aioobe
thanks for the note and for the help, can you eventually check what's wrong here? http://stackoverflow.com/questions/2887725/drawing-an-honeycomb-with-as3 thanks again
Vittorio Vittori
+1  A: 

Let x0, y0 be the center of the circle being considered and t be the angle theta anti-clockwise from the x-axis (right horizontal).

The point you are looking for is then

x = x0 + r*cos(t)
y = y0 + r*sin(t)
Umang
A: 

You have to adjust your calculator to degree mode before making that calculation more likley you will use angle in degree

khalid sabtan