double precision function kutl_distance_line_point(x0, eta, point) * * begin_doc * * Returns distance of a point from a line. * * Input Parameters: C x0(3) double precision array C (x,y,z) of initial point defining line C C eta(3) double precision array C direction cosines of line (do not have to be normalized) C C point(3) double precision array C (x,y,z) of point whose distance we are trying to find * * Output Parameters: * * Other routines: * * Notes: * * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * The line is defined by * * x = x0 + eta*r * * where r is a free parameter and eta does not have to be normalized * to 1. The distance is calculated from * * d**2 = delta**2 - (delta*eta)**2 * or d**2 = |delta x eta|**2 * * where delta(i) = point(i) - x0(i) * * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * * Author: Paul R Avery Created: Sun Nov 16 18:45:56 EST 1997 * * Major revisions: * * * end_doc