aboutsummaryrefslogtreecommitdiff
path: root/3dAngle.pd
diff options
context:
space:
mode:
Diffstat (limited to '3dAngle.pd')
-rw-r--r--3dAngle.pd46
1 files changed, 46 insertions, 0 deletions
diff --git a/3dAngle.pd b/3dAngle.pd
new file mode 100644
index 0000000..3b6866e
--- /dev/null
+++ b/3dAngle.pd
@@ -0,0 +1,46 @@
+#N canvas 110 65 471 385 10;
+#X obj 23 228 expr acos($f1);
+#X obj 23 21 inlet vector;
+#X obj 234 22 inlet vector;
+#X obj 23 170 /;
+#X obj 23 200 /;
+#X obj 23 273 outlet float;
+#X text 118 23 A;
+#X text 328 24 B;
+#X text 257 195 .;
+#X text 151 198 rho = arccos((A;
+#X text 266 198 B)/(|A|*|B|));
+#X text 118 273 rho;
+#X text 25 308 computes the angle (radian) between both incoming vectors
+;
+#X obj 352 27 loadbang;
+#X obj 352 50 t b b b;
+#X obj 352 73 \$1;
+#X obj 384 73 \$2;
+#X obj 417 74 \$3;
+#X obj 352 96 pack f f f;
+#X text 291 344 Version: 2007-12-09;
+#X text 292 363 Author: Roman Haefeli;
+#X obj 23 50 t a a;
+#X obj 161 119 ./3dMagnitude;
+#X obj 234 150 ./3dMagnitude;
+#X obj 23 119 ./3dDot \$1 \$2 \$3;
+#X connect 0 0 5 0;
+#X connect 1 0 21 0;
+#X connect 2 0 23 0;
+#X connect 2 0 24 1;
+#X connect 3 0 4 0;
+#X connect 4 0 0 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 14 1 16 0;
+#X connect 14 2 17 0;
+#X connect 15 0 18 0;
+#X connect 16 0 18 1;
+#X connect 17 0 18 2;
+#X connect 18 0 23 0;
+#X connect 21 0 24 0;
+#X connect 21 1 22 0;
+#X connect 22 0 3 1;
+#X connect 23 0 4 1;
+#X connect 24 0 3 0;