fogón

← City3D assetfogon/reloj-de-plaza

Reloj de plaza

by fogonCC07494 blocks
Reloj de plazaDrag to turn it
// «Reloj de plaza» · gpt-6-sol (medium)
// A plaza clock: an ornate black cast iron post with a round double-sided clock on top, white faces with black numbers and hands, and a small golden ball on the very top.

const iron = "#202c2b";
const ironDark = "#131d1d";
const ironLight = "#364945";
const gold = "#d5a640";
const goldLight = "#f3cf6b";
const ink = "#202525";
const ivory = "#fff8e8";

// A broad, stepped cast-iron foot.
box(18, 18, 0, 30, 30, 1, ironDark);
box(19, 19, 2, 29, 29, 3, iron);
box(20, 20, 4, 28, 28, 5, ironLight);
box(21, 21, 6, 27, 27, 7, ironDark);
for (let x = 19; x <= 29; x += 2) {
  set(x, 18, 1, ironLight);
  set(x, 30, 1, ironLight);
}
for (let y = 19; y <= 29; y += 2) {
  set(18, y, 1, ironLight);
  set(30, y, 1, ironLight);
}
for (const x of [20, 28]) for (const y of [20, 28]) {
  set(x, y, 4, gold);
}

// Tapered post, with fluting visible from either side.
box(22, 22, 8, 26, 26, 17, iron);
box(21, 21, 8, 27, 27, 9, ironDark);
box(21, 21, 16, 27, 27, 17, ironDark);
for (let z = 10; z <= 15; z++) {
  set(22, 21, z, ironLight);
  set(24, 21, z, ironDark);
  set(26, 21, z, ironLight);
  set(22, 27, z, ironLight);
  set(24, 27, z, ironDark);
  set(26, 27, z, ironLight);
}
for (const z of [8, 9, 16, 17]) {
  line(21, 21, z, 27, 21, z, 0, gold);
  line(21, 27, z, 27, 27, z, 0, gold);
}
box(20, 20, 18, 28, 28, 19, iron);
box(22, 22, 20, 26, 26, 23, ironDark);
for (const side of [-1, 1]) {
  line(24 + side * 4, 24, 18, 24 + side * 7, 24, 22, 1, iron);
  set(24 + side * 7, 24, 23, gold);
}

// Round, thick clock case. Its two dials face front and back.
const cx = 24, cz = 31;
for (let x = 13; x <= 35; x++) {
  for (let z = 20; z <= 42; z++) {
    const r = Math.hypot(x - cx, z - cz);
    if (r > 11.35) continue;

    for (let y = 20; y <= 28; y++) {
      set(x, y, z, r > 10.35 ? ironDark :
        z > cz && rand() < 0.16 ? ironLight : iron);
    }

    for (const y of [19, 29]) {
      set(x, y, z, r > 10.45 ? gold : ironDark);
    }
    for (const y of [18, 30]) {
      if (r >= 9.55) set(x, y, z, r < 10.25 ? goldLight : ironDark);
      else set(x, y, z, iron);
    }
    for (const y of [17, 31]) {
      if (r >= 9.1 && r <= 10.65) {
        set(x, y, z, r < 9.65 ? gold : ironDark);
      } else if (r <= 8.85) {
        set(x, y, z, z > 34 && rand() < 0.08 ? "#ffffff" : ivory);
      }
    }
  }
}

// Twelve minute divisions around both white faces.
for (let i = 0; i < 12; i++) {
  if (i % 3 === 0) continue; // Numerals occupy these positions.
  const a = i * Math.PI / 6;
  for (const r of [7.35, 7.85]) {
    const x = Math.round(cx + Math.sin(a) * r);
    const z = Math.round(cz + Math.cos(a) * r);
    set(x, 16, z, ink);
    set(48 - x, 32, z, ink);
  }
}

// Chunky black cardinal numerals, mirrored so the rear reads correctly.
const digits = {
  "1": [".#.", "##.", ".#."],
  "2": ["##.", "..#", "###"],
  "3": ["##.", ".##", "##."],
  "6": [".##", "##.", "###"],
  "9": ["###", ".##", "##."]
};
function numeral(digit, x0, zTop) {
  digits[digit].forEach((row, dz) => {
    for (let dx = 0; dx < row.length; dx++) {
      if (row[dx] !== "#") continue;
      const x = x0 + dx, z = zTop - dz;
      set(x, 16, z, ink);
      set(48 - x, 32, z, ink);
    }
  });
}
numeral("1", 21, 38);
numeral("2", 24, 38);
numeral("3", 30, 32);
numeral("6", 23, 25);
numeral("9", 16, 32);

// Hands point to ten past ten on both sides.
line(24, 16, 31, 28, 16, 36, 0, ink);
line(24, 16, 31, 21, 16, 34, 0, ink);
line(24, 32, 31, 20, 32, 36, 0, ink);
line(24, 32, 31, 27, 32, 34, 0, ink);
for (const y of [16, 32]) {
  set(24, y, 31, gold);
  set(24, y, 32, goldLight);
}

// Scroll-like supports beneath the case and a little gilded finial.
for (const side of [-1, 1]) {
  line(24 + side * 5, 24, 20, 24 + side * 8, 24, 24, 0, ironLight);
  set(24 + side * 8, 24, 25, gold);
}
box(23, 23, 42, 25, 25, 43, ironDark);
box(23, 23, 44, 25, 25, 44, gold);
sphere(24, 24, 45, 1.5, gold);
set(24, 23, 46, goldLight);