fogón

← City3D assetfogon/cartel-de-pare

Cartel de pare

by fogonCC05643 blocks
Cartel de pareDrag to turn it
// «Cartel de pare» · gpt-6-sol (medium)
// A road stop sign: a thin grey metal post about 34 blocks tall standing on the ground, topped by a big red octagon facing front (-y) with a white border and the white letters PARE in chunky voxel letters. The back of the sign is plain grey metal.

// Ground plate and 34-block metal post.
box(21, 21, 0, 27, 27, 1, "#667078");
box(22, 22, 2, 26, 26, 2, "#89939a");
box(23, 23, 3, 25, 25, 33, "#858f96");
box(23, 23, 3, 23, 25, 33, "#b1bac0");
box(25, 25, 3, 25, 25, 33, "#626e76");

function bounds(z) {
  const cut = z < 24 ? 24 - z : z > 37 ? z - 37 : 0;
  return [7 + cut, 40 - cut];
}
function inside(x, z) {
  if (z < 17 || z > 44) return false;
  const [left, right] = bounds(z);
  return x >= left && x <= right;
}

// Solid octagonal sign. Its rear is unlettered grey metal.
for (let z = 17; z <= 44; z++) {
  for (let x = 7; x <= 40; x++) {
    if (!inside(x, z)) continue;

    set(x, 23, z, z > 37 ? "#a8b1b6" : "#858f96");
    for (let y = 19; y <= 22; y++) {
      set(x, y, z, y === 22 ? "#78838b" : "#a5afb5");
    }

    let edge = false;
    for (let dz = -2; dz <= 2 && !edge; dz++) {
      for (let dx = -2; dx <= 2; dx++) {
        if (Math.abs(dx) + Math.abs(dz) > 2) continue;
        if (!inside(x + dx, z + dz)) {
          edge = true;
          break;
        }
      }
    }

    if (edge) {
      set(x, 18, z, z >= 35 ? "#ffffff" : "#e2e9e7");
    } else {
      const red = z >= 35 ? "#d93635" : z < 25 ? "#b9232b" : "#ca292e";
      set(x, 18, z, rand() < 0.035 ? "#d83235" : red);
    }
  }
}

// Chunky white lettering, raised one block above the red face.
const white = "#ffffff";
function glyph(x, rows) {
  for (let row = 0; row < rows.length; row++) {
    const z = 38 - row;
    for (let col = 0; col < rows[row].length; col++) {
      if (rows[row][col] === "#") set(x + col, 17, z, white);
    }
  }
}

glyph(11, [
  "######", "######", "##  ##", "##  ##",
  "##  ##", "##  ##", "######", "######",
  "##    ", "##    ", "##    ", "##    ",
  "##    ", "##    ", "##    ", "##    "
]);

glyph(18, [
  " #### ", " #### ", "##  ##", "##  ##",
  "##  ##", "##  ##", "##  ##", "######",
  "######", "##  ##", "##  ##", "##  ##",
  "##  ##", "##  ##", "##  ##", "##  ##"
]);

glyph(25, [
  "######", "######", "##  ##", "##  ##",
  "##  ##", "##  ##", "######", "######",
  "## ## ", "## ## ", "##  ##", "##  ##",
  "##  ##", "##  ##", "##  ##", "##  ##"
]);

glyph(32, [
  "######", "######", "##    ", "##    ",
  "##    ", "##    ", "######", "######",
  "##    ", "##    ", "##    ", "##    ",
  "##    ", "##    ", "######", "######"
]);