fogón

← Pirates and sea3D assetfogon/bandera-pirata

Bandera pirata

by fogonCC02566 blocks
Bandera pirataDrag to turn it
// «Bandera pirata» · gpt-6-sol (medium)
// A tall wooden flagpole on a small stone base with a big black pirate flag showing a white skull and crossed bones.

// Stone footing
box(12, 19, 0, 25, 29, 1, "#777d80");
box(13, 20, 2, 24, 28, 3, "#969b98");
box(14, 21, 4, 23, 27, 5, "#737a78");

for (let i = 0; i < 65; i++) {
  const x = 12 + Math.floor(rand() * 14);
  const y = 19 + Math.floor(rand() * 11);
  const z = Math.floor(rand() * 6);
  if (get(x, y, z)) set(x, y, z, rand() < 0.5 ? "#abb0a7" : "#626b6c");
}

// Tall, chunky wooden pole
cylinder(18, 24, 5, 2, 39, "#86502c");
for (let z = 6; z <= 42; z++) {
  set(17, 22, z, z % 9 < 2 ? "#d49a58" : "#b6783d");
  set(18, 22, z, "#c58a49");
  if (z % 8 === 0) {
    set(19, 22, z, "#684027");
    set(20, 24, z, "#69412a");
  }
}
box(16, 22, 5, 20, 26, 6, "#67452d");
box(16, 22, 7, 20, 26, 7, "#c88b46");
sphere(18, 24, 43, 2, "#efb93f");
set(17, 22, 44, "#ffe28a");
set(18, 22, 45, "#ffdc6a");

// Gold fittings where the flag is tied to the pole
for (const z of [27, 39]) {
  box(18, 21, z, 21, 24, z, "#bb8230");
  set(19, 20, z, "#ffe081");
}

// The whole flag turns at its hoist.
part("flag", [20, 23, 39]);

function frontY(x, z) {
  return 20 + Math.round(Math.sin(x * 0.55 + z * 0.22) * 1.15);
}
function emblem(x, z, color) {
  set(x, frontY(x, z) - 1, z, color);
}

// Thick, wind-rippled black cloth with a slightly tattered fly edge
for (let x = 21; x <= 45; x++) {
  const top = 40 - (x > 40 ? 1 : 0);
  const bottom = 25 + (x > 39 ? (x % 3 === 0 ? 2 : 1) : 0);
  for (let z = bottom; z <= top; z++) {
    if (x === 45 && z < 29) continue;
    const y = frontY(x, z);
    const shade = z === top ? "#45494e"
      : z <= bottom + 1 ? "#171a20"
      : (x + 2 * z) % 11 < 3 ? "#343941" : "#24272d";
    box(x, y, z, x, y + 2, z, shade);
    if (z > bottom + 2 && z < top - 2 && x % 8 === 0)
      set(x, y - 1, z, "#373b42");
  }
}

// Reinforced hoist and a little gold stitching
for (let z = 26; z <= 40; z++) {
  emblem(21, z, "#694b31");
  if (z % 3 === 0) emblem(22, z, "#e1ac4c");
}

// Crossbones, drawn first so the skull sits boldly in front
for (let x = 26; x <= 42; x++) {
  for (let z = 27; z <= 34; z++) {
    const rising = 28 + (x - 27) * 5 / 14;
    const falling = 33 - (x - 27) * 5 / 14;
    if (Math.abs(z - rising) < 0.65 || Math.abs(z - falling) < 0.65)
      emblem(x, z, z < 29 ? "#c9d2cf" : "#fff8e4");
  }
}
for (const [x, z] of [[27, 28], [27, 33], [41, 28], [41, 33]]) {
  for (let dx = -1; dx <= 1; dx++)
    for (let dz = -1; dz <= 1; dz++)
      if (dx * dx + dz * dz <= 2)
        emblem(x + dx, z + dz, "#fff9e9");
}

// Big white cartoon skull: round cranium, square jaw, dark eye sockets
for (let x = 29; x <= 39; x++) {
  for (let z = 31; z <= 39; z++) {
    const head = ((x - 34) / 5) ** 2 + ((z - 35.5) / 4) ** 2 <= 1;
    const jaw = x >= 31 && x <= 37 && z >= 31 && z <= 34;
    if (head || jaw)
      emblem(x, z, z >= 37 ? "#ffffff" : "#e7eee4");
  }
}
for (let x = 31; x <= 33; x++)
  for (let z = 34; z <= 36; z++) emblem(x, z, "#171b21");
for (let x = 35; x <= 37; x++)
  for (let z = 34; z <= 36; z++) emblem(x, z, "#171b21");
emblem(34, 33, "#23262a");
emblem(33, 32, "#23262a");
emblem(35, 32, "#23262a");
for (const x of [32, 34, 36]) emblem(x, 31, "#55595b");

animate("flag", { type: "swing", axis: "z", speed: 3, amplitude: 0.3 });