fogón

← Gear3D assetfogon/capa

Capa

by fogonCC07275 blocks
CapaDrag to turn it
// «Capa» · gpt-6-sol (medium)
// A heroic red cape hanging from a simple wooden coat stand: a long flowing red cloth with darker folds and a gold clasp with a blue gem at the top, the hem reaching near the floor; the stand has three short feet. It stands upright on the floor (z=0), facing front (-y), centered, chunky and readable.

// Three-footed wooden coat stand
const woodDark = "#59331f";
const wood = "#89542d";
const woodLight = "#aa7040";

line(24, 27, 2, 24, 27, 43, 2, woodDark);
box(23, 26, 5, 25, 28, 42, wood);
box(23, 25, 10, 24, 25, 41, woodLight);

// Three sturdy feet, spreading out from the post
line(24, 27, 2, 13, 19, 1, 2, woodDark);
line(24, 27, 2, 35, 19, 1, 2, woodDark);
line(24, 27, 2, 24, 37, 1, 2, woodDark);
line(24, 27, 3, 13, 19, 2, 1, wood);
line(24, 27, 3, 35, 19, 2, 1, wood);
line(24, 27, 3, 24, 37, 2, 1, wood);
box(11, 17, 0, 15, 21, 1, woodDark);
box(33, 17, 0, 37, 21, 1, woodDark);
box(22, 35, 0, 26, 39, 1, woodDark);

// Simple wooden crossbar and rounded finial
box(14, 25, 36, 34, 29, 39, woodDark);
box(15, 24, 37, 33, 25, 39, wood);
box(17, 25, 39, 31, 28, 39, woodLight);
sphere(24, 27, 44, 3, woodDark);
box(22, 25, 45, 26, 27, 46, woodLight);

// The whole cape swings from its clasp.
part("cape", [24, 19, 37]);

for (let z = 2; z <= 38; z++) {
  const down = (38 - z) / 36;
  const halfWidth = Math.round(5 + 13 * Math.pow(down, 0.72));

  for (let x = 24 - halfWidth; x <= 24 + halfWidth; x++) {
    const side = Math.abs(x - 24) / halfWidth;
    const hem = 2 + Math.round(
      1.2 * side + 0.8 * Math.sin(x * 0.72)
    );
    if (z < hem) continue;

    // Broad, gently rippling face; lower cloth billows toward the viewer.
    const fold = Math.sin((x - 24) * 0.59 + z * 0.055);
    const front = Math.round(18 - 4 * down + 1.5 * fold + side);
    const back = front + 4 + Math.round(1.5 * down);

    for (let y = front; y <= back; y++) {
      const face = y === front;
      let color;

      if (y === back) {
        color = "#681826";
      } else if (face) {
        if (fold < -0.46) color = "#781625";
        else if (fold < 0.12) color = "#a41d2c";
        else if (fold < 0.68) color = "#c92c39";
        else color = "#e04449";

        // A dark, sewn-looking lower border.
        if (z <= hem + 1) color = fold > 0.3 ? "#a51f2e" : "#681826";
        if (rand() < 0.045 && z > hem + 2)
          color = fold > 0 ? "#d63641" : "#8b1a2a";
      } else {
        color = fold < -0.3 ? "#811827" : "#ad2331";
        if (y === front + 1 && fold > 0.55) color = "#bd2835";
      }

      set(x, y, z, color);
    }
  }
}

// Thick turned-over shoulder edges
for (const x of [17, 31]) {
  line(x, 20, 37, x + (x < 24 ? -3 : 3), 19, 32, 1, "#871725");
  line(x, 18, 36, x + (x < 24 ? -2 : 2), 17, 33, 1, "#d73440");
}

animate("cape", { type: "swing", axis: "x", speed: 1.5, amplitude: 0.15 });

// Stationary gold clasp, set clearly in front of the red fabric.
part("body");
for (const x of [18, 30]) {
  sphere(x, 15, 36, 2, "#97601d");
  sphere(x, 14, 37, 2, "#e0a832");
  set(x, 12, 38, "#ffe18a");
}
line(19, 14, 36, 24, 12, 34, 1, "#ba8026");
line(24, 12, 34, 29, 14, 36, 1, "#ba8026");
line(21, 13, 36, 27, 13, 36, 1, "#f2bc48");

// Large sapphire centerpiece with a bright faceted glint
box(21, 11, 34, 27, 13, 38, "#a87122");
box(22, 10, 35, 26, 11, 37, "#f3c452");
box(22, 9, 35, 26, 10, 37, "#174c8d");
box(23, 8, 36, 25, 9, 37, "#297fcb");
set(23, 8, 37, "#9ee5ff");