I have a white rectangle of size 300 X 300 pixels. I have rotated the rectangle about the origin by 20 degrees clockwise.I would like to compute the length of a and b below.
Note:The background black rectangle with the white border is also 300 X 300 pixels.
Thanks!
I found it a bit easier to solve the equivalent problem:
Using a bit of trig and geometric similarities, the problem amounts to finding the points as follows:
1) calc point c,d: c = L*sin(theta), d = L *cos(theta) : (51.30, 140.95)
2) using trig and angle similarity: tan(theta) = (f-d)/(c-e), we also know f=L, so we get e = 26.45
3) also using trig, tan(theta) = (f-h)/(g-e), f=L, g=L, so we get h = 105.03
4) a = L – h = 44.97
5) b = L – e = 123.55