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

Py Fave pyfave at gmail.com
Fri Dec 6 10:12:44 CET 2013


check pdmtl abstractions too.
they contain that and a lot more .

check gems.* patches

https://github.com/aalex/pdmtl


2013/12/6 tim vets <timvets at gmail.com>

> [list-dotprod] from list-abs might come in handy
>
>
> 2013/12/6 Claude Heiland-Allen <claude at mathr.co.uk>
>
>> On 05/12/13 23:40, João Pais wrote:
>>
>>> 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.
>>>
>>
>> http://paulbourke.net/geometry/pointlineplane/
>>
>> 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 at iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/
>> listinfo/pd-list
>>
>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20131206/82c590f6/attachment.htm>


More information about the Pd-list mailing list