The line is not a line segment, but should extend to infinity. I tried using this guys answer but I just got nan's because I was dividing by 0. Preferably I want something quick and easy with dot and cross products and such.
x = np.array([-1,-1,-1])
y = np.array([4,4,4])
a = np.array([2,2,2])
epsilon = 0.0001
#algorithm
print((x[2] - x[0]) / (x[1] - x[0]))
print((y[2] - y[0]) / (y[1] - y[0]))
print((a[2] - a[0]) / (a[1] - a[0]))
Ouput:
nan
nan
nan