Skip to content

Instantly share code, notes, and snippets.

Created November 23, 2013 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/7610865 to your computer and use it in GitHub Desktop.
Save anonymous/7610865 to your computer and use it in GitHub Desktop.
Encargo4 Della Maggiora
float counter = 0;
void setup()
{
size(400, 400);
colorMode(HSB, 360, 100, 100);
}
void draw()
{
background(0, 0, 0);
float b = map(sin(counter), -1, 1, 0, 80);
fill(0, 100, b);
noStroke();
translate(200, 110);
rotate(0.8);
rect(0, 0, 180, 180);
fill(100, 100, b, 50);
rect(10, 10, 300, 300);
fill(255, 100, b, 50);
rect(10, 10, 60, 60);
fill(255, b, 255, 50);
rect(-10, -10, -300, -300);
fill(b, 255, 255, 50);
rect(-10, -10, -500, -500);
counter += 0.5;
}
void mousePressed(){
background(255);
}
void mouseDragged(){
background(mouseX);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment