fogón

← Nature3D assetfogon/arbusto-redondo

Arbusto redondo

by fogonCC016493 blocks
Arbusto redondoDrag to turn it
// «Arbusto redondo» · gpt-6-sol (medium)
// A round bush: a lumpy dome of bright green leaves made of 3 overlapping spheres in 3 shades, lighter on top, sitting directly on the ground. Low and wide.

// Three overlapping, ground-hugging lobes make one wide, leafy dome.
function lobe(cx, cy, cz, r, dark, mid, light) {
  for (let x = Math.floor(cx - r); x <= Math.ceil(cx + r); x++)
    for (let y = Math.floor(cy - r); y <= Math.ceil(cy + r); y++)
      for (let z = 0; z <= Math.ceil(cz + r); z++) {
        const d = (x - cx) ** 2 + (y - cy) ** 2 + (z - cz) ** 2;
        if (d > r * r) continue;

        let color = z >= 14 ? light : z >= 7 ? mid : dark;
        const fleck = rand();
        if (z >= 9 && fleck < 0.055) color = "#b0f36a";
        else if (fleck < 0.09) color = z >= 12 ? mid : dark;
        set(x, y, z, color);
      }
}

// The side lobes peek out around the brighter central crown.
lobe(16, 23, 5, 13, "#368f31", "#58ba38", "#86d94c");
lobe(32, 25, 5, 13, "#3b9c32", "#65c942", "#99e45a");
lobe(24, 24, 6, 16, "#40a433", "#70d344", "#a0e95a");

// Small paired leaf highlights sit on exposed upper surfaces.
forEach((x, y, z) => {
  if (z < 11 || get(x, y, z + 1) !== undefined || rand() >= 0.035) return;
  set(x, y, z, "#b5f36d");
  if (get(x + 1, y, z) !== undefined &&
      get(x + 1, y, z + 1) === undefined &&
      rand() < 0.55) {
    set(x + 1, y, z, "#aaf064");
  }
});