I have two 3D-points, for example a = (100, 100, 10) and b = (0, 100, 60), and would like to fit a line through those points.
I know, the 3D line equation can have different shapes:
Vector-form:
(x,y,z)=(x0,y0,z0)+t(a,b,c)
Parameter-form:
x=x0+ta
y=y0+tb
z=z0+tc
But I have a problem getting the data in the right shape for a numerical function.
The following code should work
Here the
ax.plot3D()
plots a curve that joins the points(x[i], y[i], z[i])
with straight lines.