fogón

← City3D assetfogon/fuente-de-plaza

Fuente de plaza

by fogonCC013286 blocks
Fuente de plazaDrag to turn it
// «Fuente de plaza» · gpt-6-sol (medium)
// A round stone plaza fountain: a wide low circular basin of light grey stone with a thick rim, filled with blue water, a central pedestal holding a smaller upper bowl, and a little jet of water rising from the top and spilling down in streams into the big basin.

const C = { x: 24, y: 24 };
const stone = ["#d9dad5", "#e5e5de", "#c4c8c5", "#b3bab8"];
const brick = ["#bc7663", "#cb826a", "#aa6658"];

function disc(z, radius, paint) {
  for (let x = 2; x <= 46; x++) {
    for (let y = 2; y <= 46; y++) {
      const d = Math.hypot(x - C.x, y - C.y);
      if (d <= radius) {
        const color = paint(d, x, y);
        if (color) set(x, y, z, color);
      }
    }
  }
}

function masonry(d, x, y, z) {
  const fleck = rand();
  if (z === 0) return "#aeb6b5";
  if (z === 1) return fleck < 0.12 ? "#c5cac7" : "#b9c1bd";
  if (d > 19.1 && d < 20.3) return brick[Math.floor(rand() * brick.length)];
  if (d > 17.5 && d < 18.1) return "#e6bc75";
  return fleck < 0.12 ? "#cbd0cb" : stone[fleck < 0.31 ? 1 : 0];
}

// Broad paved circle with a warm brick-and-gold accent around the fountain.
for (let z = 0; z <= 2; z++)
  disc(z, z === 2 ? 20.5 : 21, (d, x, y) => masonry(d, x, y, z));

// The solid floor of the basin.
for (let z = 3; z <= 5; z++)
  disc(z, 18.9, () => z === 3 ? "#bbc3c1" : "#d4d8d4");

// Deep, thick circular wall and a pale overhanging lip.
for (let z = 6; z <= 9; z++)
  disc(z, 19, d => {
    if (d < 15.3) return null;
    return rand() < 0.13 ? "#d9dcd7" : z < 7 ? "#b8c0bd" : "#cbd0cb";
  });
disc(10, 19.6, d => d < 14.9 ? null : (rand() < 0.13 ? "#ffffff" : "#e6e8e1"));
disc(11, 19.2, d => d < 15.8 ? null : "#d8dcd6");

// A narrow colored tile band on the outer face, visible from above.
disc(8, 19.05, d => d >= 18.65 ? "#357b71" : null);
for (let z = 6; z <= 9; z++)
  disc(z, 18.85, d => d >= 18.5 && (z === 6 || z === 9) ? "#aeb8b5" : null);

// Central pedestal, with stepped moldings and a chunky upper bowl.
for (let z = 8; z <= 19; z++) {
  let r = 3.7;
  if (z <= 9) r = 5.5;
  else if (z <= 11 || z >= 18) r = 4.6;
  disc(z, r, () => rand() < 0.12 ? "#e6e7df" : z < 12 ? "#c5ccc8" : "#d6dad4");
}
const bowlRadii = {
  18: 4.6, 19: 6.0, 20: 7.4, 21: 8.6,
  22: 9.2, 23: 9.4
};
for (let z = 18; z <= 23; z++)
  disc(z, bowlRadii[z], () => rand() < 0.13 ? "#e9eae3" : z < 21 ? "#bec7c4" : "#d5d9d3");
disc(24, 9.5, d => d < 7.45 ? null : "#ecede6");
disc(25, 9.15, d => d < 8.15 ? null : "#d9dfd9");

// Little dark-green and golden ornaments at the four compass points.
for (const [dx, dy] of [[1, 0], [-1, 0], [0, 1], [0, -1]]) {
  set(24 + 18 * dx, 24 + 18 * dy, 12, "#276c61");
  set(24 + 18 * dx, 24 + 18 * dy, 13, "#efbb65");
}

// All water belongs to one animated part.
part("water", [24, 24, 0]);

for (let x = 9; x <= 39; x++) {
  for (let y = 9; y <= 39; y++) {
    const d = Math.hypot(x - 24, y - 24);
    if (d <= 14.75 && d >= 5.5) {
      set(x, y, 8, "#2f86e0");
      set(x, y, 9, rand() < 0.19 ? "#8fd3ff" : "#4fb3ff");
      if (rand() < 0.065) set(x, y, 10, "#d6f1ff");
    }
  }
}

for (let x = 17; x <= 31; x++)
  for (let y = 17; y <= 31; y++)
    if (Math.hypot(x - 24, y - 24) <= 7.25)
      set(x, y, 24, rand() < 0.24 ? "#8fd3ff" : "#4fb3ff");

// Arcing spillways emerge from the small bowl and land in the lower basin.
for (let i = 0; i < 12; i++) {
  const a = i * Math.PI / 6;
  for (let z = 10; z <= 25; z++) {
    const t = (25 - z) / 15;
    const r = 8.25 + 5.45 * t * t;
    const x = Math.round(24 + Math.cos(a) * r);
    const y = Math.round(24 + Math.sin(a) * r);
    set(x, y, z, z % 4 === 0 ? "#d6f1ff" : "#8fd3ff");
    if (z < 13) set(x, y, z + 1, "#4fb3ff");
  }
}

// A short, bright jet and its bubbly crest.
for (let z = 25; z <= 34; z++) {
  set(24, 24, z, "#8fd3ff");
  if (z >= 29 && z <= 32) set(25, 24, z, "#4fb3ff");
}
sphere(24, 24, 34, 1.5, "#d6f1ff");
set(23, 24, 36, "#8fd3ff");
set(26, 24, 34, "#d6f1ff");
set(24, 26, 33, "#8fd3ff");

animate("water", {
  type: "colors",
  palette: ["#4fb3ff", "#8fd3ff", "#2f86e0", "#d6f1ff"],
  pattern: "wave",
  glow: 0.2
});