fogón

← Basics3D assetfogon/farol-v6

Farol

by fogonCC017175 blocks
FarolDrag to turn it
// «Farol» · gpt-6-sol (medium)
// Lantern («Farol»). One of several variations of this object: follow the reference picture closely.

// Farol: an iron lantern with a stepped roof and warm candlelight.
const iron = "#27313a";
const shadow = "#1b252d";
const steel = "#46535b";
const edge = "#69747a";
const gold = "#b47a2b";
const brightGold = "#dfaa4e";

function clippedPlate(x0, y0, x1, y1, z, color, clip = 1) {
  for (let x = x0; x <= x1; x++)
    for (let y = y0; y <= y1; y++) {
      const corner = Math.min(x - x0, x1 - x) + Math.min(y - y0, y1 - y);
      if (corner >= clip) set(x, y, z, color);
    }
}
function rim(x0, y0, x1, y1, z, width, color) {
  for (let x = x0; x <= x1; x++)
    for (let y = y0; y <= y1; y++)
      if (x < x0 + width || x > x1 - width ||
          y < y0 + width || y > y1 - width)
        set(x, y, z, color);
}

// Heavy, layered bottom frame.
clippedPlate(9, 9, 38, 38, 0, shadow, 2);
clippedPlate(8, 8, 39, 39, 1, iron, 2);
clippedPlate(7, 7, 40, 40, 2, steel, 2);
clippedPlate(7, 7, 40, 40, 3, iron, 2);
clippedPlate(8, 8, 39, 39, 4, shadow, 1);
clippedPlate(10, 10, 37, 37, 5, "#90612f", 1);
clippedPlate(11, 11, 36, 36, 6, "#be8543", 1);
rim(8, 8, 39, 39, 4, 2, steel);
rim(9, 9, 38, 38, 5, 1, edge);
rim(8, 8, 39, 39, 6, 2, iron);
rim(9, 9, 38, 38, 7, 1, steel);

// Subtle grain across the warm metal floor.
for (let x = 12; x <= 35; x++)
  for (let y = 12; y <= 35; y++)
    if (rand() < 0.13)
      set(x, y, 6, rand() < 0.5 ? "#c58d49" : "#ad7538");

// Four square uprights. The clear bays between them remain open.
for (const x of [8, 37]) for (const y of [8, 37]) {
  box(x, y, 7, x + 2, y + 2, 26, shadow);
  box(x + 1, y, 8, x + 2, y, 25, steel);
  box(x, y + 1, 9, x, y + 2, 25, "#374751");
  box(x + 1, y + 1, 7, x + 2, y + 2, 8, gold);
  box(x + 1, y, 15, x + 2, y, 16, "#ba832e");
  box(x + 1, y, 25, x + 2, y, 26, gold);
  set(x + 1, y, 17, brightGold);
}

// Thin cool-toned glints along the edges of the glass.
for (const x of [11, 36]) {
  for (const y of [9, 38]) {
    box(x, y, 11, x, y, 23, "#719092");
    set(x, y, 13, "#a9b8a4");
    set(x, y, 21, "#d1c9a1");
  }
}
for (const y of [11, 36]) {
  for (const x of [9, 38]) {
    box(x, y, 12, x, y, 22, "#67878a");
    set(x, y, 18, "#c0c3a5");
  }
}

// Scalloped brass candle holder and its raised central cup.
cylinder(24, 24, 7, 7, 2, "#a8752b");
cylinder(24, 24, 8, 6, 1, "#e4b65e");
cylinder(24, 24, 9, 4, 2, "#f2d17d");
cylinder(24, 24, 10, 3, 1, "#a56d25");
for (let i = 0; i < 16; i++) {
  const a = i * Math.PI / 8;
  const x = Math.round(24 + 7 * Math.cos(a));
  const y = Math.round(24 + 7 * Math.sin(a));
  set(x, y, 8, i % 2 ? "#f0c466" : "#c38a35");
  set(x, y, 9, "#e3ad4d");
}

// Thick ivory candle, a dark wick, and a small bright flame.
box(22, 22, 11, 25, 25, 19, "#e7d9a4");
box(22, 22, 12, 22, 25, 18, "#fff0bc");
box(23, 22, 11, 24, 22, 18, "#fff2ca");
box(25, 23, 12, 25, 25, 19, "#b9a875");
box(23, 23, 20, 24, 24, 21, "#f5e3a0");
set(24, 23, 22, "#63451f");
box(23, 23, 23, 24, 24, 24, "#ffd46c");
set(23, 23, 24, "#fff4b9");
set(24, 23, 25, "#ffe4a0");

// Broad overhanging roof with successive shallow, square steps.
clippedPlate(6, 6, 41, 41, 26, shadow, 2);
clippedPlate(5, 5, 42, 42, 27, iron, 2);
clippedPlate(4, 4, 43, 43, 28, steel, 2);
clippedPlate(5, 5, 42, 42, 29, iron, 2);
clippedPlate(8, 8, 39, 39, 30, "#34404a", 1);
clippedPlate(11, 11, 36, 36, 31, iron, 1);
clippedPlate(15, 15, 32, 32, 32, "#35414a", 1);
clippedPlate(19, 19, 28, 28, 33, iron, 1);
clippedPlate(21, 21, 26, 26, 34, steel, 0);

// Crisp highlights make the concentric roof ledges legible.
for (const [lo, hi, z] of [
  [5, 42, 29], [8, 39, 30], [11, 36, 31],
  [15, 32, 32], [19, 28, 33]
]) {
  for (let x = lo + 2; x <= hi - 2; x++) {
    set(x, lo, z, "#59656c");
    if (x % 5 !== 0) set(x, hi, z, "#27323a");
  }
  for (let y = lo + 2; y <= hi - 2; y++) {
    set(lo, y, z, "#536068");
    set(hi, y, z, "#28333c");
  }
}

// Small brass studs at the corners of each roof tier.
for (const [lo, hi, z] of [
  [7, 40, 30], [11, 36, 32], [16, 31, 33], [20, 27, 34]
]) {
  for (const x of [lo, hi])
    for (const y of [lo, hi]) {
      set(x, y, z, gold);
      set(x, y, z + 1, brightGold);
    }
}

// Upright, angular carrying ring, with a genuinely open center.
box(20, 21, 35, 28, 25, 36, shadow);
box(21, 21, 36, 27, 21, 36, gold);
box(18, 22, 37, 20, 25, 39, iron);
box(28, 22, 30, 25, 37, 39, iron);
box(19, 22, 39, 21, 25, 41, steel);
box(27, 22, 29, 25, 39, 41, shadow);
box(21, 22, 41, 27, 25, 42, iron);
box(22, 22, 42, 26, 24, 43, steel);
box(20, 21, 38, 20, 21, 40, edge);
box(21, 21, 41, 26, 21, 41, "#657178");
box(19, 22, 37, 19, 22, 39, "#667178");
set(24, 21, 36, brightGold);