[Numpy-discussion] point line distance
Ian Mallett
geometrian@gmail....
Wed Oct 6 16:13:42 CDT 2010
Hi,
A background in linear algebra helps. I just came up with this method
(which, because I thought of it 5 seconds ago, I don't know if it works):
Line p1, p2
Point v
costheta = normalize(p2-p1) dot normalize(v-p1)
dist = length(v-p1)*sin(acos(costheta)
Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20101006/5e9f9290/attachment-0002.html
More information about the NumPy-Discussion
mailing list