xxxxxxxxxx
void setup() {
size(800, 800);
}
void draw() {
background(200);
testEllipse();
translate(mouseX, mouseY);
testEllipse();
for (float deg = 0; deg<360; deg+=20) {
float d = radians(deg);
pushMatrix();
rotate(d);
int numCircs = 20;
//taper each circle so the tail gets smaller towards the end
for (int circCount = 0; circCount < numCircs; circCount++) {
float diam = map(circCount, 0, numCircs, 5, 36);
translate(10, 0);
fill(255);
ellipse(0, 0, diam, diam);
}
testEllipse();
popMatrix();
}
}
//using this to test push and pop matrix
void testEllipse () {
fill(255, 0, 23);
ellipse(0, 0, 30, 30);
}