For this assignment, I was interested in the way that changing a couple of the location variables for the string would alter the way in which the strings move within the loop. I couldn’t find a reference image of the memory I was basing the drawing off of, but I was inspired by those default backgrounds of older computers when they are not in use, but still on.
peachstring1
var x = 0;//x location of lines moves
var y = 0//y position of lines moves
var c = 0//change background color from black to white
function setup() {
createCanvas(400, 300);
}
function draw() {
background(c);
c += 1 //background changes over time
for (i = 0; i <= 50; i += 2.5) //use loop to draw lines
{var l = i *10
stroke(194, 255, 254)//blue lines
strokeWeight(2);
line(-width, height, x, l);
line(width, height, x, l);
stroke(124, 232, 124);//neon green lines
strokeWeight(1);
line(x, height/2, 5+l, l);
line(-width/50, y, 5+l, l);
stroke(0) //black lines
line(0,y,20*l,height-l)
x += 0.1 //lines move across screen
if(x>width){
y += 0.1
x = width
}
stroke(255) //white lines
strokeWeight(0.5)
line(4*width/l+x, height, 5+l, 0)
}
}