0

Say we have an 0XY coordinates plane. We have coordinates of points A(xa, ya), B(xb, yb) forming line. How to find points C and D forming new line so that its center would be in the middle of AB and its length would be some N*K float value:

enter image description here

DuckQueen
  • 169

2 Answers2

1

Let $v$ be $\vec {AB}$ normalized and let $u=v^{\perp}=(-v_y,v_x)$. Then $C=E+\frac 12 NK u$ and $D=E-\frac 12 NK u$, where $E=\frac 12(A+B)$.

lhf
  • 216,483
0

enter image description here

  1. Find the co-ordinates of E. [$E = (0.5(x_a + x_b), 0.5(y_a + y_b))$]

  2. Find $m_{AB}$, the gradient of AB.

  3. Find $m_{DC}$, the gradient of DC by m.M = –1.

  4. Find θ, the angle of inclination of DC by $m_{DC} = tan θ$.

  5. Find $X_c$ and $Y_c$ as shown.

  6. Do simple additions to get the actual co-ordinates of C.

  7. For D, do similar subtractions.

Mick
  • 17,141