// Minjae Jeong
// Section B
// minjaej@andrew.cmu.edu
// Project -03
var angleX = 0;
var angleY = 0;
function setup() {
createCanvas(640, 480);
rectMode(CENTER);
}
function draw() {
background((mouseX - mouseY) / 2, mouseX - mouseY, mouseY + 17); // change colors
r = mouseX - 300;
g = mouseY - 200;
b = mouseX - mouseY;
fill(mouseX / 3, 163, 223);
push();
translate(mouseX / 3, mouseY / 2);
rotate(radians(angleX));
rect(130, 30, mouseX / 3, 50);
angleX = angleX + 1;
pop();
fill(r, g, b);
push();
translate(mouseX / 3, mouseY / 2);
rect(140, 50, mouseX - 200, mouseY / 3);
pop();
fill(81, mouseX / 2, 223);
push();
translate(mouseX, mouseY);
rotate(radians(angleY));
ellipse(300, 250, 50, mouseY / 2);
angleY = angleY - 1;
pop();
fill(81, mouseX / 2, 223);
push();
translate(mouseX / 6, mouseY / 4);
ellipse(300, 250, 50, mouseY);
pop();
}
This project, I wanted to create what randomness in order would look like. It started from a thought that what if what we see everyday that seems random is actually not random?