Perpendicular at a defined distance from point on line intersects another line in coordinates?

230 Views Asked by At

It approximately looks like the following picture enter image description here

The figure may be rotated at any angle.

I know the coordinates of points $A$, $B$, $C$, $D$ and the length of $BF$.

$\angle ABD$ and $\angle CBD$ are equal ($AD = CD$ and $AB = CB$).

$\angle EAB = \angle EFB = \frac{\pi}{2}$ (right angles).

I need to find the coordinates of $E$ and $G$.

1

There are 1 best solutions below

1
On
  1. Construct lines AD and СD by given coordinates of points A, С and D. Let it be in parametric form. AD: { x = A.x + (D.x - A.x)*t, y = A.y + (D.y - A.y)*t } BD: { x = С.x + (D.x - С.x)*t, y = C.y + (D.y - С.y)*t } In our definitions 0 <= t <= 1, but actually it doesn't matter in future.

  2. Find coordinates of point F. Let vector V := D - B = {D.x - B.x, D.y - B.y}. Then we do following steps: V = V / |V|, V = V*|BF|. Here |V| = sqrt(V.x*V.x + V.y*V.y) - the length of the vector V, and |BF| - the known length of the segment BF. Now F can be obtained clearly: F = {B.x + V.x, B.y + V.y}.

  3. Construct line EG: we know, that this line contains point F and this line is orthogonal to BD. Hence this line has direction vector orthogonal to vector V. Construct this vector: let W := {-V.y, V.x}. So, our line has the following parametric form: EG: { x = F.x + W.x*u, y = F.y + W.y*u }

  4. Finally, find intersection of lines AD and EG, CD and EG. For this we have to solve two system of two equations with respect to t and u. For AD and EG it is: A.x + (D.x - A.x)*t = F.x + W.x*u, A.y + (D.y - A.y)*t = F.y + W.y*u. In your case it has the only solution, where t = (A.y*W.x - A.x*W.y + F.x*W.y - F.y*W.x) / (A.y*W.x - A.x*W.y + D.x*W.y - D.y*W.x); Just paste this value of t into equation of line AD (p.1) - and you will get your point E. The same way you can obtain point G as intersection of lines CD and EG. For it t = (C.y*W.x - C.x*W.y + F.x*W.y - F.y*W.x) / (C.y*W.x - C.x*W.y + D.x*W.y - D.y*W.x);

Pasting this value into equation of line BD, you will get you point G.