CJ Walsh – Project 04 – String Art

sketch

// CJ Walsh
// Section D
// cjwalsh
// Project-04

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

function draw() {
	background('#8B9AF2');
	var xstep = 10;
	var ystep = 10;
	var xpos = 0;
	var ypos = 0; 
	var x1, y1;

	for (i=1; i < 40; i++) {
		x1 = xpos + xstep;
		y1 = ypos + ystep;

		// center red 
		stroke('#991D3E');
		line(200, y1, x1 + 140, height);
		stroke('#991D3E');
		line(width-200, y1, width - x1 - 140, height);

		// center pink 
		stroke('#FFB3FF');
		line(200, y1, x1 + 70, height);
		stroke('#FFB3FF');
		line(width-200, y1, width - x1 - 70, height);

		// lower large curves
		stroke('#1C4E7C');
		line(0, y1, x1, height);
		stroke('#1C4E7C');
		line(width, y1, width - x1, height);

		// center black 
		stroke('black');
		line(width-200, y1, width - x1, height);
		stroke('black');
		line(200, y1, x1, height);

		// top large curves 		
		stroke("#090170");
		line(0, y1, width-x1, 0);
		line(x1, 0, width, y1);

		// lines controlled by mouse movement 
		stroke("white");
		line(x1, 0, mouseX, mouseY);
		line(x1, height, mouseX, mouseY);

		xpos = x1;
		ypos = y1;
	}
}

For creating my string art I just wanted to experiment with different ways of making and placing my curves. After playing around with the placement and giving a lot of attention to symmetry, I wanted to create a fun color palette. I think it makes it a lot more fun to interact with. At the end of my project, I wanted to include an interactive movement element, so I added some lines that follow the position of the mouse and create fun patterns when overlapping with the curves.

Leave a Reply