On 05/12/13 23:40, Joćo Pais wrote:http://paulbourke.net/geometry/pointlineplane/
Hello list,
I had a doubt, will try to explain.
I wanted to define a line in a 3d space through 2 points, and be able to
find out the distance from another point to that line. Since I'm very
bad at math, I wanted to know if anyone has done something similar, or
knows how to get to it.
first example on the page, you just need to clamp u to [0..1] if you want to make it work for a line segment instead of an infinite line.
Claude--
As I see it, the process goes this way:
- define a line from coordinates x1,y1,z1 to x2,y2,z2
- declare the point x3,y3,z3
- find the distance from that point to the nearest point belonging to
the said line
Any existing examples with gem rendering would be great.
Thanks as usual,
jmmmp
http://mathr.co.uk
_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list