forked from patricksebastien/mtl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
3dAngle.pd
46 lines (46 loc) · 1.09 KB
/
3dAngle.pd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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;