Advertisement
xeromino

ren3D

Nov 29th, 2015
481
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. PImage img;
  2. int res = 2, frms = 60;
  3. float theta;
  4.  
  5. void setup() {
  6.   size(540, 540, P3D);
  7.   img = loadImage("1.png");
  8.   img.filter(GRAY);
  9.   rectMode(CENTER);
  10.   imageMode(CENTER);
  11. }
  12.  
  13. void draw() {
  14.   background(0);
  15.   pushMatrix();
  16.   translate(width/2, height/2);
  17.   rotateY(theta);
  18.  
  19.   for (int i=0; i<10; i++) {
  20.     tint(255, 150);
  21.     image(img, i*5, 0);
  22.   }
  23.   popMatrix();
  24.   theta += TWO_PI/frms;
  25.   if (frameCount<=frms) saveFrame("/Volumes/Anim/image-###.gif");
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement