Project-03-Dynamic-Drawing

sketch
//Nami Numoto
//Section A


function setup() {
    createCanvas(600, 450);
    background(0);
}

function draw() {
    background(0); // initialize background
    fill(255, 255, 0); // yellow
    var m = max(min(mouseX, 600), 0); //restrict x to the canvas (600)
    var size = m * 350.0 / 400.0; // manipulate sizes of the circles
    ellipse(mouseX, mouseY, size, size); //yellow dot that follows mouse
    fill(0, 0, 255); // blue
    size = 400 - size;
    ellipse((width - mouseX), (height - mouseY), size, size); //blue dot that follows mouse inversely sort of
}

// everything the mouse 'draws' or hovers (yellow dot) should be mirrored about the y axis by the blue dot
// make them change size contrarily

I wanted to go off of the example while keeping it original. I’ve always been intrigued by mirror images and reflections, so I decided to reflect the user’s mouse trails about the y-axis and practice using contrary sizing.

I’ve noticed that the blue ellipse is not showing up, although it works in my index.html file… trying to work that out still

Leave a Reply