gyueunp – Project-04: String Art

String Art

//GyuEun Park
//15-104 E
//gyueunp@andrew.cmu.edu
//Project-04

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

function draw() {
	var x1 = -5;
	var y1 = -25;
	var x2;
	var y2;

	for (var x2 = 0; x2 < width; x2 += 10) {
		for (var y2 = 0; y2 < height; y2 += 10)
	stroke(255);
	strokeWeight(0.2);
//lines from top left 
	line(x1-15,y1,x2,y2,40);
	line(x1-25,y1,x2,y2,40);
	line(x1-35,y1,x2,y2,40);
//lines from top right 
	line(width+35,y1,x2,y2,40);
	line(width+25,y1,x2,y2,40);
	line(width+15,y1,x2,y2,40);
}

//growing center lines
	for (var i=0; i <= 2000; i += 100){
		var xPos = random(0,width); 
		var yPos = random(0,height);
		var x2Pos = random(width/2,width/2);
		var y2Pos = random(height/2,height/2);
		var linethickness = random(0,1);
	stroke(255,20);
    strokeWeight(linethickness);
    line(xPos,yPos,x2Pos,y2Pos);
}
}

One of the most attractive aspects of string art is the pattern that is created by the merging lines. Therefore, I focused on accentuating the patterns that are created by the spaces between the lines. In order to provide a contrast, I decided to limit the usage of colors for this project.

Leave a Reply