Floating spheres
Code: function setup() { createCanvas(800, 800) background(255) } function draw() { for(var i = 0; i < 500; i++) { stroke(random(50, 200), 0, 0, random(255)) strokeWeight(random(10)) line(width/4, height/4, random(width), random(height)) } noLoop() }
The code: function setup() { createCanvas(800, 800) background(0) for(var i = 0; i < width; i++) { strokeWeight(random(2)) stroke(255, random(255)) line(width/2, height/2, random(width), random(height)) } } function draw() { }
The code: function setup() { createCanvas(800, 800) background(0) for(var i = 0; i < width; i++) { strokeWeight(0.5) stroke(255) line(i*2, random(0, height), i/2, random(height, 0)) } } function draw() { }
Code: function setup() { createCanvas(800, 800) background(245) for(var i = 1; i < width/25; i++) { strokeWeight(10) stroke(255 - i*10, 0, 0 + i*10) line(25*i, 100, 25*i, height-100) } } function draw() { }
Code: function setup() { createCanvas(800, 800) background(245) for(var i = 1; i < width/25; i++) { strokeWeight(10) stroke(random(255), random(255), random(255)) line(25*i, 100, 25*i, height-100) } } function draw() { }