fogón

← City3D assetfogon/maceton

Macetón

by fogonCC027501 blocks
MacetónDrag to turn it
// «Macetón» · gpt-6-sol (medium)
// A big square concrete planter: a chunky grey concrete box with beveled edges filled with dark soil and a bushy green shrub with a few small red flowers, as found on city sidewalks.

const concrete = ["#aeb0aa", "#b8bab3", "#a3a6a0"];
const greens = ["#397a43", "#438b4c", "#529c55", "#326e3c"];

function planterLayer(z, lo, hi, corner) {
  for (let x = lo; x <= hi; x++) {
    for (let y = lo; y <= hi; y++) {
      const cut = Math.min(x - lo, hi - x) + Math.min(y - lo, hi - y);
      if (cut < corner) continue;

      let color = z === 20 ? "#c9cbc2" :
                  z < 3 ? "#949a94" :
                  y === lo ? "#b4b7b0" :
                  x === hi ? "#979d98" : concrete[0];
      if (rand() < 0.10) color = concrete[1 + Math.floor(rand() * 2)];
      set(x, y, z, color);
    }
  }
}

// Solid, weighty concrete base with stepped bevels.
for (let z = 0; z <= 20; z++) {
  if (z <= 1) planterLayer(z, 9, 38, 2);
  else if (z === 2 || z === 16 || z === 17) planterLayer(z, 8, 39, 2);
  else if (z === 20) planterLayer(z, 8, 39, 2);
  else planterLayer(z, 7, 40, 2);
}

// Open square well and a thick, pale rim.
for (let z = 17; z <= 20; z++)
  for (let x = 12; x <= 35; x++)
    for (let y = 12; y <= 35; y++) set(x, y, z, null);

for (let x = 12; x <= 35; x++)
  for (let y = 12; y <= 35; y++) {
    set(x, y, 17, rand() < 0.24 ? "#493b32" : "#57483a");
    if (rand() < 0.55) set(x, y, 18, "#42382f");
  }

// Crisp concrete bands and a small painted sidewalk-planter flourish.
box(10, 6, 15, 37, 6, 15, "#898e89");
box(10, 6, 3, 37, 6, 3, "#c3c5bc");
box(17, 6, 7, 30, 6, 11, "#929a92");
box(18, 5, 8, 29, 5, 10, "#53685b");
box(20, 4, 9, 27, 4, 9, "#e4b75b");
set(18, 4, 9, "#d46c54");
set(29, 4, 9, "#d46c54");

// Several stems emerge from the soil beneath the foliage.
line(24, 24, 18, 24, 24, 29, 1, "#66513b");
line(24, 24, 22, 18, 19, 29, 0, "#66513b");
line(24, 24, 23, 30, 19, 31, 0, "#66513b");
line(24, 24, 22, 30, 29, 30, 0, "#66513b");

// Broad, irregular shrub crown.
ellipsoid(24, 24, 29, 11, 11, 8, greens[0]);
const lobes = [
  [18, 18, 29, 5], [25, 17, 32, 6], [31, 20, 30, 6],
  [33, 27, 29, 5], [27, 32, 30, 6], [19, 31, 30, 6],
  [16, 25, 31, 5], [22, 23, 35, 6], [29, 27, 35, 5]
];
for (const [x, y, z, r] of lobes)
  ellipsoid(x, y, z, r, r, r - 1, greens[1]);

// Mottled leaf colors and small, chunky leaf tufts.
forEach((x, y, z, color) => {
  if (greens.includes(color)) {
    const n = rand();
    if (n < 0.23) set(x, y, z, greens[2]);
    else if (n < 0.31) set(x, y, z, greens[3]);
  }
});
for (let i = 0; i < 65; i++) {
  const x = 15 + Math.floor(rand() * 19);
  const y = 15 + Math.floor(rand() * 19);
  const z = 27 + Math.floor(rand() * 12);
  if (greens.includes(get(x, y, z))) {
    sphere(x, y, z, 1, rand() < 0.6 ? greens[2] : greens[1]);
  }
}

// Flowers sit directly on the visible front and upper leaf surfaces.
function frontFlower(x, z) {
  for (const [dx, dz, color] of [
    [-1, 0, "#e64e49"], [1, 0, "#d84142"],
    [0, -1, "#cf393d"], [0, 1, "#f05b4e"],
    [0, 0, "#f4c768"]
  ]) {
    for (let y = 7; y <= 25; y++) {
      if (greens.includes(get(x + dx, y, z + dz))) {
        set(x + dx, y - 1, z + dz, color);
        break;
      }
    }
  }
}
function topFlower(x, y) {
  for (const [dx, dy, color] of [
    [-1, 0, "#e64e49"], [1, 0, "#d84142"],
    [0, -1, "#f05b4e"], [0, 1, "#cf393d"],
    [0, 0, "#f4c768"]
  ]) {
    for (let z = 42; z >= 25; z--) {
      if (greens.includes(get(x + dx, y + dy, z))) {
        set(x + dx, y + dy, z + 1, color);
        break;
      }
    }
  }
}
frontFlower(18, 31);
frontFlower(27, 34);
frontFlower(32, 29);
topFlower(19, 22);
topFlower(27, 19);
topFlower(29, 29);