fogón

← Antiguo y prehistoriaObjeto 3Dfogon/sarcofago

Sarcófago

de fogonCC017542 bloques
SarcófagoArrastrá para girarlo
// «Sarcófago» · gpt-6-sol (medium)
// An upright golden Egyptian sarcophagus standing on z=0, shaped like a wrapped figure: a painted face with dark eyes and a blue-and-gold striped headdress at the top, crossed arms on the chest, and rows of colorful hieroglyph bands (turquoise, red, dark blue) down the gold body.

const gold = "#e9b944";
const lightGold = "#ffd66a";
const shadeGold = "#b87923";
const lapis = "#173b83";
const blue = "#2867aa";
const turquoise = "#39c5ba";
const red = "#b74338";

function halfWidth(z) {
  if (z <= 2) return 8;
  if (z <= 7) return 9;
  if (z <= 13) return 10;
  if (z <= 23) return 12;
  if (z <= 31) return 14;
  if (z <= 39) return 15;
  if (z <= 41) return 13;
  if (z === 42) return 11;
  return 9;
}

function gilded(x, y, z, edge) {
  if (edge) return shadeGold;
  if (rand() < 0.07) return "#d9a43b";
  if (rand() < 0.08 || z > 38) return lightGold;
  return gold;
}

// The deep, stationary half of the coffin.
for (let z = 0; z <= 43; z++) {
  const w = halfWidth(z);
  for (let x = 24 - w; x <= 24 + w; x++) {
    for (let y = 23; y <= 30; y++) {
      const edge = Math.abs(x - 24) >= w - 1 || y === 30;
      set(x, y, z, gilded(x, y, z, edge));
    }
  }
}

// Dark inset visible when the lid swings open, surrounded by a gold rim.
for (let z = 4; z <= 39; z++) {
  const w = halfWidth(z);
  for (let x = 24 - w; x <= 24 + w; x++) {
    const border = Math.abs(x - 24) >= w - 2 || z === 4 || z === 39;
    set(x, 22, z, border ? lightGold : "#624828");
  }
}
for (let z = 9; z <= 34; z += 5) {
  box(19, 21, z, 29, 21, z, "#95703a");
}
cylinder(10, 22, 7, 1, 32, shadeGold);
for (const z of [9, 21, 34]) {
  box(9, 20, z, 12, 23, z + 2, lightGold);
}

// Everything below is the hinged front lid.
part("lid", [10, 22, 21]);

for (let z = 0; z <= 43; z++) {
  const w = halfWidth(z);
  for (let x = 24 - w; x <= 24 + w; x++) {
    for (let y = 16; y <= 21; y++) {
      const edge = Math.abs(x - 24) >= w - 1;
      set(x, y, z, gilded(x, y, z, edge));
    }
  }
  // Raised, continuous rim frames the painted front.
  set(24 - w, 15, z, lightGold);
  set(24 + w, 15, z, lightGold);
  if (w > 9) {
    set(25 - w, 15, z, shadeGold);
    set(23 + w, 15, z, shadeGold);
  }
}

// Broad blue-and-gold nemes headdress and its hanging side flaps.
for (let z = 39; z <= 43; z++) {
  const w = halfWidth(z) - 1;
  box(24 - w, 15, z, 24 + w, 15, z,
      z % 2 ? lightGold : lapis);
}
for (let z = 26; z <= 39; z++) {
  const outer = Math.min(halfWidth(z) - 2, 13);
  for (let x = 24 - outer; x <= 17; x++) {
    set(x, 14, z, (z + Math.floor(x / 3)) % 4 < 2 ? lapis : lightGold);
  }
  for (let x = 31; x <= 24 + outer; x++) {
    set(x, 14, z, (z - Math.floor(x / 3)) % 4 < 2 ? lapis : lightGold);
  }
}
box(12, 14, 26, 17, 14, 27, shadeGold);
box(31, 14, 26, 36, 14, 27, shadeGold);

// Rounded painted face, projecting in front of the headdress.
for (let z = 30; z <= 39; z++) {
  const dz = (z - 34.5) / 5.2;
  const width = Math.floor(5.7 * Math.sqrt(Math.max(0, 1 - dz * dz)));
  for (let x = 24 - width; x <= 24 + width; x++) {
    set(x, 13, z, "#ac7436");
    set(x, 12, z, x === 24 - width || x === 24 + width
      ? "#ad742f" : z >= 36 ? "#f6c77b" : "#dfaa62");
  }
}
box(19, 11, 37, 22, 11, 37, lapis);
box(26, 11, 37, 29, 11, 37, lapis);
box(20, 11, 35, 21, 11, 36, "#222432");
box(27, 11, 35, 28, 11, 36, "#222432");
set(20, 10, 36, "#ffffff");
set(27, 10, 36, "#ffffff");
box(24, 11, 33, 24, 11, 35, "#b47a39");
set(24, 10, 33, "#f5c17b");
box(22, 11, 31, 26, 11, 31, "#934e38");
box(23, 10, 31, 25, 10, 31, "#c26b4b");

// Cobra crest centered above the forehead.
box(23, 13, 39, 25, 13, 41, turquoise);
set(24, 12, 40, red);
set(24, 12, 42, lightGold);

// Colorful horizontal hieroglyph registers down the torso.
for (const z of [8, 13, 18, 23]) {
  const w = halfWidth(z) - 3;
  box(24 - w, 15, z, 24 + w, 15, z, lapis);
  box(24 - w, 15, z + 1, 24 + w, 15, z + 1, turquoise);
  set(24 - w, 14, z, lightGold);
  set(24 + w, 14, z, lightGold);
}
for (let row = 0; row < 3; row++) {
  const base = 10 + row * 5;
  for (let i = 0; i < 5; i++) {
    const x = 16 + i * 4;
    const ink = [turquoise, red, lapis][(i + row) % 3];
    box(x, 14, base, x, 14, base + 2, ink);
    set(x + 1, 14, base + 2, ink);
    if (i % 2) set(x + 2, 14, base + 1, ink);
    else set(x - 1, 14, base, ink);
  }
}
box(22, 14, 5, 26, 14, 7, red);
set(24, 13, 6, lightGold);
box(17, 14, 1, 31, 14, 2, lapis);
box(19, 13, 2, 29, 13, 2, turquoise);

// Gold arms crossed prominently over the chest.
line(17, 12, 29, 30, 12, 24, 1, "#b77b2b");
line(17, 11, 29, 30, 11, 24, 1, lightGold);
line(31, 10, 29, 18, 10, 24, 1, shadeGold);
line(31, 9, 29, 18, 9, 24, 1, gold);
box(27, 8, 24, 30, 8, 25, turquoise);
box(18, 9, 24, 21, 9, 25, turquoise);
set(24, 8, 26, red);

animate("lid", { type: "swing", axis: "z", speed: 1, amplitude: 0.3 });