Suppose I have 3 points. A and B and C. I want the line segment through C, parallel to the line AB.
I want the D
with the given distance of d
on the line which connects C
to the AB
line with the slope of 90 degrees (vertical). Basically I want to move the point C
, closer to the AB
line (half the distance in my case).
I know how to get a point between 2 points but I don't know how to get the point on the AB
line.
Edit:
I have A
, B
and C
points. I want the bold line below:
It's at half the distance between the AB
and C
and has the same slope as AB
.
How I solved it
I didn't quite use the distance. I got the parallel line through the C
point and got the line between the 2 lines by calculating the mid point between A
and A'
and B
and B'
. Then connected the 2 new points.
Best Answer
Alright so here is one way of going about it (if I understood you correctly). So let $Z = (z_1,z_2)$ be the point lying on the line through $A,B$ such that the line passing through $C,Z$ is perpendicular to the line through $A,B$. You can find this point as follows.
We can find that $d(A,C) = \sqrt{104}$, $d(C,D) = \sqrt{(z_1-12)^2 + (z_2-10)^2}$, and $d(A,D) = \sqrt{(z_1-10)^2 + (z_2-20)^2}$.
So Pythagorean's theorem gives us the equation: $$(d(C,D))^2 + (d(A,D))^2 = 104.$$
But we also know that $(z_1,z_2)$ is a solution to the equation of the line through $A,B$, namely the line $y= -\frac{13}{25}x + \frac{630}{25}$.
So now you have two equations and two unknowns. Give that a try and see if you can find $Z$. Once you have $Z$ you should be able to figure out whatever else you were wondering about.