fogón

← Piratas y marObjeto 3Dfogon/mapa-del-tesoro

Mapa del tesoro

de fogonCC05091 bloques
Mapa del tesoroArrastrá para girarlo
// «Mapa del tesoro» · gpt-6-sol (medium)
// A big old parchment treasure map lying flat on the ground, beige with darker burnt edges and curled corners, showing a blue sea, a green island, a dotted red path and a big red X, held down by a small dagger stuck in one corner.

// Weathered parchment, laid flat with its front edge toward the viewer.
for (let x = 5; x <= 42; x++) {
  for (let y = 6; y <= 40; y++) {
    const edge = Math.min(x - 5, 42 - x, y - 6, 40 - y);
    const mottled = rand();
    const paper = edge === 0
      ? (mottled < 0.35 ? "#71432c" : "#98603a")
      : edge === 1
        ? (mottled < 0.35 ? "#ae7244" : "#c38c54")
        : (mottled < 0.12 ? "#d8ad70" : mottled < 0.35 ? "#e8c48a" : "#f0d39a");

    set(x, y, 0, "#a77648");
    set(x, y, 1, edge < 2 ? "#b77e4b" : "#d6a76c");
    set(x, y, 2, paper);

    // The sea is painted onto the parchment, leaving a wide tan margin.
    const dx = (x - 24) / 15.7;
    const dy = (y - 23) / 13.2;
    const coast = dx * dx + dy * dy
      + 0.065 * Math.sin(x * 1.4 + y * 0.5)
      + 0.045 * Math.cos(y * 1.7 - x * 0.4);
    if (coast < 0.91) {
      set(x, y, 3, rand() < 0.13 ? "#57bcb0" : "#48aeb0");
    } else if (coast < 1.02 && edge > 2) {
      set(x, y, 3, "#82c6b5");
    }
  }
}

// Scattered ink-blue waves.
for (let i = 0; i < 48; i++) {
  const x = 11 + Math.floor(rand() * 27);
  const y = 12 + Math.floor(rand() * 23);
  const c = get(x, y, 3);
  if (c === "#48aeb0" || c === "#57bcb0") {
    set(x, y, 4, "#c3e3ce");
    if (get(x + 1, y, 3)) set(x + 1, y, 4, "#c3e3ce");
  }
}

// Sandy shoreline and lumpy green island.
for (let x = 19; x <= 36; x++) {
  for (let y = 16; y <= 32; y++) {
    const dx = (x - 28) / 8.0;
    const dy = (y - 24) / 7.1;
    const shape = dx * dx + dy * dy
      + 0.10 * Math.sin(x * 1.8 + y * 0.6)
      + 0.07 * Math.cos(y * 1.5 - x);
    if (shape < 1.0) {
      set(x, y, 4, shape > 0.68 ? "#e6bd73" :
        rand() < 0.24 ? "#5b9e51" : "#78b65b");
      if (shape < 0.34 && rand() < 0.35)
        set(x, y, 5, "#83bd62");
    }
  }
}

// Red dotted route winding from the sea onto the island.
const route = [[13, 15], [16, 18], [17, 22], [19, 26],
               [22, 29], [25, 29], [27, 27]];
for (let s = 0; s < route.length - 1; s++) {
  const [ax, ay] = route[s], [bx, by] = route[s + 1];
  const steps = Math.max(Math.abs(bx - ax), Math.abs(by - ay)) * 2;
  for (let j = 0; j <= steps; j += 4) {
    const x = Math.round(ax + (bx - ax) * j / steps);
    const y = Math.round(ay + (by - ay) * j / steps);
    set(x, y, 6, "#c43d32");
    if (j % 8 === 0) set(x + 1, y, 6, "#d94a36");
  }
}

// Big, bold treasure X.
for (let d = -3; d <= 3; d++) {
  set(29 + d, 24 + d, 7, "#a52e2b");
  set(29 + d, 24 - d, 7, "#a52e2b");
  if (Math.abs(d) < 3) {
    set(29 + d, 25 + d, 7, "#dc4935");
    set(29 + d, 25 - d, 7, "#dc4935");
  }
}

// Tiny compass rose inked in the left margin.
line(8, 25, 3, 8, 31, 3, 0, "#76543e");
line(6, 28, 3, 10, 28, 3, 0, "#76543e");
set(8, 28, 4, "#d24635");
set(8, 32, 3, "#76543e");

// Rolled front edge and two lifted, curled corners.
line(6, 6, 4, 14, 6, 4, 1, "#bb8550");
line(7, 6, 5, 13, 6, 5, 0, "#f4d6a0");
line(7, 5, 3, 13, 5, 3, 0, "#805137");

for (let x = 36; x <= 42; x++) {
  for (let y = 6; y <= 12; y++) {
    const fold = (x - 36) + (12 - y);
    if (fold < 7) continue;
    const z = 3 + Math.floor((fold - 7) / 2);
    set(x, y, z, fold > 10 ? "#bb8050" : "#efce91");
    if (y === 6 || x === 42) set(x, y, z + 1, "#825035");
  }
}
for (let x = 5; x <= 11; x++) {
  for (let y = 35; y <= 40; y++) {
    const fold = (11 - x) + (y - 35);
    if (fold < 7) continue;
    const z = 3 + Math.floor((fold - 7) / 2);
    set(x, y, z, fold > 10 ? "#b77c4c" : "#efd09a");
    if (x === 5 || y === 40) set(x, y, z + 1, "#805037");
  }
}

// A little dagger planted through the near-left corner: silver blade,
// gold crossguard, dark wooden grip, and a bright pommel.
set(9, 10, 3, "#687d84");
box(9, 10, 4, 9, 10, 6, "#cbdcdb");
box(8, 10, 7, 10, 10, 9, "#a8c4c6");
box(8, 9, 7, 8, 9, 9, "#e9eeee");
box(7, 10, 10, 11, 10, 10, "#e8b94f");
set(6, 10, 10, "#f5d071");
set(12, 10, 10, "#f5d071");
box(8, 10, 11, 10, 10, 14, "#654132");
box(8, 9, 12, 8, 9, 14, "#8e5a38");
box(8, 10, 15, 10, 10, 15, "#e8b94f");
set(9, 10, 16, "#ffe08a");