fogón

← CiudadObjeto 3Dfogon/camion-de-basura

Camión de basura

de fogonCC028795 bloques
Camión de basuraArrastrá para girarlo
// «Camión de basura» · gpt-6-sol (medium)
// A garbage truck: a cab at the front (-y) and a big boxy green rear body with a tilted loading mouth at the back (+y), a yellow warning stripe, two side steps for the workers and six black wheels.

// Chassis and cab: the front faces -y.
box(13, 5, 5, 34, 41, 9, "#344c42");
box(11, 4, 7, 36, 20, 17, "#dbe8c9");
box(12, 7, 16, 35, 20, 26, "#dbe8c9");
box(13, 9, 26, 34, 20, 28, "#edf1d9");
box(12, 5, 16, 35, 8, 23, "#dbe8c9");

// Front bumper, grille, headlights, and windshield.
box(11, 3, 7, 36, 5, 9, "#425a51");
box(18, 3, 10, 29, 3, 14, "#52655d");
for (let x = 19; x <= 28; x += 2)
  box(x, 2, 11, x, 2, 13, "#91a49a");
for (const x of [13, 33]) {
  box(x, 3, 12, x + 2, 3, 14, "#fff2b5");
  box(x, 3, 9, x + 2, 3, 9, "#f2a255");
}
box(15, 4, 18, 32, 4, 24, "#4c8694");
box(16, 3, 22, 31, 3, 24, "#80b8b7");
box(23, 3, 18, 24, 3, 25, "#dbe8c9");
box(16, 3, 18, 21, 3, 18, "#334a50");
box(26, 3, 18, 31, 3, 18, "#334a50");

// Side doors and windows.
for (const x of [11, 36]) {
  box(x, 8, 11, x, 19, 24, "#c5d9b8");
  box(x, 9, 18, x, 16, 23, "#477f8e");
  box(x, 10, 22, x, 15, 23, "#80b9b5");
  box(x, 17, 14, x, 17, 15, "#42594f");
  box(x, 8, 10, x, 18, 10, "#77a486");
  box(x, 18, 11, x, 18, 23, "#a0bd9d");
}

// Large, solid compactor body.
box(11, 20, 9, 36, 40, 29, "#23884d");
box(12, 20, 30, 35, 39, 31, "#48aa68");
box(11, 21, 27, 36, 39, 29, "#359c5c");
box(10, 22, 15, 10, 39, 26, "#2c9655");
box(37, 22, 15, 37, 39, 26, "#197b45");
box(11, 20, 8, 36, 40, 10, "#246b45");

// Subtle variation on the broad painted surfaces.
forEach((x, y, z, color) => {
  if (color === "#23884d" && rand() < 0.035)
    set(x, y, z, "#2d9354");
  if (color === "#dbe8c9" && rand() < 0.025)
    set(x, y, z, "#e7edcf");
});

// Crisp panel edges and the long yellow warning stripe.
for (const x of [10, 37]) {
  box(x, 21, 13, x, 40, 14, "#283f37");
  box(x, 21, 14, x, 40, 15, "#ffd459");
  box(x, 22, 26, x, 39, 26, "#a8db89");
  box(x, 23, 16, x, 23, 25, "#145e3c");
  box(x, 38, 16, x, 38, 25, "#145e3c");
  box(x, 24, 18, x, 24, 19, "#ef9b5e");
  box(x, 36, 18, x, 36, 19, "#ef9b5e");
}

// Small cream BA monogram, like a painted municipal insignia.
const letters = [
  { y: 27, rows: ["##.", "#.#", "##.", "#.#", "##."] },
  { y: 31, rows: [".#.", "#.#", "###", "#.#", "#.#"] }
];
for (const x of [9, 38]) {
  for (const letter of letters)
    for (let row = 0; row < 5; row++)
      for (let col = 0; col < 3; col++)
        if (letter.rows[row][col] === "#")
          set(x, letter.y + col, 24 - row, "#fff0b8");
  box(x, 26, 17, x, 35, 17, "#f3a75f");
}

// Rear loading mouth: a sloping roof over a dark recessed hopper.
box(11, 41, 8, 36, 45, 11, "#216b44");
box(14, 42, 12, 33, 44, 23, "#263d36");
box(15, 43, 12, 32, 44, 14, "#51725b");
box(16, 44, 13, 21, 44, 15, "#759473");
box(25, 44, 12, 29, 44, 14, "#a9a07c");
for (let y = 40; y <= 45; y++) {
  const top = 31 - (y - 40);
  box(11, y, 11, 13, y, top, "#21804b");
  box(34, y, 11, 36, y, top, "#176c40");
  box(12, y, top, 35, y, top + 1, "#48a866");
}
box(13, 45, 24, 34, 45, 25, "#a8dc83");
box(11, 45, 10, 36, 45, 11, "#f2bd4c");
for (let x = 12; x <= 35; x += 4)
  box(x, 46, 9, x + 1, 46, 11, "#303b32");
for (const x of [12, 35])
  box(x, 45, 13, x, 45, 15, "#f16d55");

// Two low worker steps at the back corners.
for (const x of [8, 37]) {
  box(x, 42, 3, x + 2, 45, 4, "#405b50");
  box(x, 43, 5, x + 2, 45, 5, "#a4b8a0");
  box(x, 44, 5, x + 2, 44, 5, "#f4c756");
}

// Six individually spinning wheels, each pivoted at its own axle.
for (const y of [11, 29, 38]) {
  for (const side of ["left", "right"]) {
    const axleX = side === "left" ? 9 : 38;
    const outerX = side === "left" ? 7 : 40;
    const tireStart = side === "left" ? 7 : 36;
    const name = `wheel_${side}_${y}`;
    part(name, [axleX, y, 5]);
    cylinder(tireStart, y, 5, 5, 5, "#202b29", "x");
    cylinder(outerX, y, 5, 4, 1, "#303a35", "x");
    cylinder(outerX, y, 5, 3, 1, "#798b7d", "x");
    cylinder(outerX, y, 5, 2, 1, "#cad5b6", "x");
    set(outerX, y, 5, "#65796d");
    for (const [dy, dz] of [[0, 3], [3, 0], [0, -3], [-3, 0]])
      set(outerX, y + dy, 5 + dz, "#394a41");
    animate(name, { type: "spin", axis: "x", speed: 6 });
    part("body");
  }
}