- #1
transgalactic
- 1,395
- 0
i lack the knowledge in some area of polar coordenates
my problem is:
i was given a two points and an angle
one point is the center point the other is the the point we spin around the
center point by the given angle(rotation clock wise).
i have build a model to solve this problem by
slope=(y-center.y)/(x-center.x);
fi=arctan(slope);
beta=fi-angle;
xi=rad*cos(beta);
yi=rad*sin(beta);
x=center.x+xi;
y=center.y+yi;
but in a case of 2,1 as a center point
and 0,0 as the point we want to spin
when i spined it 90 deress(clock wise)
by this model i gave me a wronge answer (the right one is 1,3)
so by tryle and error method i found that we need to add 180 degrees
i don't know why
i don't know how to solve this problem
??
i want a solution for all the cases
my problem is:
i was given a two points and an angle
one point is the center point the other is the the point we spin around the
center point by the given angle(rotation clock wise).
i have build a model to solve this problem by
slope=(y-center.y)/(x-center.x);
fi=arctan(slope);
beta=fi-angle;
xi=rad*cos(beta);
yi=rad*sin(beta);
x=center.x+xi;
y=center.y+yi;
but in a case of 2,1 as a center point
and 0,0 as the point we want to spin
when i spined it 90 deress(clock wise)
by this model i gave me a wronge answer (the right one is 1,3)
so by tryle and error method i found that we need to add 180 degrees
i don't know why
i don't know how to solve this problem
??
i want a solution for all the cases