fogón

← Casa completaObjeto 3Dfogon/cafetera

Cafetera

de fogonCC018501 bloques
CafeteraArrastrá para girarlo
// «Cafetera» · gpt-6-sol (medium)
// An espresso coffee machine: a boxy chrome and black machine with a group head and handle, two small white cups on the drip tray below, a steam wand on the side, round pressure gauge on the front and a bean hopper on top.

const C = {
  ivory: "#f5f0e6", white: "#fffaf0", cream: "#e9e2d6",
  chrome: "#cbd2d3", bright: "#edf1ef", shadow: "#929da1",
  black: "#242b2e", charcoal: "#394144", walnut: "#80583b",
  woodLight: "#aa7950", coffee: "#67412e", bean: "#4c3024",
  mint: "#a8d8ca"
};

// Feet and the broad, low drip tray.
for (const x of [13, 34])
  for (const y of [21, 33]) box(x - 2, y - 2, 0, x + 2, y + 2, 3, C.charcoal);

box(9, 7, 2, 39, 19, 4, C.shadow);
box(10, 7, 4, 38, 19, 5, C.bright);
box(11, 8, 5, 37, 18, 5, C.chrome);
for (let x = 12; x <= 36; x += 3)
  box(x, 8, 5, x, 17, 5, C.shadow);
box(9, 6, 2, 39, 7, 4, C.bright);
box(10, 6, 3, 38, 6, 3, C.shadow);

// Chunky cream-and-chrome housing, with a dark control face.
box(10, 18, 7, 38, 36, 28, C.chrome);
box(11, 19, 9, 37, 35, 27, C.ivory);
box(10, 17, 10, 38, 18, 27, C.cream);
box(12, 16, 15, 36, 17, 27, C.black);
box(12, 16, 27, 36, 17, 28, C.charcoal);
box(10, 18, 28, 38, 36, 30, C.bright);
box(11, 18, 30, 37, 35, 30, C.white);
box(10, 17, 8, 38, 18, 10, C.chrome);
box(12, 16, 10, 36, 17, 11, C.bright);

for (const x of [10, 38]) {
  box(x, 19, 11, x, 35, 25, C.walnut);
  box(x, 20, 13, x, 34, 13, C.woodLight);
  box(x, 20, 22, x, 34, 22, C.woodLight);
}
box(11, 19, 27, 11, 35, 28, C.shadow);
box(37, 19, 27, 37, 35, 28, C.shadow);

// Little buttons and a substantial turning knob.
for (const [x, color] of [[14, C.mint], [17, "#e8ad84"]]) {
  box(x - 1, 14, 25, x + 1, 15, 26, C.chrome);
  set(x, 13, 26, color);
}
box(13, 13, 19, 16, 15, 22, C.shadow);
box(14, 12, 20, 15, 13, 21, C.bright);
set(14, 11, 21, C.charcoal);

// Round pressure gauge, facing forward.
function faceDisc(cx, cz, y, r, color) {
  for (let x = Math.ceil(cx - r); x <= cx + r; x++)
    for (let z = Math.ceil(cz - r); z <= cz + r; z++)
      if ((x - cx) ** 2 + (z - cz) ** 2 <= r * r)
        set(x, y, z, color);
}
faceDisc(32, 23, 14, 4, C.shadow);
faceDisc(32, 23, 13, 3.5, C.bright);
faceDisc(32, 23, 12, 2.6, C.white);
for (let i = 0; i <= 8; i++) {
  const a = Math.PI * (0.15 + i * 0.087);
  set(Math.round(32 + 2.3 * Math.cos(a)), 11,
      Math.round(23 + 2.3 * Math.sin(a)), C.charcoal);
}
line(32, 11, 23, 34, 11, 24, 0, "#db8069");
set(32, 10, 23, C.charcoal);

// Group head, twin spouts, and a handle projecting toward the viewer.
box(19, 13, 19, 25, 16, 24, C.shadow);
box(20, 12, 20, 24, 13, 23, C.bright);
box(19, 11, 18, 25, 13, 20, C.chrome);
box(20, 10, 18, 24, 11, 18, C.charcoal);
for (const x of [18, 26]) {
  box(x, 12, 16, x, 13, 18, C.chrome);
  set(x, 12, 15, C.shadow);
}
line(22, 10, 19, 22, 5, 19, 1, C.chrome);
box(20, 4, 18, 24, 8, 20, C.black);
box(21, 4, 20, 23, 7, 20, C.charcoal);

// Bean hopper: smoky walls, visible beans, and an oversized lid.
box(23, 25, 31, 33, 32, 32, C.shadow);
box(22, 24, 33, 34, 33, 34, C.chrome);
box(23, 25, 35, 33, 32, 38, "#89958e");
box(24, 26, 35, 32, 31, 37, C.bean);
for (let i = 0; i < 25; i++) {
  const x = 24 + Math.floor(rand() * 9);
  const y = 26 + Math.floor(rand() * 6);
  set(x, y, 38, rand() < 0.5 ? C.coffee : C.walnut);
}
for (const x of [23, 33]) box(x, 25, 35, x, 32, 38, "#bbc4bd");
box(23, 25, 39, 33, 32, 40, C.charcoal);
box(22, 24, 40, 34, 33, 41, C.bright);
box(24, 26, 42, 32, 31, 42, C.chrome);

// Side-mounted steam wand and its black control knob.
box(39, 25, 22, 41, 28, 25, C.charcoal);
box(41, 25, 23, 42, 27, 24, C.bright);
line(40, 19, 22, 42, 16, 19, 1, C.chrome);
line(42, 16, 19, 42, 12, 12, 0, C.bright);
box(41, 11, 11, 43, 13, 12, C.shadow);
set(42, 11, 11, C.bright);

// Two tiny cups, each with a saucer, a hollow white rim, and coffee.
for (const cx of [17, 27]) {
  const cy = 12;
  for (let x = cx - 4; x <= cx + 4; x++)
    for (let y = cy - 4; y <= cy + 4; y++)
      if ((x - cx) ** 2 + (y - cy) ** 2 <= 15)
        set(x, y, 6, C.white);

  for (let z = 7; z <= 12; z++)
    for (let x = cx - 3; x <= cx + 3; x++)
      for (let y = cy - 3; y <= cy + 3; y++) {
        const d = (x - cx) ** 2 + (y - cy) ** 2;
        if (d <= 9 && (z <= 8 || d >= 4))
          set(x, y, z, z === 12 ? C.white : C.cream);
      }
  for (let x = cx - 1; x <= cx + 1; x++)
    for (let y = cy - 1; y <= cy + 1; y++)
      set(x, y, 10, C.coffee);

  // Square toy-like loop handle.
  box(cx + 3, cy - 1, 9, cx + 5, cy + 1, 9, C.white);
  box(cx + 5, cy - 1, 9, cx + 5, cy + 1, 11, C.white);
  box(cx + 3, cy - 1, 11, cx + 5, cy + 1, 11, C.white);
  set(cx + 4, cy, 10, null);
}

// Wisps are separate so only the steam cycles in color.
part("steam", [22, 9, 14]);
for (const cx of [17, 27]) {
  const points = [
    [cx, 9, 14], [cx, 9, 15], [cx + 1, 9, 16],
    [cx + 1, 9, 17], [cx, 9, 18], [cx - 1, 9, 19]
  ];
  for (const [x, y, z] of points)
    set(x, y, z, z % 2 ? "#e9eeea" : "#f9faf6");
}
animate("steam", {
  type: "colors",
  palette: ["#ffffff", "#edf1ef", "#dce3e1", "#f8faf7"],
  pattern: "noise",
  glow: 0.2
});
part("body", [24, 24, 0]);