How to detect all points of rectangle by given one point A, height, width, and angle between AC and X axis?

528 Views Asked by At

How to detect points B, C, D of rectangle with given point A, height, width and angle L between AC and X axis.enter image description here

2

There are 2 best solutions below

0
On BEST ANSWER

$$ x_C= x_A + w \cos L ; y_C= y_A + w \sin L $$

similarly for $B$.

Let the fourth point be D.

Since the average of opposites points ( center of gravity) is $0$, ( same

for either x or y), we have for points $D$ and $B$

$$ x_D= x_B+ x_C-x_A; y_D= y_B+ y_C-y_A. $$

0
On

Let A = (0, 0). Answers follow if the lengths of each red line segments are known.

enter image description here