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

2013-12-26 Thread João Pais

Thanks. It will take me some days until I can have a look at it.
In case you're interested in arrays, here is something I was working on in the 
last days: http://lists.puredata.info/pipermail/pd-list/2013-12/105216.html


Hi João,
I patched something for you, maybe it's useful.


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


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

2013-12-25 Thread Max
Hi João,
I patched something for you, maybe it's useful.



3dspacedistance.pd
Description: Binary data


http://mathsfirst.massey.ac.nz/Algebra/PythagorasTheorem/pythapp.htm


Am 11.12.2013 um 02:30 schrieb João Pais jmmmp...@googlemail.com:

 Am 06.12.2013, 00:51 Uhr, schrieb Claude Heiland-Allen cla...@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.
 
 it looks interesting, and I also checked for more content with a similar 
 title. the thing is, my math/geometry skills are too bad, and I don't 
 understand where they get the formulas for the points and lines. I'll keep 
 watching the links, but I might not get it in time for the purpose I was 
 looking for.
 
 thanks anyway,
 
 João
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


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

2013-12-25 Thread Ba Prince
Hi

  If you want to know the distance between a point and line in 3D space :

1 - you calculate the vector director (= vecteur directeur ?) u- of the
line
2 - you select any point A from your line
3 - you calculate the vector AB-
4 - you calculate || (AB-) ^ (u-) || / || u- || , with  || . ||
euclidian norm and ^ cross product

the distance is d =  || (AB-) ^ (u-) || / || u- ||

Prince




2013/12/26 Max abonneme...@revolwear.com

 Hi João,
 I patched something for you, maybe it's useful.




 http://mathsfirst.massey.ac.nz/Algebra/PythagorasTheorem/pythapp.htm


 Am 11.12.2013 um 02:30 schrieb João Pais jmmmp...@googlemail.com:

  Am 06.12.2013, 00:51 Uhr, schrieb Claude Heiland-Allen 
 cla...@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.
 
  it looks interesting, and I also checked for more content with a similar
 title. the thing is, my math/geometry skills are too bad, and I don't
 understand where they get the formulas for the points and lines. I'll keep
 watching the links, but I might not get it in time for the purpose I was
 looking for.
 
  thanks anyway,
 
  João
 
  ___
  Pd-list@iem.at mailing list
  UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list


 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


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

2013-12-10 Thread João Pais

Am 06.12.2013, 00:51 Uhr, schrieb Claude Heiland-Allen cla...@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.


it looks interesting, and I also checked for more content with a similar title. 
the thing is, my math/geometry skills are too bad, and I don't understand where 
they get the formulas for the points and lines. I'll keep watching the links, 
but I might not get it in time for the purpose I was looking for.

thanks anyway,

João

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


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

2013-12-06 Thread Py Fave
check pdmtl abstractions too.
they contain that and a lot more .

check gems.* patches

https://github.com/aalex/pdmtl


2013/12/6 tim vets timv...@gmail.com

 [list-dotprod] from list-abs might come in handy


 2013/12/6 Claude Heiland-Allen cla...@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@iem.at mailing list
 UNSUBSCRIBE and account-management - http://lists.puredata.info/
 listinfo/pd-list



 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


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

2013-12-06 Thread Py Fave
after checking the other posts ,
i only answered partially your question .



2013/12/6 Py Fave pyf...@gmail.com

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

 check gems.* patches

 https://github.com/aalex/pdmtl


 2013/12/6 tim vets timv...@gmail.com

 [list-dotprod] from list-abs might come in handy


 2013/12/6 Claude Heiland-Allen cla...@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@iem.at mailing list
 UNSUBSCRIBE and account-management - http://lists.puredata.info/
 listinfo/pd-list



 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


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

2013-12-05 Thread João Pais

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

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


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

2013-12-05 Thread Claude Heiland-Allen

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@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


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

2013-12-05 Thread tim vets
[list-dotprod] from list-abs might come in handy


2013/12/6 Claude Heiland-Allen cla...@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@iem.at mailing list
 UNSUBSCRIBE and account-management - http://lists.puredata.info/
 listinfo/pd-list

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list