
Another Processing experiment, this time with random lines that are sorted by stroke color to simulate a sphere.
Source:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
void setup() { size(800, 800); noStroke(); smooth(); background(0); translate(width/2,height/2); for (int i=0; i<10000; i++) { rotate(radians(random(0,360))); int randomLength = int(random(10,height/2)); stroke(map(randomLength, 0,height/2, 255,0)); line(0,0, 0,randomLength); } } |