fogón

← Casa completaObjeto 3Dfogon/tacho-de-cocina

Tacho de cocina

de fogonCC028803 bloques
Tacho de cocinaArrastrá para girarlo
// «Tacho de cocina» · gpt-6-sol (medium)
// A kitchen pedal trash bin: a shiny stainless steel cylinder with a round lid on top, a black foot pedal at the front bottom, and a small black hinge at the back.

const cx = 24, cy = 26;

function disk(z, r, shade) {
  for (let x = Math.floor(cx - r); x <= Math.ceil(cx + r); x++) {
    for (let y = Math.floor(cy - r); y <= Math.ceil(cy + r); y++) {
      const d = Math.hypot(x - cx, y - cy);
      if (d <= r) set(x, y, z, shade(x, y, d));
    }
  }
}

// Rounded dark foot and sturdy stainless-steel base.
for (let z = 0; z <= 3; z++) {
  disk(z, z === 0 ? 13.5 : 14.7, (x, y, d) =>
    d > 13.5 ? "#777d80" : z === 0 ? "#50575a" : "#989fa1"
  );
}
disk(3, 15, (x, y, d) => d > 13.7 ? "#c8d0d0" : "#969fa1");

// Solid, softly shaded cylindrical body.
for (let z = 4; z <= 33; z++) {
  disk(z, 15, (x, y, d) => {
    if (d < 13.5) return "#aeb8b9";
    if (x < 12 || x > 37) return "#899497";
    if (x >= 15 && x <= 18) return rand() < 0.12 ? "#f0f5f2" : "#dce6e4";
    if (x >= 29 && x <= 31) return "#cbd7d7";
    if (x >= 34) return "#909c9e";
    if (y < 18) return rand() < 0.07 ? "#d5dddd" : "#bac5c6";
    return rand() < 0.06 ? "#cad3d3" : "#adb9bb";
  });
}

// A thin glint follows the curved front rather than forming a flat stripe.
for (let x = 16; x <= 17; x++) {
  const y = Math.ceil(cy - Math.sqrt(15 * 15 - (x - cx) ** 2));
  for (let z = 7; z <= 30; z++) {
    if (z % 8 !== 0) set(x, y, z, "#edf4f1");
  }
}

// Dark seam beneath the lid.
disk(34, 15.3, (x, y, d) =>
  d > 14 ? "#555f62" : "#798487"
);

// Chunky, gently domed round lid with a bright rolled edge.
disk(35, 16.1, (x, y, d) =>
  d > 14.7 ? "#899496" : "#c0cbca"
);
disk(36, 16.5, (x, y, d) =>
  d > 15.1 ? (y < cy ? "#e4ebe8" : "#a1adaf") : "#cbd5d3"
);
disk(37, 16, (x, y, d) =>
  d > 14.8 ? "#edf2ed" : x < 19 ? "#e1e9e5" : "#c8d2d0"
);
disk(38, 15, (x, y, d) =>
  x < 19 ? "#e6eeea" : x > 34 ? "#adbabc" : "#d5dfdc"
);
disk(39, 13.6, (x, y, d) =>
  x < 18 ? "#e9f0eb" : x > 33 ? "#bdc9c9" : "#dce5e1"
);

// Small black hinge, tucked behind the lid.
box(21, 40, 34, 27, 42, 36, "#343a3c");
box(22, 41, 37, 26, 43, 39, "#444a4b");
box(23, 43, 37, 25, 43, 38, "#202729");

// Pedal arm and broad rounded toe plate at the front, resting on the floor.
box(22, 10, 1, 26, 15, 3, "#464d4e");
for (let z = 0; z <= 2; z++) {
  for (let x = 18; x <= 30; x++) {
    for (let y = 3; y <= 12; y++) {
      const oval = ((x - 24) / 6.4) ** 2 + ((y - 7.5) / 5.2) ** 2;
      if (oval <= 1) {
        set(x, y, z, z === 2 ? "#303638" : "#202628");
      }
    }
  }
}
for (let x = 20; x <= 28; x++) {
  for (let y = 5; y <= 9; y++) {
    if (((x - 24) / 4.7) ** 2 + ((y - 7) / 2.7) ** 2 <= 1) {
      set(x, y, 3, "#4a5253");
    }
  }
}
box(21, 4, 1, 27, 4, 1, "#697273");