# [PD] 3D coord and you...

pdman pdman at aproximation.org
Mon Aug 11 20:51:21 CEST 2003

```Hello PD Listers!
Firstly I want to thank everyone who has helped me/us in the past. This list is verry helpful and once I begin to get my footing in PD I hope to return the favor some time...

My question is this. I want to place nodes in two (or possably three) theoritical dementions. Around these nodes is a sphere od variable radius. If my controll node enters one of these spheres the node which owns the sphere returns a number corresponding to the distance the controll node is to the center of the sphere.
If the Controll node is at the origion of the sphere the sphere-node returns one, if the controll node is outside of the sphere the controll nodes returns 0.

Does such a tool exist or do I have to write one? It should be farely simple to write.

[sphere~ (rad)] -> takes at its left input the controll coordinates and at the right input the radius, and returns (x2+y2+z2)/r2 if (x2+y2+z2)<r2, else 0 (at the signal rate).
Oh, perhaps three inputs, the middle being the origin of the sphere...

I hope you understand my muddled thinking, and thanks for your time.