#N canvas 1 53 597 422 10; #X obj 107 89 purepd/float_argument \$1; #X obj 267 89 purepd/float_argument \$2; #X obj 427 89 purepd/float_argument \$3; #X obj 300 44 loadbang; #X obj 107 169 pack float float float; #X obj 107 190 trigger anything anything anything; #X obj 47 12 inlet x; #X obj 267 12 inlet y; #X obj 427 12 inlet z; #X obj 397 355 outlet theta; #X obj 207 355 outlet phi; #X text 275 167 $f1 = x; #X text 334 168 $f2 = y; #X text 392 169 $f3 = z; #X obj 397 278 expr atan($f2/$f1); #X obj 207 254 expr atan(sqrt(($f1*$f1) + ($f2*$f2))/$f3); #X obj 14 228 expr sqrt(($f1*$f1) + ($f2*$f2) + ($f3*$f3)); #X obj 397 329 mapping/radians2mapping; #X obj 207 329 mapping/radians2mapping; #X obj 14 355 outlet; #X text 142 375 output range on all outlets: 0 to 1; #X obj 171 148 - 1; #X obj 171 128 * 2; #X text 265 139 convert range to -1 to 1; #X obj 236 148 - 1; #X obj 236 128 * 2; #X obj 107 148 - 1; #X obj 107 128 * 2; #X obj 14 324 / 1.73205; #X text 390 397 released under the GNU GPL; #X text 43 397 (C) Copyright 2008 Hans-Christoph Steiner ; #X connect 0 0 27 0; #X connect 1 0 22 0; #X connect 2 0 25 0; #X connect 3 0 1 0; #X connect 3 0 2 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 16 0; #X connect 5 1 15 0; #X connect 5 2 14 0; #X connect 6 0 27 0; #X connect 7 0 22 0; #X connect 8 0 25 0; #X connect 14 0 17 0; #X connect 15 0 18 0; #X connect 16 0 28 0; #X connect 17 0 9 0; #X connect 18 0 10 0; #X connect 21 0 4 1; #X connect 22 0 21 0; #X connect 24 0 4 2; #X connect 25 0 24 0; #X connect 26 0 4 0; #X connect 27 0 26 0; #X connect 28 0 19 0;