fogón

← Medieval3D assetfogon/antorcha

Antorcha

by fogonCC012381 blocks
AntorchaDrag to turn it
// «Antorcha» · gpt-6-sol (medium)
// A medieval wall torch: a short section of grey stone wall, a black iron bracket sticking out of it holding a wooden torch stick tilted slightly forward, with a wrapped cloth head and a big flame on top (yellow core, orange and red edges, tall and pointed). The flame is the moving part.

// Stone wall: deep mortar bed with individually laid, uneven courses.
box(7, 27, 0, 40, 33, 33, "#55514e");
box(7, 26, 0, 40, 27, 32, "#77726b");

const stones = ["#938d82", "#a49c8f", "#817d76", "#aba395", "#8d8980"];
for (let row = 0; row < 8; row++) {
  const z = row * 4;
  let x = row % 2 ? 5 : 8;
  while (x < 41) {
    const length = 5 + Math.floor(rand() * 5);
    const end = Math.min(40, x + length - 1);
    const left = Math.max(8, x);
    if (left <= end) {
      const color = stones[Math.floor(rand() * stones.length)];
      box(left, 25, z + 1, end, 27, z + 3, color);
      box(left, 25, z + 3, end, 25, z + 3, "#b2aa9b");
      if (rand() < 0.65)
        box(left, 24, z + 1, Math.min(end, left + 1), 24, z + 2, "#77746d");
      if (rand() < 0.22)
        set(left + Math.floor(rand() * (end - left + 1)), 24, z + 2, "#626e54");
    }
    x += length + 1;
  }
}

// Heavy projecting stone coping.
box(6, 25, 33, 41, 34, 35, "#827d74");
box(6, 24, 34, 41, 25, 35, "#a9a092");
box(7, 24, 35, 40, 33, 35, "#beb3a1");
for (let x = 12; x <= 37; x += 8)
  box(x, 24, 34, x, 24, 35, "#726e69");

// Sparse moss in the joints.
for (let i = 0; i < 22; i++) {
  const x = 8 + Math.floor(rand() * 32);
  const z = Math.floor(rand() * 8) * 4;
  set(x, 24, z, rand() < 0.5 ? "#687452" : "#7a805a");
}

// Iron mounting plate and its four raised rivets.
box(20, 23, 12, 28, 25, 23, "#252626");
box(21, 22, 13, 27, 22, 22, "#383837");
box(22, 21, 14, 26, 21, 21, "#232526");
for (const x of [21, 27])
  for (const z of [14, 21]) {
    set(x, 21, z, "#85817a");
    set(x, 20, z, "#494b49");
  }

// A stout cantilever and diagonal wrought-iron brace.
box(22, 16, 17, 26, 23, 19, "#242627");
box(22, 16, 19, 26, 23, 19, "#52504b");
line(24, 23, 13, 24, 17, 18, 1, "#202323");
line(23, 23, 14, 23, 17, 18, 0, "#57544e");

// Open square cradle around the torch.
box(20, 15, 19, 21, 19, 21, "#202223");
box(27, 15, 19, 28, 19, 21, "#202223");
box(20, 15, 19, 28, 16, 19, "#252727");
box(20, 19, 19, 28, 19, 19, "#292a29");
box(21, 15, 21, 27, 15, 21, "#55514a");
for (const x of [21, 27]) set(x, 14, 20, "#8b8475");

// Wooden shaft leans forward, away from the wall.
line(24, 19, 14, 24, 14, 28, 2, "#493022");
line(23, 18, 15, 23, 14, 27, 0, "#815639");
line(25, 18, 15, 25, 15, 26, 0, "#30241e");
box(23, 18, 13, 25, 19, 14, "#3d2b21");

// Cloth-wrapped head, with dark binding strips.
for (let z = 25; z <= 30; z++) {
  const y = Math.round(19 - (z - 14) * 5 / 14);
  box(21, y - 1, z, 27, y + 1, z, z % 2 ? "#b09b76" : "#d2bd91");
  if (z === 26 || z === 29)
    box(21, y - 2, z, 27, y - 2, z, "#42352a");
}
box(22, 12, 30, 26, 15, 30, "#63503a");

// Only the fire moves; the bracket and torch remain fixed.
part("flame", [24, 13, 30]);

const widths = [3, 4, 5, 5, 5, 5, 4, 4, 3, 3, 3, 2, 2, 1, 1, 0];
for (let z = 30; z <= 45; z++) {
  const r = widths[z - 30];
  const center = z >= 39 ? 23 : 24;
  const back = z >= 40 ? 14 : 15;
  box(center - r, 12, z, center + r, back, z,
      z % 4 === 0 ? "#c84727" : "#df5727");
  if (r >= 1)
    box(center - r + 1, 10, z, center + r - 1, 12, z,
        z % 3 === 0 ? "#f49324" : "#ee7620");
  if (r >= 2 && z <= 40)
    box(center - r + 2, 9, z, center + r - 2, 10, z,
        z % 3 === 1 ? "#fff083" : "#ffcc3d");
}

// Separate curling tongues give the flame a jagged storybook outline.
line(20, 13, 33, 18, 13, 38, 1, "#da4c27");
line(20, 11, 34, 19, 11, 37, 0, "#f48a24");
line(28, 13, 32, 30, 13, 37, 1, "#ce4529");
line(28, 11, 33, 29, 11, 36, 0, "#f28a24");
line(25, 12, 39, 26, 12, 42, 0, "#f28c22");
box(23, 9, 32, 25, 9, 36, "#ffe572");
set(24, 9, 37, "#fff19a");

animate("flame", {
  type: "colors",
  palette: ["#ffe878", "#ffbf37", "#f07824", "#d54528"],
  pattern: "flicker",
  glow: 0.8
});
animate("flame", { type: "bob", axis: "z", speed: 3, amplitude: 0.5 });