Ishuda, agree with this "attack"? :
Givens:
right triangle ABC: legs BC=a, AC=b
w (degrees) = rotation angle
Triangle ABC rotates such that A is at origin, B is on circumference
of circle radius = hypotenuse, C (the right angle) is inside the circle.
Problem: find coordinates of B related to the given rotating angle.
Solution:
simply assume we're in top right quadrant, rotating anti-clockwise,
from quadrant1 to quadrant4.
From the givens:
hypotenuse c = SQRT(a^2 + b^2)
angle u = ASIN(a/c)
angle v = 90 - u - w
x1 = cSIN(v)
y1 = SQRT(c^2 - x1^2)
x2 = -y1, y2 = x1
x3 = -x1, y3 = -y1
x4 = y1, y4 = -x1
Example: a = 3, b = 4, w = 40 (degrees):
x1,y1 = 3.407, 14.608
x2,y2 = -14.608, 3.407
x3,y3 = -3.407, -14.608
x4,y4 = 14.608, -3.407
I'm a little confused. In the example you give c=5 and, since x1=3.407, sin(v)=0.6814 so v=42.9531 degrees and thus u=7.0469 degrees and sin(u)=0.1227 which is not a/c=0.6
I had rather just use a transformation of co-ordinate system [the 'even shorter way' I suggested earlier]. That is, if we rotate the system counterclockwise an angle \(\displaystyle \theta\), then the point in the new system (u,v) is just given by
u = x cos(\(\displaystyle \theta\)) - y sin(\(\displaystyle \theta\))
v = x sin(\(\displaystyle \theta\)) + y cos(\(\displaystyle \theta\))
So, first transform the co-ordinate system so that the three points of the triangle are (0,0), (a, 0), and (a, b) with (0,0) being the point of rotation counter-clockwise and the line segment from (0,0) to (a, b) being the hypotenuse of the right triangle of length c. Thus
c = \(\displaystyle \sqrt{a^2\, +\, b^2}\)
Given a rotation counterclockwise of angle \(\displaystyle \theta\), let
C = cos(\(\displaystyle \theta\))
and
S = sin(\(\displaystyle \theta\))
the point
(0,0) \(\displaystyle \to\) (0,0)
(a,0) \(\displaystyle \to\) (a C, a S)
(a,b) \(\displaystyle \to\) (a C - b S, a S + b C)