void setup() { size(400, 400); smooth(); frameRate(15); } void draw() { background(255); // 100 Hintergrundlinien if (mouseX < 255) { // Zeichne 100 Linien, deren Farbe abh. von der horizontalen Mausposition ist. stroke(mouseX); int i = 0; while (i < 100) { // Zufällige Strichstärke strokeWeight(random(10)); line(random(width), random(height), random(width), random(height)); i = i + 1; } } // 10 Vordergrundlinien int j = 0; while (j < 10) { // Zufällige Farbe stroke(random(255)); // Zufällig Strichstärke strokeWeight(random(10)); line(random(width), random(height), random(width), random(height)); j = j + 1; } }