Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PImage img1;
- int posX, posY, w, h, frames=90;
- float theta, d;
- void setup() {
- img1 = loadImage("pic2.jpg");
- size(540, img1.height);
- w = 200;
- h = 200;
- d = 100;
- }
- void draw() {
- image(img1, 0, 0);
- for (int x=0; x<width; x++) {
- float offSet = TWO_PI/width*x;
- for (int i=0; i<75; i++) {
- int y = int(height/2+i + sin(theta+offSet*1)*50);
- color col1= img1.get(x, y+i);
- set(x, y, col1);
- }
- }
- //ellipse(posX,posY,10,10);
- theta += TWO_PI/frames;
- if (frameCount<=frames) saveFrame("image-###.gif");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement