Project 04: String Art

sketch

/* Samantha Ho
Section E 
sch1@andrew.cmu.edu
Project 04*/

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

	}

function draw() {
    background(240,240,240);
	//back dark wave
       	strokeWeight(2);
	stroke(0,0,255);
	x1 = 30;
	x2 = 40;
	y1 = 400;
	y2 = 50;
	for (var i = 0; i < 20; i += 1) {//move the waves
		x1 += min(mouseX, 300);
		y2 += 15;
		line(x1, y1, x2, y2);
	}

    //light back wave
	strokeWeight(2);
	stroke('cyan');
	x1 = 0;
	x2 = 60;
	y1 = 500;
	y2 = 50;
	for (var i = 0; i < 20; i += 1) {//move the waves
		x1 += min(mouseX, 300);
		y2 += 15;
		line(x1, y1, x2, y2);
	}
    
     //light thin wave
	strokeWeight(2);
	stroke('cyan');
	x1 = 0;
	x2 = 60;
	y1 = 500;
	y2 = 50;
	for (var i = 0; i < 20; i += 1) {//move the waves
		x1 += min(mouseX, 300);
		y2 += 15;
		line(x1, y1, x2, y2);
	}
    
     //green horizon wave
	strokeWeight(2);
	stroke(0,230,230);
	x1 = 0;
	x2 = 400;
	y1 = 150;
	y2 = 100;
	for (var i = 0; i < 20; i += 1) {//move the waves
		x1 += min(mouseX, 300);
		y2 += 15;
		line(x1, y1, x2, y2);
	}
    
     //red horizon wave
	strokeWeight(.5);
	stroke(0,230,230);
	x1 = 0;
	x2 = 400;
	y1 = 500;
	y2 = 100;
	for (var i = 0; i < 20; i += 1) {//move the waves
		x1 += min(mouseX, 300);
		y2 += 15;
		line(x1, y1, x2, y2);
	}
    
 
	//sunrays
	strokeWeight(2);
	stroke('yellow');
	x3 = 0;
	x4 = -300;
	y3 = 0;
	y4 = 300;
	for (var i = 0; i < 20; i += 1) {
		x4 += min(mouseX, 600);
		y3 -= 15;
		line(x3, y3, x4, y4);
	}
    //dark sunrays
    strokeWeight(2);
	stroke(200,200,0);
	x3 = 0;
	x4 = -200;
	y3 = 0;
	y4 = 300;
	for (var i = 0; i < 20; i += 1) {
		x4 += min(mouseX, 600);
		y3 -= 15;
		line(x3, y3, x4, y4);
	}
}

I made this because I was inspired by the quality of the “strings”. I wanted to make an entire moving picture with a horizon and everything. I found it difficult though to completely control the landscape. It may be due to the quality of the “material”, but conceptually it was challenging to wrap my head around the forms.

Leave a Reply