Calculating the missing two points of rectangle if 2 points and the aspect ratio are known

191 Views Asked by At

How can I calculate the missing two points of a rectangle if I know 2 points (top left and top right) and the aspect ratio i.e 16:10.

For example: Top left: A(834, 449) and Top right: B(1675, 423)

1

There are 1 best solutions below

2
On BEST ANSWER

Let's consider the vector of the width of your rectangle $\vec{AB} = (841,-26)$. According to the aspect ratio the "height-vector" will be perpendicular to $\vec{AB}$. So it will be of the form $10/16 \cdot (26,841) = \vec{v}$. Now you can add $B + \vec{v}$ and get $C$ and $A + \vec{v} = D$.