Skip to content

Instantly share code, notes, and snippets.

@dimkir
Created September 17, 2013 09:32
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 dimkir/6592118 to your computer and use it in GitHub Desktop.
Save dimkir/6592118 to your computer and use it in GitHub Desktop.
Created using Sketch2Tweet tool
int i, s=1024, r;
void setup() {
size(s, s);
noStroke();
}
void draw() {
r=8<<++i%6;
fill(-(r<<(i/s))+(i%24)*r, 270-r);
shapetangle(i/9*8%s, 8*i*i*i%s, r, r);
}//#p5
void shapetangle(int x, int y, int w, int h ){
if ( random(1) > 0.2 ){
ellipse(x,y, w,h);
}
else{
rect(x,y, w,h);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment