• fullscreen
  • Checkerboard1.pde
  • import processing.opengl.*;
    
    PShape checker;
    float i, j, temp;
    int SCALE = 50;
    float STEPS = 5000.0;
    
    void setup() {
      size(640,480);
      smooth();
      checker = loadShape("checker1.svg");
      i=0;
      j=0;
      temp=0;
    } 
    
    void draw(){
      if (i>STEPS) {i=0;}
      if (j>STEPS) {i=0;}
      background(255);
      translate((width/2),(height/2));
      temp=(i/STEPS)*360.0;
      rotate(radians(temp));
      shape(checker, (-10*SCALE)-(1*SCALE), (-10*SCALE)-(1*SCALE),20*SCALE,20*SCALE);
      rotate(-radians(temp));
      i=i+1;
      temp=radians((j/STEPS)*360.0);
      rotate(-temp);
      shape(checker, (-10*SCALE)-(1*SCALE), (-10*SCALE)-(1*SCALE),20*SCALE,20*SCALE);
      j=j+1;
    }
    
    

    code

    tweaks (0)

    about this sketch

    This sketch is running as Java applet, exported from Processing.

    license

    advertisement

    Thomas Winningham

    Chessboard Diffusion

    Add to Faves Me Likey@! 1
    You must login/register to add this sketch to your favorites.

    I was driving around and the concept for this sort of struck me, or I was curious about it. It is mostly what you would expect it would do.

    Frank Novello
    26 Apr 2012
    hey very cool effect. maybe you can make a version 2. make a kaleidoscope and add colors.
    You need to login/register to comment.