fogón

← Pirates and sea3D assetfogon/estrella-de-mar

Estrella de mar

by fogonCC06673 blocks
Estrella de marDrag to turn it
// «Estrella de mar» · gpt-6-sol (medium)
// A large cartoon five-armed starfish lying on a little patch of sand, bright orange with lighter dotted bumps on top.

// A sun-warmed patch of sand.
function sandRadius(a) {
  return 1 + 0.025 * Math.sin(7 * a + 1) + 0.018 * Math.sin(13 * a - 2);
}
for (let x = 1; x < 47; x++) {
  for (let y = 1; y < 47; y++) {
    const dx = x - 24, dy = y - 24;
    const a = Math.atan2(dy, dx);
    const d = Math.hypot(dx / 21.7, dy / 20.8);
    if (d > sandRadius(a)) continue;

    const edge = d > 0.91;
    const top = edge ? 1 : 2;
    for (let z = 0; z <= top; z++) {
      let color = z === 0 ? "#c99755" : z === 1 ? "#dfb778" : "#f2d394";
      if (z === top) {
        if (rand() < 0.13) color = "#ffe4aa";
        else if (rand() < 0.09) color = "#dcb579";
      }
      set(x, y, z, color);
    }
  }
}

// Five broad, gently rounded arms radiate from a plump center.
function starRadius(x, y) {
  const angle = Math.atan2(y - 24, x - 24);
  const arm = Math.max(0, Math.cos(5 * (angle + Math.PI / 2)));
  return 10.2 + 9.3 * Math.pow(arm, 1.65);
}
function starTop(x, y) {
  const r = Math.hypot(x - 24, y - 24);
  const inset = starRadius(x, y) - r;
  if (inset < 0) return -1;
  return 5 + Math.min(2, Math.floor(Math.max(0, inset) / 1.6))
    + (r < 7 && inset > 2 ? 1 : 0);
}

for (let x = 3; x <= 45; x++) {
  for (let y = 3; y <= 45; y++) {
    const top = starTop(x, y);
    if (top < 0) continue;
    for (let z = 3; z <= top; z++) {
      let color;
      if (z === 3) color = "#b94320";
      else if (z === 4) color = "#df5d24";
      else if (z === top) color = y < 24 ? "#ff9738" : "#f78930";
      else color = "#f47728";
      if (z === top && rand() < 0.12) color = "#ffab4c";
      set(x, y, z, color);
    }
  }
}

// Little raised, buttery-orange spots run along each arm.
for (let arm = 0; arm < 5; arm++) {
  const angle = -Math.PI / 2 + arm * 2 * Math.PI / 5;
  const ux = Math.cos(angle), uy = Math.sin(angle);
  const vx = -uy, vy = ux;
  for (const distance of [9, 12, 15, 17]) {
    const offsets = distance === 17 ? [0] : [-2, 0, 2];
    for (const offset of offsets) {
      const x = Math.round(24 + ux * distance + vx * offset);
      const y = Math.round(24 + uy * distance + vy * offset);
      const top = starTop(x, y);
      if (top < 6 || starRadius(x, y) - Math.hypot(x - 24, y - 24) < 1.3) continue;
      set(x, y, top + 1, offset === 0 ? "#ffd175" : "#ffbd61");
      if (offset === 0 && distance < 16 && starTop(x + 1, y) >= 0)
        set(x + 1, y, top + 1, "#ffb450");
    }
  }
}

// A few extra freckles around the center, leaving room for the face.
for (const [x, y] of [[17,23], [19,27], [23,29], [28,28], [31,24], [18,18], [29,18]]) {
  const top = starTop(x, y);
  if (top >= 6) set(x, y, top + 1, "#ffd177");
}

// Big friendly eyes, with dark pupils and tiny glints.
for (const x of [21, 27]) {
  const y = 22, z = starTop(x, y);
  box(x - 1, y, z + 1, x + 1, y + 1, z + 1, "#fff4d5");
  set(x, y - 1, z + 1, "#fff4d5");
  set(x, y, z + 2, "#38251f");
  set(x, y - 1, z + 2, "#38251f");
  set(x - 1, y - 1, z + 2, "#ffffff");
}

// Curved smile on the front-facing top of the star.
for (const [x, y] of [[21,18], [22,17], [23,16], [24,16], [25,16], [26,17], [27,18]]) {
  const z = starTop(x, y);
  if (z >= 0) set(x, y, z + 1, "#9b3928");
}
for (const [x, y] of [[19,18], [29,18]]) {
  const z = starTop(x, y);
  if (z >= 0) set(x, y, z + 1, "#f26342");
}

// Small shells and scattered grains in the exposed sand.
for (const [cx, cy] of [[15,10], [34,11], [24,42]]) {
  box(cx - 1, cy, 3, cx + 1, cy + 1, 3, "#fff0c4");
  set(cx, cy - 1, 3, "#f6dfab");
  set(cx, cy, 4, "#fff8dc");
  set(cx - 1, cy + 1, 4, "#dfb982");
  set(cx + 1, cy + 1, 4, "#dfb982");
}
for (let i = 0; i < 85; i++) {
  const x = 3 + Math.floor(rand() * 42);
  const y = 3 + Math.floor(rand() * 42);
  if (get(x, y, 2) && starTop(x, y) < 0)
    set(x, y, 3, rand() < 0.65 ? "#ffe4ac" : "#cfa36a");
}