keuchuka-project4

project4

//Fon Euchukanonchai
//15-105 SECTION A
//keuchuka@andrew.cmu.edu
//Projedt-04


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

function draw () {


	var w60 = width/60; //increment variable

	background(255);

	conMouseX = constrain(mouseX, 0, 310); //constrain mouse to desired point of stopping movement
	tlRatio = map(conMouseX, 0, width, 0, width/30); //remaps mouseX point for for loop


	for (var x = 0; x < 30; x ++){
		
		//pink lines

		stroke(255, 0 , 255);
		strokeWeight(1);
		//left half pink lines
		line(x*w60, height/2, width/2, x*tlRatio)
		//right half pink lines
		line(x*w60+width/2+5, height/2, width/2, x*tlRatio)
		

		//blue lines

		strokeWeight(1)
		stroke(0, 255, 255)

		//right half blue lines
		line((x*w60)+width/2, height/2, width/2, x*tlRatio)
		//left half blue lines
		line(x*w60, height/2, width/2, x*tlRatio+5)
		//most left blue lines
		line(x*width/60, 0, 0, height/2)

		//yellow lines
		stroke(255, 255, 0)

		//left half yellow lines
		line(x*w60+5, height/2, width/2, height-x*tlRatio)
		//most left yellow lines
		line(0, x*w60+height/2, width/2, height)
		
		//lighter pink lines
		stroke(255, 100, 255)

		//left half pink lines
		line(x*w60, height/2, width/2, height-x*tlRatio)
		
}


}


I wanted to experiment with how string art and particularly moving string art would affect color composition when they interact, as they come together and fall apart, mix and divide.

Leave a Reply