If I have a point on a standard grid with coordinates say:
$A_1=(1000,0)$
$A_2=(707,707)$
Is there a easy way to transfer this points to $\pm 120$ degrees from the origin $(0,0)$, and keeping the same distance? So for $A_1$, the result should be something like: $B_1=(800,-200);\ C_1=(800,-200)$
I can make this with triangles and calculate it but there should be some formula. I need a formula to use with software.
If $f$ is your angle, $(x,y)$ becomes $(x \cos f - y \sin f, y \cos f + x \sin f)$.
So with $f=120°$, $(x,y)$ becomes $(-\frac{1}{2}x-\frac{\sqrt{3}}{2}y, -\frac{1}{2}y+\frac{\sqrt{3}}{2}x)$.
And with $f=-120°$, $(x,y)$ becomes $(-\frac{1}{2}x+\frac{\sqrt{3}}{2}y, -\frac{1}{2}y-\frac{\sqrt{3}}{2}x)$.