Considering we have three lines, and know the intersection points (How to find intersection points of lines?)
How can I draw a line that will cross the intersection point of the two lines and will be parallel to the third line?
Thanks.
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityConsidering we have three lines, and know the intersection points (How to find intersection points of lines?)
How can I draw a line that will cross the intersection point of the two lines and will be parallel to the third line?
Thanks.
I'm not sure I understand your question correctly, but a parallel line could look like and be constructed as follows.
The interesting points:
p1 = Plot[{f1, f2, f3}, {x, -5, 5}, PlotLegends -> "Expressions",
Epilog -> {Red, PointSize[Large],
Point[{{1, 0}, {-1, 2}, {-1, -2}, {-3, 0}}]}]
And connected with a InfiniteLine
infL = Graphics[InfiniteLine[{{-3, 0}, {-1, -2}}]];
Show[p1, infL]
Or you can find a Fit:
p2 = {-1, -2};
p1 = {-3, 0};
MyFit = Fit[{p1, p2}, {1, x}, x] // Chop
-3. - 1. x
and use it with Plot:
Plot[{f1, f2, f3, MyFit}, {x, -5, 5}, PlotLegends -> "Expressions",
Epilog -> {Red, PointSize[Large], Point[{{1, 0}, {-1, 2}, p2, p1}]}]