[PD] Find distance to a line in 3d space

João Pais jmmmpais at googlemail.com
Fri Dec 6 00:40:08 CET 2013


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.

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



More information about the Pd-list mailing list