Processing Animation

Motion Graphics created using processing. Video editing done using Kdenlive.

Incase you need the processing code :

float[] Vx= {-150, 0, 150, 0,};
float[] Vy= {0, -150, 0, 150,};
float[] Cx= {-50, 50, 50, -50};
float[] Cy= {-50, -50, 50, 50};

float x=PI/20;
float sca=0.15;
float rot=PI/20;

void setup() {
  size(1200, 700);
  smooth();
}

void draw() {
//  background(100,100,255);
//  fill(100,255,100);

  background(255);
  fill(0);

  noStroke();
  
  scale(sca);
  
  for(int x=-300;x<9600;x+=300){
    for(int y=-300;y<5600;y+=300){
      pushMatrix();
      
      
      translate(x,y);
      rotate(rot);
      //fill(123,123,random(123,255));
      myShape();
      popMatrix();
    }    
  }  
  
}

void keyPressed() {
  if (key=='n') {
    for (int a=0;a<4;a++){
      Vx[a]+=10*sin(x);
      Vy[a]+=10*sin(x);
    }
    for (int a=0;a<4;a++){
      Cx[a]+=10*cos(x);
      Cy[a]+=10*cos(x);
    }
    x+=0.1;
  }
  
  if (key=='s'){
    sca+=0.15;
  }
  
    
  if (key=='r'){
    rot+=0.1;
  }
}

void myShape(){  
  beginShape();
  vertex(Vx[0], Vy[0]);
  bezierVertex(Cx[0], Cy[0], Cx[0], Cy[0], Vx[1], Vy[1]);
  bezierVertex(Cx[1], Cy[1], Cx[1], Cy[1], Vx[2], Vy[2]);
  bezierVertex(Cx[2], Cy[2], Cx[2], Cy[2], Vx[3], Vy[3]);
  bezierVertex(Cx[3], Cy[3], Cx[3], Cy[3], Vx[0], Vy[0]);
  endShape();   
}

Press ‘S’ to scale, ‘R’ to rotate and ‘N’ to animate

Advertisements