triggy question


    Oct 26 2006 | 9:52 pm
    hello,
    I'm trying to make simple video crop function in opengl, like in the patch
    below.
    The idea is to 'zoom' part of texture, and then scale and position
    videoplane so that 'zoomed' texture retains original size&position on
    output.
    It sort of works, but I'm a bit stuck with the problem when the video is
    rotated - it gets moved incorrectly*, probably because I should apply some
    trigonometry functions on offset x&y coordinates.
    * when i move right crop point, and the video is rotated, it also moves
    up-down. I would like it to stay in place.
    sorry for the confusion&
    hschm,
    nesa

    • Oct 27 2006 | 1:38 am
      Hi Nesa,
      Have a look at the patch below. It will show you how to calculate
      texture rotations. You can probably use the same method to perform
      croppings the way you're looking for.
      wes
    • Oct 31 2006 | 10:15 am
      hi wes,
      this does exactly what i need, thanks for doing it for me!
      any chance to fix bordercolor thing soon? when that is fixed, your patch
      will do all i need, fast and simple!
      best,
      n
    • Oct 31 2006 | 5:01 pm
      > any chance to fix bordercolor thing soon? when that is fixed, your patch
      > will do all i need, fast and simple!
      I'll look into it, but no promises.
      wes
    • Nov 01 2006 | 9:12 am
      Ok, it's fixed for the next version of jitter.
      wes
    • Nov 07 2006 | 5:27 am
      Hi,
      Is it possible to fix my patch with this also? Im having problems with a zoomed image not rotating in the centre of the cat window as the anchor points and constantly changing... Im just trying to get slight vertcal rotation when the image moves vertically. Similar to a boat tilting from side to side in the water. The reasom I want this is because I have the image moving on a projection which is then being reflected off a motorised mirror. The mirror moves in the opposite direction to the image. The idea is for the projection to move along a wall while the image stays still (with only parts of the image being revealed at any one time.
      Here is the patch:
      max v2;
    • Nov 07 2006 | 5:35 am
      Did you take a look at the patch I posted? It probably does
      everything you need.
      wes
      On 11/6/06, Kit Webster wrote:
      >
      > Hi,
      >
      > Is it possible to fix my patch with this also? Im having problems with a zoomed image not rotating in the centre of the cat window as the anchor points and constantly changing... Im just trying to get slight vertcal rotation when the image moves vertically. Similar to a boat tilting from side to side in the water. The reasom I want this is because I have the image moving on a projection which is then being reflected off a motorised mirror. The mirror moves in the opposite direction to the image. The idea is for the projection to move along a wall while the image stays still (with only parts of the image being revealed at any one time.
      >
      > Here is the patch:
      >
      > max v2;
      > #N vpatcher 117 -131 1141 548;
      > #P origin 0 35;
      > #P window setfont "Sans Serif" 9.;
      > #P window linecount 1;
      > #P newex 661 37 45 196617 loadbang;
      > #P newex 731 364 66 196617 jit.rgb2luma;
      > #P newex 872 102 45 196617 loadbang;
      > #P message 863 124 34 196617 1221;
      > #P newex 652 171 93 196617 scale 0 240 0 540;
      > #P newex 546 172 93 196617 scale 0 320 0 800;
      > #P user jit.fpsgui 170 719 60 196617 0;
      > #P newex 655 144 49 196617 pipe 100;
      > #P newex 559 142 49 196617 pipe 100;
      > #P flonum 138 194 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 65 153 116 196617 scale 0 240 -0.24 0.24;
      > #P newex 743 600 45 196617 loadbang;
      > #P newex 748 121 45 196617 loadbang;
      > #P message 748 156 14 196617 1;
      > #P newex 454 105 45 196617 loadbang;
      > #P message 454 140 31 196617 3.42;
      > #P comment 483 575 208 196617 ? get list of connected devices;
      > #P message 434 574 44 196617 getdevs;
      > #P comment 490 602 208 196617 ? update firmware , opens file open dialog;
      > #P message 434 601 52 196617 firmware;
      > #P comment 472 629 197 196617 ? print usage info to the Max window;
      > #P message 434 629 34 196617 usage;
      > #P comment 490 739 251 196617 ? indicates whether a device is opened or not;
      > #P toggle 470 739 15 0;
      > #P comment 493 547 217 196617 ? set all DMX channels temporarily to zero;
      > #P toggle 434 527 15 0;
      > #P message 434 546 61 196617 blackout $1;
      > #P window linecount 3;
      > #P comment 501 499 208 196617 ? get the parameters of the DMX USB Pro Interface (i.e. refresh rate , break time and mark after brake time);
      > #P window linecount 1;
      > #P message 434 498 55 196617 getparams;
      > #P newex 432 775 42 196617 route 0;
      > #P number 673 801 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P comment 714 802 90 196617 ? DMX value;
      > #P message 467 376 43 196617 receive;
      > #P message 434 376 29 196617 send;
      > #P window linecount 2;
      > #P comment 507 468 213 196617 ? set number of DMX channels to send (1 - 512);
      > #P window linecount 1;
      > #P message 434 467 68 196617 channels 512;
      > #P comment 502 413 213 196617 ? set DMX StartCode (default = 0);
      > #P message 434 411 61 196617 startcode 0;
      > #P comment 522 340 152 196617 ? control your light setup;
      > #N vpatcher 121 83 921 594;
      > #P origin 0 105;
      > #P window setfont "Sans Serif" 9.;
      > #P window linecount 1;
      > #P newex 70 42 99 196617 scale 1 240 80 160;
      > #P newex 202 43 99 196617 scale 1 240 80 210;
      > #N comlet channel 3 vertical;
      > #P inlet 194 1 15 0;
      > #N comlet channel 2 horizontal;
      > #P inlet 101 2 15 0;
      > #N comlet channel 1;
      > #P inlet 67 92 15 0;
      > #P window linecount 0;
      > #P message 644 152 23 196617 255;
      > #P newex 644 120 44 196617 loadbang;
      > #P newex 544 384 27 196617 int 0;
      > #P button 534 339 15 0;
      > #P newex 544 361 27 196617 * 0.;
      > #P flonum 561 339 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 485 384 27 196617 int 0;
      > #P button 475 339 15 0;
      > #P newex 485 361 27 196617 * 0.;
      > #P flonum 502 339 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 425 384 27 196617 int 0;
      > #P button 415 339 15 0;
      > #P newex 425 361 27 196617 * 0.;
      > #P flonum 442 339 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 366 384 27 196617 int 0;
      > #P button 356 339 15 0;
      > #P newex 366 361 27 196617 * 0.;
      > #P flonum 383 339 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 306 384 27 196617 int 0;
      > #P button 296 339 15 0;
      > #P newex 306 361 27 196617 * 0.;
      > #P flonum 323 339 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 247 384 27 196617 int 0;
      > #P button 237 339 15 0;
      > #P newex 247 361 27 196617 * 0.;
      > #P flonum 264 339 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 187 384 27 196617 int 0;
      > #P button 177 339 15 0;
      > #P newex 187 361 27 196617 * 0.;
      > #P flonum 204 339 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 128 384 27 196617 int 0;
      > #P button 118 339 15 0;
      > #P newex 128 361 27 196617 * 0.;
      > #P flonum 145 339 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 514 453 27 196617 int 0;
      > #P button 504 408 15 0;
      > #P newex 514 430 27 196617 * 0.;
      > #P flonum 531 408 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 455 453 27 196617 int 0;
      > #P button 445 408 15 0;
      > #P newex 455 430 27 196617 * 0.;
      > #P flonum 472 408 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 395 453 27 196617 int 0;
      > #P button 385 408 15 0;
      > #P newex 395 430 27 196617 * 0.;
      > #P flonum 412 408 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 336 453 27 196617 int 0;
      > #P button 326 408 15 0;
      > #P newex 336 430 27 196617 * 0.;
      > #P flonum 353 408 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 276 453 27 196617 int 0;
      > #P button 266 408 15 0;
      > #P newex 276 430 27 196617 * 0.;
      > #P flonum 293 408 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 217 453 27 196617 int 0;
      > #P button 207 408 15 0;
      > #P newex 217 430 27 196617 * 0.;
      > #P flonum 234 408 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 157 453 27 196617 int 0;
      > #P button 147 408 15 0;
      > #P newex 157 430 27 196617 * 0.;
      > #P flonum 174 408 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 98 453 27 196617 int 0;
      > #P button 88 408 15 0;
      > #P newex 98 430 27 196617 * 0.;
      > #P flonum 115 408 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 592 310 31 196617 / 254.;
      > #P window setfont "Sans Serif" 12.;
      > #P comment 581 280 78 196620 MASTER;
      > #P user uslider 592 126 25 127 255 1 0 0;
      > #P comment 543 280 29 196620 16;
      > #P comment 513 280 29 196620 15;
      > #P comment 481 280 29 196620 14;
      > #P comment 454 280 29 196620 13;
      > #P comment 424 280 29 196620 12;
      > #P comment 392 280 29 196620 11;
      > #P comment 365 280 29 196620 10;
      > #P comment 337 280 29 196620 9;
      > #P comment 309 280 29 196620 8;
      > #P comment 277 280 29 196620 7;
      > #P comment 250 280 29 196620 6;
      > #P comment 218 280 29 196620 5;
      > #P comment 190 280 29 196620 4;
      > #P comment 158 280 29 196620 3;
      > #P comment 131 280 29 196620 2;
      > #P window setfont "Sans Serif" 9.;
      > #P message 544 476 30 196617 16 $1;
      > #P message 514 476 30 196617 15 $1;
      > #P message 485 476 30 196617 14 $1;
      > #P message 455 476 30 196617 13 $1;
      > #P message 425 476 30 196617 12 $1;
      > #P message 395 476 30 196617 11 $1;
      > #P message 366 476 30 196617 10 $1;
      > #P message 336 476 26 196617 9 $1;
      > #P message 306 476 26 196617 8 $1;
      > #P message 276 476 26 196617 7 $1;
      > #P message 247 476 26 196617 6 $1;
      > #P message 217 476 26 196617 5 $1;
      > #P message 187 476 26 196617 4 $1;
      > #P message 157 476 26 196617 3 $1;
      > #P message 128 476 26 196617 2 $1;
      > #P message 98 476 26 196617 1 $1;
      > #P user uslider 544 126 18 128 255 1 0 0;
      > #P user uslider 514 126 18 128 255 1 0 0;
      > #P user uslider 485 126 18 128 255 1 0 0;
      > #P user uslider 455 126 18 128 255 1 0 0;
      > #P user uslider 425 126 18 128 255 1 0 0;
      > #P user uslider 395 126 18 128 255 1 0 0;
      > #P user uslider 366 126 18 128 255 1 0 0;
      > #P user uslider 336 126 18 128 255 1 0 0;
      > #P user uslider 306 126 18 128 255 1 0 0;
      > #P user uslider 276 126 18 128 255 1 0 0;
      > #P user uslider 247 126 18 128 255 1 0 0;
      > #P user uslider 217 126 18 128 255 1 0 0;
      > #P user uslider 188 124 18 128 255 1 0 0;
      > #P user uslider 158 128 18 128 255 1 0 0;
      > #P user uslider 128 126 18 128 255 1 0 0;
      > #P user uslider 98 126 18 128 255 1 0 0;
      > #P outlet 310 505 15 0;
      > #P window setfont "Sans Serif" 12.;
      > #P comment 99 280 29 196620 1;
      > #P connect 119 0 122 0;
      > #P connect 52 0 54 0;
      > #P connect 118 0 2 0;
      > #P hidden connect 2 0 53 0;
      > #P connect 54 0 53 0;
      > #P connect 53 0 55 0;
      > #P connect 55 0 18 0;
      > #P connect 51 0 52 0;
      > #P connect 52 0 53 1;
      > #P connect 84 0 86 0;
      > #P hidden connect 3 0 85 0;
      > #P connect 86 0 85 0;
      > #P connect 85 0 87 0;
      > #P connect 87 0 19 0;
      > #P connect 51 0 84 0;
      > #P connect 84 0 85 1;
      > #P connect 56 0 58 0;
      > #P hidden connect 4 0 57 0;
      > #P connect 58 0 57 0;
      > #P connect 57 0 59 0;
      > #P connect 59 0 20 0;
      > #P connect 122 0 4 0;
      > #P connect 51 0 56 0;
      > #P connect 56 0 57 1;
      > #P connect 88 0 90 0;
      > #P hidden connect 5 0 89 0;
      > #P connect 90 0 89 0;
      > #P connect 89 0 91 0;
      > #P connect 91 0 21 0;
      > #P connect 121 0 5 0;
      > #P connect 120 0 121 0;
      > #P connect 51 0 88 0;
      > #P connect 88 0 89 1;
      > #P connect 60 0 62 0;
      > #P hidden connect 6 0 61 0;
      > #P connect 62 0 61 0;
      > #P connect 61 0 63 0;
      > #P connect 63 0 22 0;
      > #P connect 51 0 60 0;
      > #P connect 60 0 61 1;
      > #P connect 92 0 94 0;
      > #P hidden connect 7 0 93 0;
      > #P connect 94 0 93 0;
      > #P connect 93 0 95 0;
      > #P connect 95 0 23 0;
      > #P connect 51 0 92 0;
      > #P connect 92 0 93 1;
      > #P connect 64 0 66 0;
      > #P hidden connect 8 0 65 0;
      > #P connect 66 0 65 0;
      > #P connect 65 0 67 0;
      > #P connect 67 0 24 0;
      > #P connect 51 0 64 0;
      > #P connect 64 0 65 1;
      > #P connect 96 0 98 0;
      > #P hidden connect 9 0 97 0;
      > #P connect 98 0 97 0;
      > #P connect 97 0 99 0;
      > #P connect 99 0 25 0;
      > #P connect 33 0 1 0;
      > #P connect 32 0 1 0;
      > #P connect 31 0 1 0;
      > #P connect 30 0 1 0;
      > #P connect 29 0 1 0;
      > #P connect 28 0 1 0;
      > #P connect 27 0 1 0;
      > #P connect 26 0 1 0;
      > #P connect 25 0 1 0;
      > #P connect 24 0 1 0;
      > #P connect 23 0 1 0;
      > #P connect 22 0 1 0;
      > #P connect 21 0 1 0;
      > #P connect 20 0 1 0;
      > #P connect 19 0 1 0;
      > #P connect 18 0 1 0;
      > #P connect 51 0 96 0;
      > #P connect 96 0 97 1;
      > #P connect 68 0 70 0;
      > #P hidden connect 10 0 69 0;
      > #P connect 70 0 69 0;
      > #P connect 69 0 71 0;
      > #P connect 71 0 26 0;
      > #P connect 51 0 68 0;
      > #P connect 68 0 69 1;
      > #P connect 100 0 102 0;
      > #P hidden connect 11 0 101 0;
      > #P connect 102 0 101 0;
      > #P connect 101 0 103 0;
      > #P connect 103 0 27 0;
      > #P connect 51 0 100 0;
      > #P connect 100 0 101 1;
      > #P connect 72 0 74 0;
      > #P hidden connect 12 0 73 0;
      > #P connect 74 0 73 0;
      > #P connect 73 0 75 0;
      > #P connect 75 0 28 0;
      > #P connect 51 0 72 0;
      > #P connect 72 0 73 1;
      > #P connect 104 0 106 0;
      > #P hidden connect 13 0 105 0;
      > #P connect 106 0 105 0;
      > #P connect 105 0 107 0;
      > #P connect 107 0 29 0;
      > #P connect 51 0 104 0;
      > #P connect 104 0 105 1;
      > #P connect 76 0 78 0;
      > #P hidden connect 14 0 77 0;
      > #P connect 78 0 77 0;
      > #P connect 77 0 79 0;
      > #P connect 79 0 30 0;
      > #P connect 51 0 76 0;
      > #P connect 76 0 77 1;
      > #P connect 108 0 110 0;
      > #P hidden connect 15 0 109 0;
      > #P connect 110 0 109 0;
      > #P connect 109 0 111 0;
      > #P connect 111 0 31 0;
      > #P connect 51 0 108 0;
      > #P connect 108 0 109 1;
      > #P connect 80 0 82 0;
      > #P hidden connect 16 0 81 0;
      > #P connect 82 0 81 0;
      > #P connect 81 0 83 0;
      > #P connect 83 0 32 0;
      > #P connect 51 0 80 0;
      > #P connect 80 0 81 1;
      > #P connect 112 0 114 0;
      > #P hidden connect 17 0 113 0;
      > #P connect 114 0 113 0;
      > #P connect 113 0 115 0;
      > #P connect 115 0 33 0;
      > #P connect 51 0 112 0;
      > #P connect 112 0 113 1;
      > #P hidden connect 117 0 49 0;
      > #P hidden connect 49 0 51 0;
      > #P connect 116 0 117 0;
      > #P pop;
      > #P newobj 435 338 81 196617 p fadercontrol;
      > #P comment 619 684 197 196617 ? open or close the device;
      > #P message 577 684 32 196617 close;
      > #P comment 452 310 203 196617 ? send DMX data: ;
      > #P message 414 309 35 196617 1 255;
      > #P window linecount 2;
      > #P comment 513 378 180 196617 ? set whether 'dmxusbpro' should send (default) or receive DMX data;
      > #P window linecount 1;
      > #P message 433 683 167 196617 open /dev/cu.usbserial-ENP1UOV1;
      > #P number 549 865 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 536 831 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 523 848 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 510 865 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 497 831 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 484 848 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 471 865 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 458 831 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 445 848 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 432 865 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 432 805 144 196617 route 1 2 3 4 5 6 7 8 9 10;
      > #P number 619 845 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 646 823 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 773 772 67 196617 print dmxusb;
      > #P comment 687 824 223 196617 ? DMX channel number aka 'slot' (1 - 512);
      > #P comment 660 846 179 196617 ? DMX start code (0 = dimmer data);
      > #P newex 619 773 65 196617 unpack 0 0 0;
      > #P window linecount 2;
      > #P comment 497 440 213 196617 ? set send refresh rate in frames per second (possible values are 1 - 40 , default = 40);
      > #P window linecount 1;
      > #P message 434 439 58 196617 refresh 40;
      > #P comment 467 656 197 196617 ? print some info to the Max window;
      > #P comment 490 716 304 196617 ? optional creation arguments: [];
      > #P message 434 655 31 196617 print;
      > #P newex 414 715 66 196617 dmxusbpro;
      > #B color 5;
      > #P newex 846 78 83 196617 drunk 2000 200;
      > #B color 5;
      > #P newex 180 690 58 196617 jit.window;
      > #P window setfont Times 10.;
      > #P comment 257 766 88 1310730 Full Screen Display;
      > #P window setfont "Fixedwidth Serif" 10.;
      > #P message 153 765 83 1441802 fullscreen $1;
      > #P toggle 242 765 15 0;
      > #P window setfont Times 10.;
      > #P comment 304 745 44 1310730 space bar;
      > #P window setfont "Fixedwidth Serif" 10.;
      > #P newex 242 743 62 1441802 select 32;
      > #P newex 242 722 40 1441802 key;
      > #P button 853 1 15 0;
      > #P window setfont "Sans Serif" 9.;
      > #P newex 851 29 48 196617 loadbang;
      > #P newex 851 56 64 196617 metro 1000;
      > #P window setfont "Fixedwidth Serif" 10.;
      > #P number 850 143 41 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P toggle 656 68 15 0;
      > #N vpatcher 260 407 931 668;
      > #P origin -27 0;
      > #P window setfont "Fixedwidth Serif" 10.;
      > #P window linecount 1;
      > #P newex 185 115 38 1441802 sel 0;
      > #P message 185 136 32 1441802 stop;
      > #P window setfont Times 10.;
      > #P comment 270 218 62 1310730 dst dim2 start;
      > #P comment 206 218 62 1310730 dst dim1 start;
      > #N comlet (int) dst dim2 start;
      > #P outlet 297 203 15 0;
      > #N comlet (int)dst dim1 start;
      > #P outlet 226 203 15 0;
      > #N comlet (int) dest. rect. rate;
      > #P inlet 268 60 15 0;
      > #N comlet (1/0) dest. rect. on/off;
      > #P inlet 226 60 15 0;
      > #P window setfont "Fixedwidth Serif" 10.;
      > #P newex 241 88 38 1441802 metro;
      > #P newex 297 115 68 1441802 random 240;
      > #P newex 297 157 47 1441802 pack;
      > #P newex 225 116 70 1441802 random 320;
      > #P newex 226 157 47 1441802 pack;
      > #P newex 297 182 62 1441802 line 0 50;
      > #P newex 226 182 62 1441802 line 0 50;
      > #P window setfont Times 10.;
      > #P window linecount 0;
      > #P comment 222 35 183 1310730 automated change of destination dimensions;
      > #P comment 269 48 22 1310730 rate;
      > #P comment 222 48 32 1310730 on/off;
      > #P fasten 10 0 17 0 231 78 190 78;
      > #P connect 17 0 16 0;
      > #P connect 9 0 6 0;
      > #P connect 6 0 5 0;
      > #P fasten 16 0 3 0 190 178 231 178;
      > #P connect 5 0 3 0;
      > #P connect 3 0 12 0;
      > #P connect 10 0 9 0;
      > #P fasten 11 0 5 1 273 86 268 86;
      > #P connect 11 0 9 1;
      > #P fasten 9 0 8 0 246 111 302 111;
      > #P connect 8 0 7 0;
      > #P connect 7 0 4 0;
      > #P fasten 16 0 4 0 190 178 302 178;
      > #P connect 4 0 13 0;
      > #P fasten 11 0 7 1 273 86 339 86;
      > #P pop;
      > #P newobj 550 95 220 1441802 patcher move_around;
      > #P window setfont "Sans Serif" 9.;
      > #P user jit.fpsgui 40 675 60 196617 0;
      > #P message 221 54 28 196617 stop;
      > #P message 10 216 31 196617 clear;
      > #P flonum 213 150 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 196 168 27 196617 * 1.;
      > #P number 737 194 35 9 0 4 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P message 737 215 71 196617 boundmode $1;
      > #P button 532 246 15 0;
      > #P hidden message 388 135 14 196617 0;
      > #P hidden message 350 135 14 196617 1;
      > #N vpatcher 40 55 609 322;
      > #P window setfont "Sans Serif" 9.;
      > #P comment 5 125 100 196617 detailed;
      > #P comment 5 98 330 196617 output_y(j , i) = (sin(theta)/zoom_x)*(j-(offset_x+anchor_x)) + (cos(theta)/zoom_y)*(i-(offset_y+anchor_y))) + anchor_y;
      > #P comment 5 70 322 196617 output_x(j , i) = ((cos(theta)/zoom_x)*(j-(offset_x+anchor_x)) - (sin(theta)/zoom_x)*(i-(offset_y+anchor_y))) + anchor_x;
      > #P comment 5 166 539 196617 output_y(j , i) = (sinscale_y*sin((theta*thetascalesin_y)+thetaoffsetsin_y))/zoom_x)*(j-(offset_x+anchor_x)) + (cosscale_y*cos((theta*thetascalecos_y)+thetaoffsetcos_y))/zoom_y)*(i-(offset_y+anchor_y))) + anchor_y;
      > #P comment 123 44 156 196617 calculated by the formula:;
      > #P comment 5 138 537 196617 output_x(j , i) = (cosscale_x*cos((theta*thetascalecos_x)+thetaoffsetcos_x)/zoom_x)*(j-(offset_x+anchor_x)) - (sinscale_x*sin((theta*thetascalesin_x)+thetaoffsetsin_x))/zoom_x)*(i-(offset_y+anchor_y))) + anchor_x;
      > #P comment 5 52 100 196617 simple;
      > #P comment 8 212 427 196617 yes , zoom_x + zoom_y are redundant and can be simulated with sinscale+cosscale values , but that's okay , there's no performance penalty;
      > #P pop;
      > #P newobj 460 246 51 196617 p formula;
      > #N counter 360;
      > #X flags 0 0;
      > #P newobj 196 130 66 196617 counter 360;
      > #P newex 196 109 20 196617 t b;
      > #P toggle 42 108 15 0;
      > #P newex 42 126 27 196617 gate;
      > #P newex 279 138 45 196617 loadbang;
      > #P message 682 216 50 196617 interp $1;
      > #P toggle 682 196 15 0;
      > #P message 349 171 26 196617 266;
      > #P message 279 173 26 196617 311;
      > #P flonum 445 175 66 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 610 196 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 543 197 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P message 610 216 62 196617 offset_y $1;
      > #P message 542 216 62 196617 offset_x $1;
      > #P flonum 479 196 45 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 416 196 45 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P message 479 216 58 196617 zoom_y $1;
      > #P message 416 216 58 196617 zoom_x $1;
      > #P newex 136 217 135 196617 expr ($f1/360.)*6.283185;
      > #P flonum 58 195 45 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P message 126 252 45 196617 theta $1;
      > #P number 348 197 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 279 196 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P message 347 216 65 196617 anchor_y $1;
      > #P message 279 216 65 196617 anchor_x $1;
      > #P user jit.pwindow 39 366 322 242 0 1 0 0 1 0;
      > #P newex 70 273 30 196617 print;
      > #P newex 39 252 41 196617 jit.rota;
      > #B color 5;
      > #P flonum 180 33 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P message 256 54 42 196617 rate $1;
      > #P message 117 54 30 196617 read;
      > #P toggle 39 33 15 0;
      > #P newex 39 89 105 196617 jit.qt.movie 320 240;
      > #P comment 57 175 62 196617 radians;
      > #P comment 133 175 50 196617 degrees;
      > #P comment 136 113 57 196617 auto rotate;
      > #P comment 406 246 51 196617 more...;
      > #P comment 550 247 41 196617 reset;
      > #P window linecount 5;
      > #P comment 820 195 90 196617 0=ignore(default) ; 1=clear ; 2=wrap ; 3=clip ; 4=fold ;;
      > #P window linecount 1;
      > #P newex 39 53 44 196617 metro 2;
      > #P comment 615 178 100 196617 vert;
      > #P connect 9 0 1 0;
      > #P fasten 50 0 8 0 226 77 44 77;
      > #P fasten 11 0 8 0 261 77 44 77;
      > #P fasten 10 0 8 0 122 77 44 77;
      > #P fasten 1 0 8 0 44 82 44 82;
      > #P connect 20 0 13 0;
      > #P connect 8 0 13 0;
      > #P fasten 27 0 13 0 547 241 44 241;
      > #P fasten 45 0 13 0 742 241 44 241;
      > #P fasten 35 0 13 0 687 241 44 241;
      > #P fasten 16 0 13 0 284 241 44 241;
      > #P fasten 17 0 13 0 352 241 44 241;
      > #P fasten 23 0 13 0 421 241 44 241;
      > #P fasten 24 0 13 0 484 241 44 241;
      > #P fasten 28 0 13 0 615 241 44 241;
      > #P fasten 49 0 13 0 15 241 44 241;
      > #P connect 13 0 15 0;
      > #P connect 15 0 51 0;
      > #P connect 38 0 37 0;
      > #P connect 124 0 21 0;
      > #P fasten 22 0 21 0 141 237 63 192;
      > #P fasten 8 0 37 1 44 110 64 110;
      > #P connect 52 1 124 0;
      > #P connect 13 1 14 0;
      > #P connect 21 0 20 0;
      > #P connect 125 0 22 0;
      > #P fasten 61 0 62 0 247 783 238 783 238 761 158 761;
      > #P connect 64 0 128 0;
      > #P connect 15 0 64 0;
      > #P connect 62 0 64 0;
      > #P fasten 37 0 39 0 47 157 129 157 129 105 201 105;
      > #P connect 39 0 40 0;
      > #P connect 40 0 47 0;
      > #P connect 48 0 47 1;
      > #P connect 58 0 59 0;
      > #P connect 59 0 61 0;
      > #P connect 12 0 11 0;
      > #P connect 36 0 32 0;
      > #P connect 32 0 18 0;
      > #P connect 18 0 16 0;
      > #P connect 19 0 17 0;
      > #P connect 33 0 19 0;
      > #P connect 36 0 33 0;
      > #P hidden connect 44 0 42 0;
      > #P hidden connect 36 0 42 0;
      > #P hidden connect 44 0 43 0;
      > #P hidden connect 36 0 43 0;
      > #P fasten 117 0 66 0 439 595 419 595;
      > #P fasten 115 0 66 0 439 622 419 622;
      > #P fasten 113 0 66 0 439 650 419 650;
      > #P fasten 108 0 66 0 439 568 419 568;
      > #P fasten 106 0 66 0 439 519 419 519;
      > #P fasten 102 0 66 0 472 396 419 396;
      > #P fasten 101 0 66 0 439 396 419 396;
      > #P fasten 97 0 66 0 439 432 419 432;
      > #P fasten 70 0 66 0 439 460 419 460;
      > #P fasten 67 0 66 0 439 678 419 678;
      > #P fasten 89 0 66 0 438 705 419 705;
      > #P connect 91 0 66 0;
      > #P fasten 93 0 66 0 582 705 419 705;
      > #P fasten 95 0 66 0 440 361 419 361;
      > #P fasten 99 0 66 0 439 488 419 488;
      > #P fasten 31 0 25 0 450 190 421 190;
      > #P connect 25 0 23 0;
      > #P fasten 66 0 105 0 419 760 437 760;
      > #P connect 105 0 78 0;
      > #P connect 78 0 79 0;
      > #P connect 123 0 89 0;
      > #P connect 109 0 108 0;
      > #P connect 119 0 31 0;
      > #P connect 78 1 80 0;
      > #P connect 120 0 119 0;
      > #P connect 78 2 81 0;
      > #P connect 52 0 95 1;
      > #P connect 66 1 111 0;
      > #P connect 78 3 82 0;
      > #P fasten 31 0 26 0 450 190 484 190;
      > #P connect 26 0 24 0;
      > #P connect 78 4 83 0;
      > #P connect 78 5 84 0;
      > #P connect 52 1 95 2;
      > #P connect 78 6 85 0;
      > #P connect 78 7 86 0;
      > #P connect 78 8 87 0;
      > #P connect 29 0 27 0;
      > #P connect 129 0 29 0;
      > #P connect 126 0 129 0;
      > #P connect 78 9 88 0;
      > #P connect 53 0 52 0;
      > #P connect 52 0 126 0;
      > #P connect 130 0 30 0;
      > #P connect 30 0 28 0;
      > #P fasten 66 0 72 0 419 760 624 760;
      > #P connect 72 0 77 0;
      > #P connect 72 1 76 0;
      > #P connect 127 0 130 0;
      > #P connect 52 1 127 0;
      > #P connect 134 0 53 0;
      > #P connect 72 2 104 0;
      > #P connect 34 0 35 0;
      > #P connect 121 0 46 0;
      > #P connect 46 0 45 0;
      > #P connect 122 0 121 0;
      > #P connect 54 0 52 1;
      > #P fasten 66 0 75 0 419 760 778 760;
      > #P connect 55 0 65 0;
      > #P connect 65 0 54 0;
      > #P connect 131 0 54 0;
      > #P connect 57 0 56 0;
      > #P connect 56 0 55 0;
      > #P connect 132 0 131 0;
      > #P pop;
      >
      >
    • Nov 07 2006 | 9:00 am
      hi i had a look but as im a nubi, I cant really decipher it. What object in particular should I focus on? where should I apply it in my patch?
      Kind Regards,
      Kit.