This is a trivial problem but I run into it again and again and I am sure there is a elegant solution, which I would like to use.
I do math with numpy and would like to plot lines that are results of linear algebra calculations. These lines come in the form

So I would would like to "outsource" the job of finding the start end endpoint of my line to a clever sipplet of python code, so that my resulting line gets drawn into my 3D plot, honoring the existing dimensions of the plot. E.g. if I plotted a 3D parabel from x = -2 to 2 and z = -3 to 3, and I wanted to draw a line
,
it would figure out that it would need to start at (-2,1,-2) and end at (2,1,2).
How could that work?
