fogón

← CiudadObjeto 3Dfogon/calesita

Calesita

de fogonCC012568 bloques
CalesitaArrastrá para girarlo
// «Calesita» · gpt-6-sol (medium)
// A classic Buenos Aires carousel (calesita): a round platform with a striped red and white conical roof on a central pole with a flag on top, little colorful horses and a tiny car on poles around the edge, and a ring of yellow bulbs under the roof edge.

const C = { x: 24, y: 24 };
const tau = Math.PI * 2;

function disk(z, radius, color) {
  for (let y = 3; y <= 45; y++)
    for (let x = 3; x <= 45; x++)
      if (Math.hypot(x - C.x, y - C.y) <= radius)
        set(x, y, z, typeof color === "function" ? color(x, y) : color);
}

function ring(z, inner, outer, color) {
  for (let y = 3; y <= 45; y++)
    for (let x = 3; x <= 45; x++) {
      const r = Math.hypot(x - C.x, y - C.y);
      if (r >= inner && r <= outer)
        set(x, y, z, typeof color === "function" ? color(x, y) : color);
    }
}

// Fixed concrete-and-asphalt ground ring.
ring(0, 19.2, 21.3, () => rand() < 0.13 ? "#adb5b2" : "#c9cfca");
ring(0, 20.4, 21.3, "#737d7a");
ring(0, 19.2, 19.7, "#f0d16a");

part("carousel", [24, 24, 0]);
animate("carousel", { type: "spin", axis: "z", speed: 0.8 });

// Raised, rotating wooden platform and its painted skirt.
disk(1, 19.1, "#27564a");
disk(2, 19.1, (x, y) =>
  rand() < 0.08 ? "#bd5646" :
  (Math.floor(Math.atan2(y - 24, x - 24) * 12 / tau + 12) % 2 ? "#d96c54" : "#e98465")
);
disk(3, 19.1, "#f4c65c");
disk(4, 17.8, (x, y) => rand() < 0.10 ? "#f3d49b" : "#e8ba7e");
ring(4, 17.1, 18.6, "#9e343d");
ring(4, 17.0, 17.3, "#ffe092");
ring(2, 18.5, 19.2, "#f5c45b");

// Gold dots on the outer skirt.
for (let i = 0; i < 36; i++) {
  const a = tau * i / 36;
  set(24 + 19 * Math.cos(a), 24 + 19 * Math.sin(a), 2, "#ffe184");
}

// Central pole, with a decorative foot and a gilded collar.
cylinder(24, 24, 4, 2, 2, "#b5363e");
cylinder(24, 24, 6, 1, 34, "#f6cb62");
for (let z = 7; z <= 27; z++)
  set(24, 23, z, "#ffe994");
cylinder(24, 24, 25, 2, 2, "#dfaa40");

// Slender green iron posts beneath the canopy.
for (let i = 0; i < 8; i++) {
  const a = tau * (i + 0.5) / 8;
  const x = Math.round(24 + 18 * Math.cos(a));
  const y = Math.round(24 + 18 * Math.sin(a));
  box(x, y, 5, x, y, 27, "#276154");
  set(x, y, 5, "#efbd54");
  set(x, y, 6, "#efbd54");
  set(x, y, 25, "#efbd54");
  set(x, y, 27, "#efbd54");
}

const horses = [
  { body: "#f5f0dd", shade: "#d7c7a6", mane: "#a65844", saddle: "#e64c56" },
  { body: "#eeae76", shade: "#bb795b", mane: "#633e43", saddle: "#4eacd0" },
  { body: "#a8d5d0", shade: "#77aba7", mane: "#37565f", saddle: "#f2a849" },
  { body: "#f1cf75", shade: "#c49a58", mane: "#9e5a47", saddle: "#df5674" },
  { body: "#e9a5ad", shade: "#c17886", mane: "#603d50", saddle: "#66b8a4" },
  { body: "#d7c6ed", shade: "#a994c6", mane: "#674b72", saddle: "#e9b34c" }
];

function horse(cx, cy, h, facing) {
  const X = (n) => cx + n * facing;

  // Brass mounting pole continues above and below the horse.
  box(cx, cy, 4, cx, cy, 27, "#e9bd5f");
  set(cx, cy, 6, "#fff0a0");
  set(cx, cy, 19, "#fff0a0");

  // Four separated legs, dark hooves, and a chunky barrel.
  for (const lx of [-1, 1])
    for (const ly of [-1, 1]) {
      box(X(lx), cy + ly, 8, X(lx), cy + ly, 11, h.shade);
      set(X(lx), cy + ly, 7, h.mane);
    }
  box(X(-2), cy - 1, 11, X(2), cy + 1, 13, h.body);
  box(X(-2), cy - 1, 13, X(1), cy + 1, 13, "#fff0d6");

  // Proud raised head, little ears and a contrasting flowing mane.
  box(X(2), cy - 1, 13, X(3), cy + 1, 16, h.body);
  box(X(3), cy - 1, 15, X(4), cy + 1, 16, h.body);
  box(X(4), cy - 1, 14, X(4), cy + 1, 15, h.shade);
  set(X(3), cy - 1, 17, h.body);
  for (let z = 14; z <= 16; z++) set(X(2), cy + 1, z, h.mane);
  set(X(4), cy - 2, 16, "#27313b");
  set(X(4), cy + 2, 16, "#27313b");
  box(X(-3), cy, 12, X(-3), cy, 14, h.mane);
  set(X(-4), cy, 11, h.mane);

  // Bright saddle and a thin gold harness.
  box(X(-1), cy - 1, 14, X(1), cy + 1, 14, h.saddle);
  box(cx, cy - 1, 11, cx, cy - 1, 13, "#f5ce62");
  set(X(3), cy - 1, 15, "#f4cb64");
}

for (let i = 1; i <= 6; i++) {
  const a = -Math.PI / 2 + tau * i / 7;
  horse(
    Math.round(24 + 13 * Math.cos(a)),
    Math.round(24 + 13 * Math.sin(a)),
    horses[i - 1],
    i % 2 ? 1 : -1
  );
}

// A tiny Buenos Aires-inspired yellow-and-black taxi car at the front.
box(24, 11, 4, 24, 11, 27, "#e9bd5f");
box(21, 8, 7, 27, 14, 9, "#f3bf39");
box(21, 7, 9, 27, 10, 9, "#ffe065");  // hood
box(22, 10, 10, 26, 14, 12, "#e6ac36");
box(22, 9, 12, 26, 13, 13, "#f4c84c");
box(22, 9, 10, 26, 9, 12, "#354653"); // windshield
box(23, 9, 11, 25, 9, 12, "#85c7d2");
box(21, 11, 10, 21, 13, 11, "#37464a");
box(27, 11, 10, 27, 13, 11, "#37464a");
for (const x of [21, 27])
  for (const y of [9, 13]) {
    box(x, y, 6, x, y, 8, "#26313a");
    set(x, y, 7, "#82908c");
  }
box(21, 7, 8, 27, 7, 8, "#333b3e");
set(22, 7, 9, "#fff1a4");
set(26, 7, 9, "#fff1a4");
for (const x of [22, 24, 26]) set(x, 8, 8, "#333b3e");
box(23, 8, 13, 25, 8, 13, "#fff3d4");
set(24, 8, 13, "#303941");

// Flat underside and striped, steeply conical canopy.
disk(28, 20, "#f8dfad");
for (let z = 29; z <= 40; z++) {
  const radius = 20 - (z - 28) * 1.55;
  for (let y = 4; y <= 44; y++)
    for (let x = 4; x <= 44; x++) {
      if (Math.hypot(x - 24, y - 24) > radius) continue;
      const a = Math.atan2(y - 24, x - 24);
      const stripe = ((Math.floor((a + Math.PI) * 16 / tau) % 2) + 2) % 2;
      const color = stripe
        ? (rand() < 0.04 ? "#f3e2c7" : "#fff4df")
        : (rand() < 0.04 ? "#ee7770" : "#d9474b");
      set(x, y, z, color);
    }
}

// Scalloped red valance, gold edge, and a complete ring of warm bulbs.
ring(27, 18.5, 20.1, "#a5343d");
ring(28, 19.2, 20.3, "#f5ca61");
for (let i = 0; i < 40; i++) {
  const a = tau * i / 40;
  const x = Math.round(24 + 19.4 * Math.cos(a));
  const y = Math.round(24 + 19.4 * Math.sin(a));
  set(x, y, 26, "#f4ae3e");
  set(x, y, 27, "#fff09a");
}

// Gilded peak and a little Argentine flag fluttering above it.
sphere(24, 24, 40, 2, "#edba4f");
box(24, 24, 41, 24, 24, 45, "#bd8845");
for (let x = 25; x <= 30; x++) {
  const end = x <= 28 ? 30 : 29; // small stepped, fluttering fly edge
  if (x > end) continue;
  set(x, 24, 45, "#72c9df");
  set(x, 24, 44, "#fff8e8");
  set(x, 24, 43, "#72c9df");
}
set(27, 23, 44, "#e5ae39");