heeseoc-Project-04-StringArt

heeseoc-stringart

//Steph Chun
//15-104 section #A
//heeseoc@andrew.cmu.edu
//Project-04

function setup() {
    createCanvas(400, 300);
}

function draw() {

	background(0);

	for (var i = 0; i < 500; i++) {

		stroke(150+mouseX, 255-mouseY, 100); //color change depending on cursor location// 
		strokeWeight(.5); 
	
		line(i*15, height, mouseX, height-i*15); //when mouse is at horizontal center, bottom left//
		line(mouseX, i*15, width-i*15, 0); //top right
		line(i*15+width, height, mouseX, i*15); //bottom right
		line(i*15, 0, mouseX, i*15); //bottom right
}
}

I’ve been experimenting with the curves that connect the adjacent sides of the canvas. While moving them around, I found out that it creates an interesting dimensional quality when the flat sides stick together along the cursor, so I flipped the curves so that the four curves follow the mouse. I gave a slightly different value for one of the curves, because the form as a whole looked boring when it was completely symmetrical.

Leave a Reply