fogón

← CiudadObjeto 3Dfogon/semaforo

Semáforo

de fogonCC05058 bloques
SemáforoArrastrá para girarlo
// «Semáforo» · gpt-6-sol (medium)
// A city traffic light: a tall dark green metal pole standing on a small round concrete base, with a black rectangular signal box on top facing front (-y) holding three round lamps stacked vertically (red on top, yellow in the middle, green at the bottom), each under a small black visor. A thin pedestrian signal box with a little walking figure is clipped to the pole at mid height.

// Concrete footing, with a slightly raised rim.
cylinder(24, 24, 0, 5, 2, "#aaa9a2");
cylinder(24, 24, 2, 4, 2, "#d6d2c7");
cylinder(24, 24, 3, 3, 1, "#b9b8ae");
forEach((x, y, z, color) => {
  if (z <= 3 && color === "#d6d2c7" && rand() < 0.13)
    set(x, y, z, "#e4dfd2");
});

// Dark green iron pole and its collar.
cylinder(24, 24, 4, 2, 28, "#174b3c");
box(22, 22, 4, 22, 23, 30, "#276b51");
box(23, 21, 5, 24, 21, 29, "#205f49");
cylinder(24, 24, 5, 3, 2, "#123b33");
cylinder(24, 24, 23, 3, 2, "#103a32");

// Main traffic-signal housing: deep, square-edged, and black.
box(17, 18, 25, 31, 26, 45, "#152322");
box(18, 17, 26, 30, 17, 44, "#080f12");
box(19, 16, 27, 29, 16, 43, "#182123");
box(17, 18, 45, 31, 25, 45, "#25483c");
box(17, 25, 26, 31, 26, 43, "#0d3430");
box(17, 18, 25, 31, 25, 25, "#0a2927");

// One animated part contains the three round lamp lenses.
part("lamps", [24, 17, 35]);
const lamps = [
  { z: 41, color: "#ff3934", shine: "#ff8980" },
  { z: 35, color: "#ffcc27", shine: "#ffe981" },
  { z: 29, color: "#29dc62", shine: "#92f49c" }
];
for (const lamp of lamps) {
  for (let dx = -3; dx <= 3; dx++) {
    for (let dz = -3; dz <= 3; dz++) {
      const d = dx * dx + dz * dz;
      if (d <= 9) set(24 + dx, 15, lamp.z + dz, "#303638");
      if (d <= 5) set(24 + dx, 14, lamp.z + dz, lamp.color);
    }
  }
  set(23, 13, lamp.z + 1, lamp.shine);
  set(24, 13, lamp.z + 1, lamp.shine);
}
animate("lamps", {
  type: "colors",
  palette: ["#ff2a2a", "#ffcc22", "#22dd55", "#2a2a2a"],
  pattern: "pulse",
  glow: 0.8,
  speed: 0.6
});
part("body");

// Short projecting rain visors, one over each lens.
for (const z of [41, 35, 29]) {
  box(20, 12, z + 3, 28, 17, z + 3, "#0b1215");
  box(20, 13, z + 2, 20, 16, z + 2, "#10191b");
  box(28, 13, z + 2, 28, 16, z + 2, "#10191b");
  box(21, 12, z + 3, 27, 12, z + 3, "#253032");
}

// Pedestrian signal, clipped to the right side of the pole.
box(26, 22, 18, 30, 24, 20, "#174b3c");
box(29, 18, 14, 37, 24, 24, "#132b29");
box(30, 17, 15, 36, 17, 23, "#050f12");
box(31, 16, 16, 35, 16, 22, "#142725");
box(29, 18, 24, 37, 23, 24, "#28644d");
box(37, 19, 15, 37, 23, 23, "#245640");

// Chunky illuminated walking person on the front-facing screen.
sphere(33, 15, 21, 1, "#b7ffda");
line(33, 15, 20, 32, 15, 18, 0, "#8af2b5");
line(32, 15, 19, 30, 15, 20, 0, "#8af2b5");
line(33, 15, 19, 35, 15, 19, 0, "#8af2b5");
line(32, 15, 18, 31, 15, 16, 0, "#aaffc9");
line(32, 15, 18, 34, 15, 16, 0, "#aaffc9");

// Tiny warm painted accent on the bracket.
box(27, 21, 20, 29, 21, 20, "#e5b44d");