fogón

← CiudadObjeto 3Dfogon/valla-de-obra

Valla de obra

de fogonCC05015 bloques
Valla de obraArrastrá para girarlo
// «Valla de obra» · gpt-6-sol (medium)
// A road works barrier: a wide horizontal board with diagonal red and white stripes on two sturdy grey metal A-frame legs, with a small round orange warning light on top at one end and a sandbag on each foot.

const steel = "#737e82";
const steelLight = "#aeb8b8";
const steelDark = "#4b595e";
const red = "#e94b40";
const redDark = "#c83b34";
const white = "#fff8e9";
const whiteShade = "#e7e3da";

// Four broad feet and two sturdy A-frame supports.
for (const x of [10, 38]) {
  for (const y of [14, 32]) {
    box(x - 3, y - 2, 0, x + 3, y + 2, 1, steelDark);
    box(x - 2, y - 1, 1, x + 2, y + 1, 1, steel);
  }

  line(x, 14, 1, x, 22, 22, 1.4, steel);
  line(x, 32, 1, x, 22, 22, 1.4, steel);
  line(x - 1, 16, 10, x - 1, 30, 10, 0.8, steelDark);
  line(x, 16, 11, x, 30, 11, 0.5, steelLight);
  box(x - 2, 20, 19, x + 2, 24, 22, steelDark);

  // A sandbag weighs down each end of the frame.
  for (const y of [13, 33]) {
    ellipsoid(x, y, 2, 3.4, 2.7, 1.9, "#b8a27c");
    ellipsoid(x, y, 3, 2.7, 2.1, 0.8, "#dac69d");
    line(x - 2, y, 3, x + 2, y, 3, 0, "#aa916c");
  }
}

// Chunky framed board.
box(3, 18, 20, 44, 23, 31, steelDark);
box(4, 18, 21, 43, 23, 30, steelLight);
box(4, 18, 31, 43, 23, 31, "#c9d0cc");
box(4, 18, 20, 43, 23, 20, steel);
box(3, 17, 20, 4, 24, 31, steelDark);
box(43, 17, 20, 44, 24, 31, steelDark);

// Wide diagonal safety stripes, visible from both sides.
for (let x = 5; x <= 42; x++) {
  for (let z = 22; z <= 29; z++) {
    const isRed = ((x + (z - 22) * 1.3) % 11) < 5.5;
    let color = isRed ? red : white;
    if (z === 22) color = isRed ? redDark : whiteShade;
    else if (rand() < 0.035) color = isRed ? "#f05a4c" : whiteShade;
    box(x, 17, z, x, 18, z, color);
    set(x, 23, z, color);
    set(x, 24, z, color);
  }
}

// Rivets and neat raised edges.
for (const x of [6, 41]) {
  for (const z of [21, 30]) {
    set(x, 17, z, "#dce1dc");
    set(x, 24, z, "#dce1dc");
  }
}
box(5, 17, 30, 42, 17, 30, "#d1d7d2");
box(5, 17, 21, 42, 17, 21, steel);

// Beacon mount at one end.
box(36, 19, 32, 42, 23, 33, steelDark);
box(37, 20, 33, 41, 22, 34, steel);
box(37, 19, 34, 41, 23, 34, "#39474b");

// The lens alone flickers; the metal mount stays still.
part("warningLight", [39, 21, 36]);
sphere(39, 21, 36, 2.7, "#ff9a1a");
animate("warningLight", {
  type: "colors",
  palette: ["#ff9a1a", "#3a2a10"],
  pattern: "flicker",
  glow: 0.9
});
part("body", [24, 24, 0]);