Project 4 – String Art

sketch.sll4Download
// Sarah Luongo
// Section A

function setup() {
    createCanvas(400, 300);
    background(232, 240, 255);
}

function draw() {
    for (var i = 0; i <= 150; i++) {
	stroke(120, 150, 180);
	
	// Blue background horizontal lines
	line(0, height/2- i, width, height/2 - i);
        
	// Blue intersecting lines at the bottom
	line(0, height/2 + (i/2), 3 * i, height); // left
	line(width, height/2 + (i/2), width - (3 * i), height); // right
        stroke(132, 205, 190);
	
	// Green background horizontal lines
	line(0, height/1.5 + i, width, height/1.5 + i);
	
	i += 1;
    }

    for (var i = 0; i <= 75; i++) { 
	stroke(210, 200, 220);
	// Pink intersecting lines at the bottom
	line(0, height/2 + (i/2), 3 * i, height); // left
	line(width, height/2 + (i/2), width - (3 * i), height); // right
	
	// Pink intersecting lines at the top
        line(width-(6*i), 0, 0, height/2 + (2*i)); // left
        line(6*i, 0, width, height/2 + (2*i)); // right
    }
    // Pebbles
    fill(230, 230, 250);
    ellipse(mouseX, mouseY, 100, 50);
}

I want to create something that resembled a bag of pebbles. So, I made a see-through, colorful, bag using string art, and an ellipse that moves around behind the string art to look like a bunch of pebbles. I was also attempting to make the bag look open.

Leave a Reply