I have an array of points in 3d Cartesian space:
P = np.random.random((10,3))
Now I'd like to find their distances to a given axis and on that given axis
Ax_support = array([3,2,1])
Ax_direction = array([1,2,3])
I've found a solution that first finds the vector from each point that is perpendicular to the direction vector... I feel however, that it is really complicated and that for such a standard problem there would be a numpy or scipy routine already out there (as there is to find the distance between points in scipy.spatial.distance)