Hi folks!
This is my very first post in the forums, nice to meet you all! I learn Processing as a hobby, but I am very proficient in Max/MSP!
Now, I made a small program, from on the official Processing book's tutorial, based on a 800x1200 picture and a scrollbar, that moves a picture left and right. 0 being the center, -100 means left and 100 means right.
My question is: How do I move specific regions in a photo? For instance, I want to move the first block of 800 x 40 to the left, the next block to the right, and so forth!
I would imagine it would be with a "for" loop... Maybe with a loop that counts to 1200 (for the y axis, that is) and if the modulo of 40 gives 0 then it moves to the left, if not to the right? And then, how can you connect it to the scrollbar? I am not experienced enough to figure it out on my own, and maybe what I am saying is complete bogus!
Here's the code: http://pastie.org/private/s3tjgy57ann7lbbl817gfa
I mostly want to learn out of this small program, but it would be nice to know!
Thank you in advance,
Yiannis
This is my very first post in the forums, nice to meet you all! I learn Processing as a hobby, but I am very proficient in Max/MSP!
Now, I made a small program, from on the official Processing book's tutorial, based on a 800x1200 picture and a scrollbar, that moves a picture left and right. 0 being the center, -100 means left and 100 means right.
My question is: How do I move specific regions in a photo? For instance, I want to move the first block of 800 x 40 to the left, the next block to the right, and so forth!
I would imagine it would be with a "for" loop... Maybe with a loop that counts to 1200 (for the y axis, that is) and if the modulo of 40 gives 0 then it moves to the left, if not to the right? And then, how can you connect it to the scrollbar? I am not experienced enough to figure it out on my own, and maybe what I am saying is complete bogus!
Here's the code: http://pastie.org/private/s3tjgy57ann7lbbl817gfa
I mostly want to learn out of this small program, but it would be nice to know!
Thank you in advance,
Yiannis
1