void setup() { size(400, 400); background(255); drawPointillistTrees(); drawText(); } void drawPointillistTrees() { int numTrees = 3; for (int i = 0; i < numTrees; i++) { float x = width * (0.2 + i * 0.3); float y = height * 0.6; drawPointillistTree(x, y); } } void drawPointillistTree(float x, float y) { int numDots = 12000; float trunkWidth = 25; float trunkHeight = 60; float foliageRadius = 70; // Draw trunk with texture for (int i = 0; i < numDots / 4; i++) { float px = x + random(-trunkWidth / 2, trunkWidth / 2); float py = y + random(0, trunkHeight); stroke(120 + random(-30, 30), 60 + random(-20, 20), 20); // Varying brown shades point(px, py); } // Draw foliage with more layers and varied dot sizes, ensuring no white gaps for (int i = 0; i < numDots; i++) { float angle = random(TWO_PI); float radius = sqrt(random(0, 1)) * foliageRadius; // Ensures even dot distribution float px = x + radius * cos(angle); float py = y - trunkHeight + radius * sin(angle); stroke(getSeuratTreeColor(px, py)); point(px, py); } } color getSeuratTreeColor(float x, float y) { float noiseValue = noise(x * 0.02, y * 0.02); if (noiseValue < 0.2) { return color(20, 100, 20); // Dark green shadows } else if (noiseValue < 0.5) { return color(34, 139, 34); // Rich green } else if (noiseValue < 0.8) { return color(50, 205, 50); // Medium green } else { return color(173, 255, 47); // Bright highlights for sunlight } } void drawText() { fill(0); textSize(32); textAlign(CENTER); text("Seurat Trees", width / 2, height - 20); }