# Project 7 – Compositions with Curves

For this project, I was inspired by an abstract interpretation of the human eye and wanted to include aspects of that into my project. It was sort of difficult getting my initial equation to work, but after adjusting it to cos/sin it worked a lot better. It also took me a long time to find ways of simplifying my code, since I wanted to work on keeping my code as concise as I can when possible, and to try to find the easiest way to create what I had in mind without extra steps.

sketch
``````//iris yip
//15-104 section D
//project 7

function setup() {
createCanvas(480, 480); //canvas size
}

function draw() {
background(0,5) //background opacity
stroke(255)
translate(240, 240); //position of interactive circle
x = cos(frameCount / 30) * (4 * mouseX / 40 * (sin(frameCount / 30)) * 2 - frameCount / 30) //equation
y = mouseY / 10; //Y position of mouse
strokeWeight(x / 10)
rotate(frameCount + x / 100); //action and framerate

//coordinates (movement)
point(x, y);
point(y, x);
point(-x, y);
point(-y, -x);
}``````