/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://studio.sketchpad.cc/sp/pad/view/ro.IPyThZhp2YR/rev.6
*
* authors:
* (Unnamed author)
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
// This sketch builds on a prior work, "Untitled Sketch", created by [unnamed author] http://sketchpad.cc/sp/pad/view/ro.SblO7tLfH6u/rev.176
int rotation;
int clearRatio;
void setup(){
size(800,800);
background(0);
rotation = 0;
clearRatio = 2
stroke(0,0);
}
void draw(){
fill(0,1);
rectMode(CORNER);
rect(0, 0, width, height);
fill(255, 50);
pushMatrix();
translate (width/2, height/2);
rotate(radians(rotation));
rectMode(CENTER);
pushMatrix();
translate (180, 0);
rotate(radians(rotation*2));
rect (0, 0, 50, 50);
pushMatrix();
translate (0, 80);
rotate(radians(rotation*2));
rect (0, 0, 25, 25);
popMatrix();
pushMatrix();
translate (0, -80);
rotate(radians(rotation*2));
rect (0, 0, 25, 25);
popMatrix(); pushMatrix();
translate (80, 0);
rotate(radians(rotation*2));
rect (0, 0, 25, 25);
popMatrix();
pushMatrix();
translate (-80, 0);
rotate(radians(rotation*2));
rect (0, 0, 25, 25);
popMatrix();
popMatrix();
popMatrix();
rotation++;
rotation = rotation%360;
}