# Min Jun Kim -Project 3 Dynamic Drawing Section B

``````/*
Min Jun Kim
minjunki@andrew.cmu.edu
15104-B
Project 3
*/

function setup() {
createCanvas(640, 480);
}

function draw() {

strokeWeight(3);
push();
background(mouseX);
translate(width/2,height/2);
rotate(mouseX/-100);
pop();

//the oval representing the eye
push();
fill(mouseX);
translate(width/2,height/2)
ellipse(0,0,mouseX*1.9,mouseX*1.3)
pop();

//red circle in middle
push();
translate(width/2,height/2);
fill(mouseX*255/640,10,10);
ellipse(0,0,mouseX,mouseX);
pop();

//a ring around the spinning reverse quads
push();
translate(width/2,height/2);
fill(mouseX*255/640,10,10)
ellipse(0,0,mouseX/1.3,mouseX/1.3);
pop();

translate(width/2,height/2);
push();
fill(0);
rotate(mouseX/-300);
pop();

push();
fill(mouseX*255/640,10,10)
rotate(mouseX/-400);
pop();

push();
fill(0);
rotate(mouseX/-500);
pop();

push();
fill(mouseX*255/640,10,10)
rotate(mouseX/-600);
pop();

push();
fill(0);
rotate(mouseX/-700);
pop();

//spinning rect 1
push();
fill(0);
rotate(mouseX/30-0.4);
rect(mouseX/4,mouseX/4,mouseX/20,mouseX/20);
pop();

//spinning rect 2
push();
fill(0);
rotate(mouseX/30+1.6);
rect(mouseX/4,mouseX/4,mouseX/20,mouseX/20)
pop();

//spinning rect 3
push();
fill(0);
rotate(mouseX/30-2.5);
rect(mouseX/4,mouseX/4,mouseX/20,mouseX/20)
pop();

//upper black cover
push();
fill(1);
noStroke();
rect(-400,-100+mouseX*2,1000,1000);
pop();

//lower black cover
push();
noStroke();
fill(1);
rect(-400,-200-mouseX*2,800,300)
pop();

}