Calculate rotated rectangle size from known bounding box coordinates
Solution Given bounding box dimensions bx by by and t being the anticlockwise rotation of rectangle sized x by y: x = (1/(cos(t)^2-sin(t)^2)) * ( bx * cos(t) – by * sin(t)) y = (1/(cos(t)^2-sin(t)^2)) * (- bx * sin(t) + by * cos(t)) Derivation Why is this? First, consider that the length bx is … Read more