[Math] Find one side of a parallelogram given its width and two opposite corners

geometry

Given a parallelogram with two vertical sides defined by a known width (distance between two parallel sides) and two opposite points, what is the equation for the length of the either side?

Problem Diagram

Real-world application:
I need to determine the cut angle on a board of a given thickness spanning between two points. Given the length of one side, I can easily determine the length of all other sides/angles.

Best Answer

Let $\Delta y = C_y - A_y$ and $\Delta x = C_x - A_x$. Then using the right triangle that you've drawn, the length of the non-vertical sides of the parallelogram is $$\sqrt{\Delta x^2 + (\Delta y - F)^2}.$$ If you slide your blue "W" all the way up so that it touches the "F" line you've drawn, then you have a new little right triangle that's similar to the big right triangle just mentioned. We therefore have the following proportion (big hypotenuse / small hypotenuse = leg in big triangle / leg in small triangle): $$\frac{\sqrt{\Delta x^2 + (\Delta y - F)^2}}{F} = \frac{\Delta x}{W}.$$ Now solve for $F$: $$\begin{align} W\sqrt{\Delta x^2 + (\Delta y - F)^2} &= F \Delta x \\ W^2 (\Delta x^2 + (\Delta y - F)^2) &= F^2 \Delta x^2 \\ W^2 (\Delta x^2 + \Delta y^2 + F^2 - 2F\Delta y) &= F^2\Delta x^2 \\ (W^2 - \Delta x ^2)\cdot F^2 -2W^2\Delta y \cdot F + W^2(\Delta x^2 + \Delta y^2) &= 0 \end{align}$$

The quadratic formula gives

$$\begin{align}F &= \frac{2W^2\Delta y \pm \sqrt{4W^4\Delta y^2 - 4\cdot(W^2-\Delta x^2) \cdot W^2 (\Delta x^2 + \Delta y^2)}}{2(W^2-\Delta x^2)}\\ &= \frac{W^2\Delta y \pm \sqrt{W^4\Delta y^2 - W^4\Delta x^2 - W^4 \Delta y ^2 + W^2 \Delta x^4 + W^2 \Delta x^2 \Delta y^2}}{W^2-\Delta x^2} \\ &= \boxed{\displaystyle\frac{W^2\Delta y \pm W \Delta{x} \sqrt{-W^2 + \Delta x^2 + \Delta y^2}}{W^2-\Delta x^2} }\end{align}.$$