Project-04-String-Art

``````// Xander Fann xmf Section B
var bx = 0
var len = 10
var up = 0
function setup() {
createCanvas(400, 300);
background(0);
}

function draw() {
push()
translate(0,up)
background(255)
stroke(200,200,255)
for (var y = -5000; y <= 5000; y += 5){
line(bx,y,bx+width,y);
}
//balloon
noFill()
stroke(255,0,0) // red
for(var arcH = 0; arcH <= 130; arcH += 3){
arc(200,180,arcH,130,-PI/2,PI/2)
}

noFill()
stroke(0,255,0) // green
for(var arcH = 0; arcH <= 130; arcH += 3){
arc(200,180,arcH,130,PI/2,-PI/2)
}

noFill()
stroke(0,0,255,70) // blue
for(var arcH =- 70; arcH <= 0; arcH += 1){
arc(200,180,arcH,130,PI/2,-PI/2);arc(200,180,arcH,130,-PI/2,PI/2)
}
stroke(214, 174, 56)
for(var y = 260; y<= 290; y += 2){
line(180,y,220,y)
}
stroke(214, 174, 56)
for(var x = 180; x <= 220; x += 2){
line(x,260,x,290)
}
//connection strings
stroke(0)
for(var x = 160; x <= 240; x += 20){
line(x,230,200,260)
}
//movement
up -= 3
if (mouseIsPressed) {up += 10}
pop()

//moutains
noFill()
stroke(100,255,0)
for(r = 200; r<= 300; r += 3)
ellipse(200,400,800,r)
}
``````

I started by thinking about how the density of strings can affect each other and how overlapping strings is similar to the idea of hatching make an object look 3 dimensional like a sphere. I thought of a hot air balloon where multiple colors can also be used to show the roundness of the balloon. When the screen is pressed the balloon also moves downwards.