fogón

← Ancient and prehistory3D assetfogon/piramide-egipcia

Pirámide egipcia

by fogonCC026736 blocks
Pirámide egipciaDrag to turn it
// «Pirámide egipcia» · gpt-6-sol (medium)
// A smooth Egyptian pyramid with a square base filling most of the grid, built of sandstone blocks in warm yellow and tan shades with visible stepped layers, a shiny gold capstone at the top, and a small dark doorway on the front face (-y). A little sand around the base.

// A little sand around the broad square base.
for (let x = 0; x < 48; x++) {
  for (let y = 0; y < 48; y++) {
    if (x >= 3 && x <= 44 && y >= 3 && y <= 44) continue;

    if (rand() < 0.72) {
      const sand = ["#e8c779", "#f0d28b", "#dcb76c"];
      set(x, y, 0, sand[Math.floor(rand() * sand.length)]);
      if (rand() < 0.08) set(x, y, 1, "#e8c779");
    }
  }
}

// Two-block-high courses give the pyramid a smooth, readable staircase.
for (let z = 0; z <= 41; z++) {
  const inset = Math.floor(z / 2);
  const lo = 3 + inset;
  const hi = 44 - inset;
  const gold = z >= 34;

  for (let x = lo; x <= hi; x++) {
    for (let y = lo; y <= hi; y++) {
      const front = y === lo;
      const left = x === lo;
      const terrace = z % 2 === 1 &&
        (x === lo || x === hi || y === lo || y === hi);

      let color;
      if (gold) {
        color = terrace ? "#ffe477" : front ? "#f8ce45" : "#dfaa2c";
        if (z % 2 === 0 && (front || left)) color = "#c58b23";
        if (rand() < 0.055) color = "#fff0a0";
      } else {
        color = terrace ? "#f2d38c" : front ? "#e9c474" : "#dbb368";
        if (left) color = "#cba15b";
        if (z % 2 === 0 && (front || left)) color = "#d5aa60";

        // Subtle joints between the large sandstone blocks.
        if (front && (x + inset * 3) % 8 === 0)
          color = "#cba35f";
        if (rand() < 0.035)
          color = rand() < 0.5 ? "#f3d48c" : "#cda45f";
      }
      set(x, y, z, color);
    }
  }
}

// Carve a short, shadowy doorway into the front (-y) face.
for (let z = 0; z <= 6; z++) {
  const face = 3 + Math.floor(z / 2);
  const x0 = z === 6 ? 23 : 22;
  const x1 = z === 6 ? 24 : 25;

  for (let x = x0; x <= x1; x++) {
    for (let y = face; y <= 10; y++) set(x, y, z, null);
    set(x, 11, z, "#3a2d29");
  }
}

// Chunky sandstone jambs, a warm lintel, and small turquoise inlays.
for (let z = 0; z <= 6; z++) {
  const face = 3 + Math.floor(z / 2);
  if (z <= 5) {
    set(21, face, z, z % 2 ? "#f5d58d" : "#d9a95b");
    set(26, face, z, z % 2 ? "#f5d58d" : "#d9a95b");
  }
}
const lintelY = 3 + Math.floor(7 / 2);
for (let x = 21; x <= 26; x++) set(x, lintelY, 7, "#f5d58d");
set(21, 6, 6, "#39b8ad");
set(26, 6, 6, "#39b8ad");