Alessandra Fleck – Project 04 String Art

sketch

//Name: Alessandra Fleck 
//Class Section : B
//Email: afleck@andrew.cmu.edu
//Project-04



function setup() {
    createCanvas(480, 300);
    strokeWeight(0.3);
}

function draw() {
    background(0);
    
    //blue back lines (no curve)
    for (var i = 0; i < 400; i += 6) {
    	stroke(155,236,255);
      	line(i, 0, 1.5*i, i); //top right corner start
      	//line(x1,y1,x2,y2);
      	line(2*i, 300, width, i); //bottom left corner start 
    }

    //secondary layer for color in light blue

    for (var i = 0; i < width; i += 3) {
      	stroke(179,223,222);
      	strokeWeight(0.3);
      	line(i*2, 0, width, i); //top right curve with lines
      	line(i*2, 0, height * 2, i); //next curve next to curved line 1
      	line(i*2, 0, height * 1, i); //next curve next to curved line 2
      	line(i*2, 0, height * 0.75, i + 20); //next curve next to curved line 3
      	line(i*2, 0, height * 0.6, i + 20); //next curve next to curved line 3
      	line(i*2, 0, height * 0.5, i + 100); //next curve next to curved line 3
    }

    //third layer for color

    for (var i = 0; i < width; i += 3) {
      	stroke(220,183,225);
      	strokeWeight(0.3);
      	line((i*2)+100, height, 300, i); //top right curve with lines
      	
      	line((i*2)-100, height, height * 1, i); //next curve next to curved line 2
      	
      	line((i*2)-100, 0, height * 0.6, i + 20); //next curve next to curved line 3
      	line(i*2, 0, height * 0.5, i + 100); //next curve next to curved line 3
    }

    

}

For this project, I wanted to try understanding how to take a line and manipulative it into a twisting curve. To invert the curve and create the twist like form, I used the height variable in the x2 coordinate section and multiplied it by a decimal to decrease the dynamic scale of the curve. I hope to be able to use this technique for something more symmetrical next time.

Leave a Reply