in reply to Re: perl module or code for calculating the shortest distance between a line and a point (vector linear algebra)
in thread perl module or code for calculating the shortest distance between a line and a point (vector linear algebra)

hi randyk,

yes, that's true, for the plane.

in his code he seems to use $z(point) which suggests these lines and points are in 3D space. the shortest distance from a point to a line is a perpendicular on the line passing through that point. see here the development of a formula for the problem in question.

  • Comment on Re^2: perl module or code for calculating the shortest distance between a line and a point (vector linear algebra)
  • Download Code