fogón

← Pirates and sea3D assetfogon/isla-chica

Isla chica

by fogonCC04486 blocks
Isla chicaDrag to turn it
// «Isla chica» · gpt-6-sol (medium)
// A tiny desert island just big enough for one: a small oval sand mound with one short palm tree, a little sign post and a bottle half-buried in the sand, surrounded by a thin turquoise water border.

// A little oval of sea around a raised sandy island.
const cx = 24, cy = 24;
for (let y = 7; y <= 41; y++) {
  for (let x = 4; x <= 44; x++) {
    const d = ((x - cx) / 20) ** 2 + ((y - cy) / 17) ** 2;
    if (d > 1) continue;
    set(x, y, 0, d > 0.87 ? "#168eaa" : "#167eaa");
    set(x, y, 1, rand() < 0.16 ? "#77e8da" : rand() < 0.4 ? "#39cfc8" : "#23b9c2");
  }
}

// Layered, gently irregular sand mound.
const sandLayers = [
  [0, 17.2, 13.8, "#c58f51"],
  [1, 16.7, 13.3, "#d6a461"],
  [2, 15.1, 11.9, "#e7ba77"],
  [3, 12.9, 10.0, "#f1cc89"],
  [4, 9.2, 7.6, "#f5d699"]
];
for (const [z, rx, ry, base] of sandLayers) {
  for (let y = 9; y <= 39; y++) {
    for (let x = 7; x <= 41; x++) {
      const d = ((x - cx) / rx) ** 2 + ((y - cy) / ry) ** 2;
      if (d > 1 + (rand() - 0.5) * 0.065) continue;
      let color = base;
      if (rand() < 0.09) color = z >= 3 ? "#ffe1a3" : "#f2c782";
      else if (rand() < 0.07) color = z >= 3 ? "#e8bc78" : "#bf8f57";
      set(x, y, z, color);
    }
  }
}

// A few bright ripples just outside the beach.
for (let i = 0; i < 75; i++) {
  const x = 5 + Math.floor(rand() * 39);
  const y = 8 + Math.floor(rand() * 33);
  const c = get(x, y, 1);
  if (c === "#23b9c2" || c === "#39cfc8")
    set(x, y, 1, rand() < 0.5 ? "#8af1df" : "#55dcd6");
}

// Short, slightly leaning palm trunk.
const trunk = [
  [19, 26, 4], [19, 26, 7], [20, 25, 10], [20, 25, 13],
  [21, 24, 16], [22, 24, 19], [23, 23, 22], [23, 23, 24]
];
for (let i = 0; i < trunk.length - 1; i++) {
  const a = trunk[i], b = trunk[i + 1];
  line(...a, ...b, i < 3 ? 1.9 : 1.5, "#96572e");
}
for (let z = 5; z <= 23; z++) {
  const t = (z - 4) / 20;
  const x = Math.round(19 + 4 * t);
  const y = Math.round(26 - 3 * t);
  if (z % 3 === 0) {
    set(x - 1, y - 1, z, "#d4914a");
    set(x, y - 1, z, "#e2a75c");
    set(x + 1, y + 1, z, "#693c25");
  } else {
    set(x - 1, y, z, "#bd7740");
    if (z % 2 === 0) set(x, y - 1, z, "#d99550");
  }
}
sphere(23, 23, 24, 2, "#628b32");

// Curved, broad palm fronds, with tapered tips and pale central ribs.
const angles = [0, 0.75, 1.55, 2.3, 3.1, 3.9, 4.7, 5.5];
for (let j = 0; j < angles.length; j++) {
  const a = angles[j];
  const dx = Math.cos(a), dy = Math.sin(a);
  const px = -dy, py = dx;
  const length = j % 3 === 0 ? 12 : 10.5;
  for (let k = 0; k <= 16; k++) {
    const t = k / 16;
    const r = 1 + length * t;
    const z = Math.round(25 + 3 * Math.sin(Math.PI * t) - 5 * t * t);
    const width = Math.max(0, Math.round(2.8 * Math.sin(Math.PI * t) + 0.3));
    for (let w = -width; w <= width; w++) {
      const x = Math.round(23 + dx * r + px * w);
      const y = Math.round(23 + dy * r + py * w);
      const shade = w === 0 ? "#a6ce4e" :
        (w < 0 ? (rand() < 0.24 ? "#b5d955" : "#76ac37")
               : (rand() < 0.24 ? "#467b2c" : "#5b9830"));
      set(x, y, z - (Math.abs(w) === width && width > 1 ? 1 : 0), shade);
    }
  }
}
// Coconuts nestled beneath the canopy.
sphere(21, 22, 22, 1.4, "#70432a");
sphere(24, 21, 22, 1.4, "#88502c");
set(21, 21, 22, "#b67a3d");

// Weathered wooden SOS sign, facing the viewer.
box(34, 16, 3, 35, 17, 12, "#765034");
box(34, 16, 5, 34, 16, 11, "#ba8250");
box(29, 14, 10, 41, 16, 16, "#794b2e");
box(30, 13, 11, 40, 14, 15, "#cc9458");
box(30, 13, 15, 40, 13, 15, "#eab477");
box(30, 13, 12, 40, 13, 12, "#b67a45");
set(30, 12, 15, "#f0c48a");
set(40, 12, 15, "#f0c48a");
set(30, 12, 11, "#68432d");
set(40, 12, 11, "#68432d");

// Chunky three-by-five lettering on the front of the sign.
const letters = [
  ["111", "100", "111", "001", "111"],
  ["111", "101", "101", "101", "111"],
  ["111", "100", "111", "001", "111"]
];
for (let n = 0; n < 3; n++)
  for (let row = 0; row < 5; row++)
    for (let col = 0; col < 3; col++)
      if (letters[n][row][col] === "1")
        set(30 + n * 4 + col, 12, 15 - row, "#54392a");

// Green bottle lying partly buried near the front-left shore.
ellipsoid(15, 16, 3.5, 3, 2, 2.5, "#218e79");
ellipsoid(15, 15, 4, 2, 1, 1.5, "#48c5a2");
box(10, 15, 3, 12, 17, 4, "#238b77");
box(9, 15, 3, 10, 17, 4, "#bc854c");
set(13, 14, 5, "#a0efcb");
set(14, 14, 5, "#b3f5d1");
box(15, 14, 3, 16, 14, 4, "#f5dfa5");
set(15, 13, 4, "#d77b57");
for (let x = 13; x <= 18; x++)
  if (rand() < 0.7) set(x, 18, 2, "#f5d699");

// Tiny shells, pebbles, and beach grass.
for (const [x, y] of [[12, 26], [32, 28], [26, 35], [11, 22]]) {
  set(x, y, 3, "#fff0c2");
  set(x + 1, y, 3, "#e4aa70");
}
for (const [x, y, z] of [[29, 18, 3], [14, 29, 2], [35, 23, 2]]) {
  set(x, y, z, "#638e3a");
  set(x, y, z + 1, "#90b44a");
  set(x + 1, y, z, "#6e9b3d");
}