#N canvas 0 0 916 640 10; #X obj 0 0 doc_demo; #X obj 0 30 cnv 15 906 22 empty empty empty 20 12 0 14 20 -66577 0; #X text 10 30 op name; #X text 96 30 description; #X text 446 30 effect on pixels; #X text 676 30 effect on coords; #X obj 0 70 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 70 op ignore; #X text 96 70 A ; #X text 446 70 no effect; #X text 676 70 no effect; #X obj 0 89 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 89 op put; #X text 96 89 B ; #X text 446 89 replace by; #X text 676 89 replace by; #X obj 0 108 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 108 op +; #X text 96 108 A + B ; #X text 446 108 brightness \, crossfade; #X text 676 108 move \, morph; #X obj 0 127 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 127 op -; #X text 96 127 A - B ; #X text 446 127 brightness \, motion detection; #X text 676 127 move \, motion detection; #X obj 0 146 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 146 op inv+; #X text 96 146 B - A ; #X text 446 146 negate then contrast; #X text 676 146 180 degree rotate then move; #X obj 0 165 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 165 op *; #X text 96 165 A * B ; #X text 446 165 contrast; #X text 676 165 zoom out; #X obj 0 184 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 184 op *>>8; #X text 96 184 (A * B) >> 8 ; #X text 446 184 contrast; #X text 676 184 zoom out; #X obj 0 203 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 203 op /; #X text 96 203 A / B \, rounded towards zero ; #X text 446 203 contrast; #X text 676 203 zoom in; #X obj 0 222 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 222 op div; #X text 96 222 A / B \, rounded downwards ; #X text 446 222 contrast; #X text 676 222 zoom in; #X obj 0 241 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 241 op inv*; #X text 96 241 B / A \, rounded towards zero ; #X obj 0 260 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 260 op swapdiv; #X text 96 260 B / A \, rounded downwards ; #X obj 0 279 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 279 op %; #X text 96 279 A % B \, modulo (goes with div) ; #X text 446 279 --; #X text 676 279 tile; #X obj 0 298 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 298 op swap%; #X text 96 298 B % A \, modulo (goes with div) ; #X obj 0 317 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 317 op rem; #X text 96 317 A % B \, remainder (goes with /) ; #X obj 0 336 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 336 op swaprem; #X text 96 336 B % A \, remainder (goes with /) ; #X obj 0 355 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 355 op gcd; #X text 96 355 greatest common divisor; #X obj 0 374 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 374 op lcm; #X text 96 374 least common multiple; #X obj 0 393 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 393 op |; #X text 96 393 A or B \, bitwise ; #X text 446 393 bright munchies; #X text 676 393 bottomright munchies; #X obj 0 412 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 412 op ^; #X text 96 412 A xor B \, bitwise ; #X text 446 412 symmetric munchies (fractal checkers); #X text 676 412 symmetric munchies (fractal checkers); #X obj 0 431 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 431 op &; #X text 96 431 A and B \, bitwise ; #X text 446 431 dark munchies; #X text 676 431 topleft munchies; #X obj 0 450 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 450 op <<; #X text 96 450 A * pow(2 \, mod(B \, 32)) \, which is left-shifting ; #X text 446 450 like *; #X text 676 450 like *; #X obj 0 469 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 469 op >>; #X text 96 469 A / pow(2 \, mod(B \, 32)) \, which is right-shifting ; #X text 446 469 like / \, div; #X text 676 469 like / \, div; #X obj 0 488 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 488 op ||; #X text 96 488 if A is zero then B else A ; #X obj 0 507 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 507 op &&; #X text 96 507 if A is zero then zero else B; #X obj 0 526 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 526 op min; #X text 96 526 the lowest value in A \, B ; #X text 446 526 clipping; #X text 676 526 clipping (of individual points); #X obj 0 545 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 545 op max; #X text 96 545 the highest value in A \, B ; #X text 446 545 clipping; #X text 676 545 clipping (of individual points); #X obj 0 564 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 564 op cmp; #X text 96 564 -1 when AB ; #X obj 0 583 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 583 op ==; #X text 96 583 is A equal to B ? 1=true \, 0=false ; #X obj 0 602 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 602 op !=; #X text 96 602 is A not equal to B ? ; #X obj 0 621 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 621 op >; #X text 96 621 is A greater than B ? ; #X obj 0 640 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 640 op <=; #X text 96 640 is A not greater than B ? ; #X obj 0 659 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 659 op <; #X text 96 659 is A less than B ? ; #X obj 0 678 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 678 op >=; #X text 96 678 is A not less than B ? ; #X obj 0 697 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 697 op sin*; #X text 96 697 B * sin(A) in centidegrees ; #X text 446 697 --; #X text 676 697 waves \, rotations; #X obj 0 716 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 716 op cos*; #X text 96 716 B * cos(A) in centidegrees ; #X text 446 716 --; #X text 676 716 waves \, rotations; #X obj 0 735 cnv 15 906 26 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 735 op atan; #X text 96 735 arctan(A/B) in centidegrees ; #X text 446 735 --; #X text 676 735 find angle to origin \; (part of polar transform); #X obj 0 763 cnv 15 906 26 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 763 op tanh*; #X text 96 763 B * tanh(A) in centidegrees ; #X text 446 763 smooth clipping; #X text 676 763 smooth clipping (of individual points) \; neural sigmoid \, fuzzy logic; #X obj 0 791 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 791 op log*; #X text 96 791 B * log(A) in base e ; #X obj 0 810 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 810 op /exp; #X text 96 810 exp(A / B) in base e ; #X obj 0 829 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 829 op gamma; #X text 96 829 floor(pow(a/256.0 \, 256.0/b)*256.0) ; #X text 446 829 gamma correction; #X obj 0 848 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 848 op **; #X text 96 848 A**B \, that is \, A raised to power B ; #X text 446 848 gamma correction; #X obj 0 867 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 867 op abs-; #X text 96 867 absolute value of (A-B) ; #X obj 0 886 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 886 op rand; #X text 96 886 randomly produces a non-negative number below A ; #X obj 0 905 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 905 op sqrt; #X text 96 905 square root of A \, rounded downwards ; #X obj 0 924 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 924 op sq-; #X text 96 924 (A-B) times (A-B) ; #X obj 0 943 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 943 op avg; #X text 96 943 (A+B)/2 ; #X obj 0 962 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 962 op hypot; #X text 96 962 distance function: square root of (A*A+B*B) ; #X obj 0 981 cnv 15 906 26 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 981 op clip+; #X text 96 981 like A+B but overflow causes clipping instead of wrapping around ; #X obj 0 1009 cnv 15 906 26 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 1009 op clip-; #X text 96 1009 like A-B but overflow causes clipping instead of wrapping around ; #X obj 0 1037 cnv 15 906 26 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 1037 op erf*; #X text 96 1037 integral of e^(-x*x) dx ... (coming soon \; what ought to be the scaling factor?) ; #X obj 0 1065 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 1065 op weight; #X text 96 1065 number of "1" bits in an integer; #X obj 0 1084 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 1084 op sin; #X text 96 1084 sin(A-B) in radians \, float only; #X obj 0 1103 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 1103 op cos; #X text 96 1103 cos(A-B) in radians \, float only; #X obj 0 1122 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 1122 op atan2; #X text 96 1122 atan2(A \, B) in radians \, float only; #X obj 0 1141 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 1141 op tanh; #X text 96 1141 tanh(A-B) in radians \, float only; #X obj 0 1160 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 1160 op exp; #X text 96 1160 exp(A-B) in radians \, float only; #X obj 0 1179 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 1179 op log; #X text 96 1179 log(A-B) in radians \, float only; #X obj 0 1214 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 1214 op C.* ; #X text 96 1214 A*B; #X obj 0 1233 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 1233 op C.*conj; #X text 96 1233 A*conj(B); #X obj 0 1252 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 1252 op C./ ; #X text 96 1252 A/B; #X obj 0 1271 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 1271 op C./conj; #X text 96 1271 A/conj(B); #X obj 0 1290 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 1290 op C.sq- ; #X text 96 1290 (A-B)*(A-B); #X obj 0 1309 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 1309 op C.abs- ; #X text 96 1309 abs(A-B); #X obj 0 1328 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 1328 op C.sin ; #X text 96 1328 sin(A-B); #X obj 0 1347 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 1347 op C.cos ; #X text 96 1347 cos(A-B); #X obj 0 1366 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 1366 op C.tanh ; #X text 96 1366 tanh(A-B); #X obj 0 1385 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 1385 op C.exp ; #X text 96 1385 exp(A-B); #X obj 0 1404 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 1404 op C.log ; #X text 96 1404 log(A-B); #X obj 0 1439 cnv 15 906 17 empty empty empty 20 12 0 14 -249792 -66577 0; #X msg 10 1439 op c2p; #X text 96 1439 hypot \, atan two-in-one; #X obj 0 1458 cnv 15 906 17 empty empty empty 20 12 0 14 -233280 -66577 0; #X msg 10 1458 op p2c; #X text 96 1458 cos* \, sin* two-in-one; #X obj 10 1487 outlet; #X connect 7 0 260 0; #X connect 12 0 260 0; #X connect 17 0 260 0; #X connect 22 0 260 0; #X connect 27 0 260 0; #X connect 32 0 260 0; #X connect 37 0 260 0; #X connect 42 0 260 0; #X connect 47 0 260 0; #X connect 52 0 260 0; #X connect 55 0 260 0; #X connect 58 0 260 0; #X connect 63 0 260 0; #X connect 66 0 260 0; #X connect 69 0 260 0; #X connect 72 0 260 0; #X connect 75 0 260 0; #X connect 78 0 260 0; #X connect 83 0 260 0; #X connect 88 0 260 0; #X connect 93 0 260 0; #X connect 98 0 260 0; #X connect 103 0 260 0; #X connect 106 0 260 0; #X connect 109 0 260 0; #X connect 114 0 260 0; #X connect 119 0 260 0; #X connect 122 0 260 0; #X connect 125 0 260 0; #X connect 128 0 260 0; #X connect 131 0 260 0; #X connect 134 0 260 0; #X connect 137 0 260 0; #X connect 140 0 260 0; #X connect 145 0 260 0; #X connect 150 0 260 0; #X connect 155 0 260 0; #X connect 160 0 260 0; #X connect 163 0 260 0; #X connect 166 0 260 0; #X connect 170 0 260 0; #X connect 174 0 260 0; #X connect 177 0 260 0; #X connect 180 0 260 0; #X connect 183 0 260 0; #X connect 186 0 260 0; #X connect 189 0 260 0; #X connect 192 0 260 0; #X connect 195 0 260 0; #X connect 198 0 260 0; #X connect 201 0 260 0; #X connect 204 0 260 0; #X connect 207 0 260 0; #X connect 210 0 260 0; #X connect 213 0 260 0; #X connect 216 0 260 0; #X connect 219 0 260 0; #X connect 222 0 260 0; #X connect 225 0 260 0; #X connect 228 0 260 0; #X connect 231 0 260 0; #X connect 234 0 260 0; #X connect 237 0 260 0; #X connect 240 0 260 0; #X connect 243 0 260 0; #X connect 246 0 260 0; #X connect 249 0 260 0; #X connect 252 0 260 0; #X connect 255 0 260 0; #X connect 258 0 260 0; #X obj 95 30 cnv 0 0 1507 empty empty empty -1 12 0 14 0 -66577 0; #X obj 445 30 cnv 0 0 1507 empty empty empty -1 12 0 14 0 -66577 0; #X obj 675 30 cnv 0 0 1507 empty empty empty -1 12 0 14 0 -66577 0; #X obj 0 54 cnv 15 906 14 empty empty empty 20 12 0 14 -248881 -66577 0; #X text 10 52 numops; #X obj 0 1198 cnv 15 906 14 empty empty empty 20 12 0 14 -248881 -66577 0; #X text 10 1196 vecops for complex numbers; #X obj 0 1423 cnv 15 906 14 empty empty empty 20 12 0 14 -248881 -66577 0; #X text 10 1421 vecops for other things; #X text 10 1507 note: a centidegree is 0.01 degree. There are 36000 centidegrees in a circle. Some angle operators use centidegrees \, while some others use radians. To convert degrees into centidegrees \, multiply by 100 . To convert degrees into radians \, divide by 57.2957 . Thus \, to convert centidegrees into radians \, divide by 5729.57 . All the complex number operators are only for floats. VecOps are called VecOps because each operation happens between more than just two numbers. Complex VecOps are those that arise when a pair of numbers (A0 A1) is considered as a single number A0+A1*sqrt(-1). If you need complex numbers but don't know yet how they work \, learn them using a math tutorial and then those VecOps will begin to look familiar. ;