Margot Gersing – Project 04 – String Art

mgersing-sketch

// Margot Gersing - Project 04 String Art - Section E - mgersing@andrew.cmu.edu

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

function draw(){
	background(0);

	// tight lines less wide
	for (i = 0; i < 200; i += 5) {	
		stroke(i, 208, 247); //blue and purple
		line(100, 450 + i, i, 10 - i); //'curve 1'
		line(100, 450 + i, mouseX * 10, 10 - i); //'curve 1' with interaction
	}
	// tight lines
	for (i = 0; i < 600; i += 5) {	
		stroke(i, 235, 225, i); //green to peach
		line(0, i - 100, i, 400); //'curve 2'
		line(0, i - 100, mouseX, mouseY); //'curve 2' with interaction
	}

	// wider lines
	for (i = 0; i < 600; i += 15) {
		stroke(230, 202, i); //purple to ochre
		line(0, 100 - i, 400, 200 + i); //'curve 3'
		line(0, mouseY / 5, 400, 200 + i); //'curve 3' with interaction

		// curve 4
		stroke(252, 186, i, i); //yellow to magenta
		line(400, 200 - i, i - 400, i); //'curve 4'
		line(400, mouseY - i, i - 400, i); //'curve 4' with interaction	
	}
}

I enjoyed making this project. I decided that I wanted to incorporate my ‘i’ variable into more than just the creation of the lines. I experimented with replacing rgb values with ‘i’ and it created really interesting color shifts. I also decided to make a copy of each of the curves I made and make one of them interactive with mouseX and mouseY.

Leave a Reply