Danny Cho – Project 4 – String Art

LineDrawing

// Danny Cho
// changjuc
// Section: A

var rate1 = 0;
var rate2 = 0;
var rate3 = 0;
var rate4 = 0;

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

  noStroke(); 
}



function draw(){
	background(0);
	//living vertex with two moving curves (exploration)
	noFill();
	strokeWeight(1);
	for (var i = 0; i <= 20; i++) {
	noFill();
	strokeWeight(1);
	stroke(100);
	beginShape();
	vertex(0, 30 * cos(radians(rate2)));
	quadraticVertex(20 * i, i * 30 * cos(radians(rate2)), 400, 300);
	quadraticVertex(20, i * 30 * sin(radians(rate2)), 0, 20 * i);
	vertex(400, 0);
	endShape();
	}
	
	//first curve: waves horizontally at rate1
	for (var i = 0; i <= 20; i++) {
			stroke('green');
		line(20 * i * cos(radians(rate1)), 0, 0, 300 - (20 * i) * sin(radians(rate1)));
	}
	rate1 = rate1 + .6;
	//second curve: waves horizontally at rate2

	for (var i = 0; i <= 20; i++) {
		stroke('blue');
		line(20 * i * sin(radians(rate2)), 0, 0, 300 - (20 * i) * cos(radians(rate2)));
	}
	rate2 = rate2 + 1;
	//third curve: waves in a clockwise direction
	for (var i = 0; i <= 20; i++) {
			stroke('red');
		line(0, 300 - (20 * i) * cos(radians(rate4)), 20 * i * tan(radians(rate4)), 0);
	}
	rate4 = rate4 + .6;
	//fourth curve: waves of changing strokeweight

	for (var i = 0; i <= 40; i++) {
		if (i%2 == 0) {strokeWeight(5);}
		else {strokeWeight(1);
			
		}
		stroke(200);
		line(400, i * 10 * cos(radians(rate3)), width - (i * 10 * cos(radians(rate3))), 300);
	}
	rate3 = rate3 + 0.8;




}


I wanted to continue to work with constantly changing geometry at an organic rate. The next step might be making a solid form that also morphs in an organic way?

Leave a Reply