aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-04-08 04:10:37 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-04-08 04:10:37 +0000
commit162b9550e5d3ab93f02fa342864f22190581838c (patch)
tree67f9930e3251f8272d8fa4a1d5deb590c4dc1c78
parent60245e1c3a374c18f6d2c015221a47434558de91 (diff)
switched to use mapping2radians
svn path=/trunk/externals/mapping/; revision=10980
-rw-r--r--help/spherical2cartesian-help.pd44
-rw-r--r--spherical2cartesian.pd46
2 files changed, 53 insertions, 37 deletions
diff --git a/help/spherical2cartesian-help.pd b/help/spherical2cartesian-help.pd
index 828d52b..fa2e54b 100644
--- a/help/spherical2cartesian-help.pd
+++ b/help/spherical2cartesian-help.pd
@@ -1,31 +1,37 @@
-#N canvas 203 456 504 451 10;
-#X obj 106 366 pddp/pddplink http://en.wikipedia.org/wiki/Polar_coordinate_system
-;
-#X text 63 26 convert spherical to cartesian coordinates;
+#N canvas 79 42 476 445 10;
#X text 61 158 (r \, phi \, theta);
#X text 61 198 (x \, y \, z);
-#X obj 277 122 hsl 128 15 -3.14159 3.14159 0 0 empty empty empty -2
--8 0 10 -262144 -1 -1 5600 1;
-#X obj 218 102 hsl 128 15 -3.14159 3.14159 0 0 empty empty empty -2
--8 0 10 -262144 -1 -1 7600 1;
+#X obj 277 122 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 0 1;
+#X obj 218 102 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 0 1;
#X obj 160 72 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X floatatom 164 93 5 0 0 0 - - -;
#X floatatom 221 122 5 0 0 0 - - -;
#X floatatom 282 141 5 0 0 0 - - -;
-#X obj 277 249 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144
+#X obj 277 249 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X floatatom 225 204 5 0 0 0 - - -;
#X floatatom 168 204 5 0 0 0 - - -;
#X floatatom 285 204 5 0 0 0 - - -;
#X obj 157 181 spherical2cartesian;
-#X connect 4 0 9 0;
-#X connect 4 0 14 2;
-#X connect 5 0 8 0;
-#X connect 5 0 14 1;
-#X connect 6 0 7 0;
-#X connect 6 0 14 0;
-#X connect 14 0 12 0;
-#X connect 14 1 11 0;
-#X connect 14 2 10 0;
-#X connect 14 2 13 0;
+#X obj 89 327 pddp/pddplink http://en.wikipedia.org/wiki/Spherical_coordinate_system
+;
+#X obj 89 307 pddp/pddplink http://en.wikipedia.org/wiki/Cartesian_coordinate_system
+;
+#X text 43 307 input:;
+#X text 37 327 output:;
+#X obj 5 2 cnv 15 450 20 empty empty cartesian2spherical 2 11 1 18
+-233017 -66577 0;
+#X text 73 36 convert cartesian to spherical coordinates;
+#X connect 2 0 7 0;
+#X connect 2 0 12 2;
+#X connect 3 0 6 0;
+#X connect 3 0 12 1;
+#X connect 4 0 5 0;
+#X connect 4 0 12 0;
+#X connect 12 0 10 0;
+#X connect 12 1 9 0;
+#X connect 12 2 8 0;
+#X connect 12 2 11 0;
diff --git a/spherical2cartesian.pd b/spherical2cartesian.pd
index 6e43032..cd19713 100644
--- a/spherical2cartesian.pd
+++ b/spherical2cartesian.pd
@@ -1,23 +1,29 @@
-#N canvas 536 22 580 359 10;
-#X obj 397 295 outlet z;
+#N canvas 310 22 686 438 10;
+#X obj 397 395 outlet z;
#X obj 267 12 inlet phi;
-#X obj 9 291 outlet x;
-#X obj 207 295 outlet y;
-#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 47 12 inlet r;
-#X obj 427 18 inlet theta;
-#X obj 300 44 loadbang;
-#X obj 107 129 pack float float float;
-#X obj 107 150 trigger anything anything anything;
-#X obj 14 268 expr $f1 * sin($f2) * cos($f3);
-#X obj 397 268 expr $f1 * cos($f2);
-#X obj 207 268 expr $f1 * sin($f2) * sin($f3);
+#X obj 14 391 outlet x;
+#X obj 207 395 outlet y;
+#X obj 107 99 purepd/float_argument \$1;
+#X obj 267 99 purepd/float_argument \$2;
+#X obj 427 99 purepd/float_argument \$3;
+#X obj 17 12 inlet r;
+#X obj 427 12 inlet theta;
+#X obj 316 56 loadbang;
+#X obj 107 169 pack float float float;
+#X obj 107 190 trigger anything anything anything;
+#X obj 14 338 expr $f1 * sin($f2) * cos($f3);
+#X obj 397 338 expr $f1 * cos($f2);
+#X obj 207 338 expr $f1 * sin($f2) * sin($f3);
+#X obj 397 314 unpack float float float;
+#X obj 427 125 mapping/mapping2radians;
+#X obj 267 125 mapping/mapping2radians;
+#X text 390 413 released under the GNU GPL;
+#X text 43 413 (C) Copyright 2008 Hans-Christoph Steiner <hans@at.or.at>
+;
#X connect 1 0 5 0;
#X connect 4 0 10 0;
-#X connect 5 0 10 1;
-#X connect 6 0 10 2;
+#X connect 5 0 17 0;
+#X connect 6 0 16 0;
#X connect 7 0 10 0;
#X connect 8 0 6 0;
#X connect 9 0 5 0;
@@ -26,7 +32,11 @@
#X connect 10 0 11 0;
#X connect 11 0 12 0;
#X connect 11 1 14 0;
-#X connect 11 2 13 0;
+#X connect 11 2 15 0;
#X connect 12 0 2 0;
#X connect 13 0 0 0;
#X connect 14 0 3 0;
+#X connect 15 0 13 0;
+#X connect 15 1 13 1;
+#X connect 16 0 10 2;
+#X connect 17 0 10 1;