Distance between parallel lines inside of a rectangle

101 Views Asked by At

I have 2 parallel lines which are touching a rectangle. I know the coordinates (x1,y1), (x2,y2), (x3,y3), (x4,y4)

How can I find from that the orthogonal distance between the lines?

my image

1

There are 1 best solutions below

4
On BEST ANSWER

Let’s make this question a bit harder by finding the d in the following picture.

enter image description here

It is sufficient if we can find h and k, the co-ordinates of T.

T lies on the circle $\omega$ (with PS as diameter), whose equation is $$\omega : (x – x_1)(x – x_4) + (y – y_1)(y – y_4) = 0$$

$(h – x_1)(h – x_4) + (k – y_1)(k – y_4) = 0$ …. (1)

T is also on L and hence $k – y_3 = \dfrac {y_4 – y_3 }{x_4 – x_3}(h – x_3)$ … (2)

Solving (1) & (2) will give us h and k.

Method #2

  1. Use R and S to get the equation of L.

  2. Use P, via the the perpendicular distance formula, to get d.