fogón

← Casa completaObjeto 3Dfogon/velador

Velador

de fogonCC010688 bloques
VeladorArrastrá para girarlo
// «Velador» · gpt-6-sol (medium)
// A bedside table lamp: a round ceramic base in teal with a glossy highlight, a short brass stem and a big cream fabric drum shade, with a small pull chain hanging from under the shade. The inside of the shade glows warm yellow.

const cx = 24, cy = 24;

// Rounded teal ceramic base.
const baseR = [7.4, 9.0, 9.7, 10.1, 10.2, 10.1, 9.8, 9.2, 8.4, 7.0, 4.8, 2.7];
for (let z = 0; z < baseR.length; z++) {
  for (let x = 13; x <= 35; x++) {
    for (let y = 13; y <= 35; y++) {
      const r = Math.hypot(x - cx, y - cy);
      if (r > baseR[z]) continue;
      let c = z < 2 ? "#176c70" : z < 5 ? "#23888b" : "#39a5a2";
      if (y < 22 && z >= 4) c = "#55b8b0";
      if (r > baseR[z] - 1.2 && y > 26) c = "#277d80";
      if (rand() < 0.035) c = "#6ac1b6";
      set(x, y, z, c);
    }
  }
}
// Curved glossy reflections on the front of the glaze.
for (let z = 4; z <= 8; z++) {
  for (let x = 18; x <= 20; x++) {
    const y = 16 + Math.round((z - 4) * 0.35);
    if (get(x, y, z)) set(x, y, z, x === 18 ? "#a7e0d2" : "#d5f1de");
  }
}
if (get(22, 15, 5)) set(22, 15, 5, "#ddf4e6");

// Brass socket and short stem.
cylinder(cx, cy, 10, 3.1, 3, "#a87531");
cylinder(cx, cy, 12, 2.2, 15, "#ce9b49");
line(23, 22, 13, 23, 22, 26, 0, "#f2cb78");
cylinder(cx, cy, 25, 3.2, 3, "#b77d35");
cylinder(cx, cy, 27, 2.3, 2, "#f0c977");

// Big, gently tapered cream fabric drum shade.
for (let z = 22; z <= 39; z++) {
  const outer = 18.2 - (z - 22) * 0.075;
  const inner = 15.1 - (z - 22) * 0.035;
  for (let x = 5; x <= 43; x++) {
    for (let y = 5; y <= 43; y++) {
      const dx = x - cx, dy = y - cy;
      const r = Math.hypot(dx, dy);
      if (r < inner || r > outer) continue;

      let c = y < 24 ? "#fff0d3" : "#e8d5b6";
      if (x < 21 && y < 27) c = "#fff5df";
      if (y > 30) c = "#d7c19f";
      if (z === 22 || z === 23) c = y < 26 ? "#ebcf9f" : "#c9ad80";
      if (z === 38 || z === 39) c = y < 26 ? "#f8e6c7" : "#d8c3a2";
      if (z > 24 && z < 38 && rand() < 0.065) c = "#f3dfbf";

      // Fine vertical fabric seams.
      const a = Math.atan2(dy, dx);
      if (z > 24 && z < 38 &&
          Math.abs(Math.sin(a * 6)) < 0.035 &&
          r > outer - 1.1) c = "#dfc8a8";
      set(x, y, z, c);
    }
  }
}

// Closed, softly rounded-looking top and its raised piping.
for (let x = 6; x <= 42; x++) {
  for (let y = 6; y <= 42; y++) {
    const r = Math.hypot(x - cx, y - cy);
    if (r <= 16.9) {
      let c = y < 24 ? "#fff4dc" : "#f2e2c6";
      if (rand() < 0.055) c = "#f9e9ce";
      set(x, y, 40, c);
    }
    if (r >= 16.2 && r <= 17.2)
      set(x, y, 40, y < 25 ? "#fff8e6" : "#e4d1b0");
  }
}
cylinder(cx, cy, 41, 1.7, 2, "#d5a451");
set(cx - 1, cy - 1, 42, "#ffe09a");

// Little brass pull chain, hanging visibly in front of the stem.
set(33, 13, 22, "#b98438");
for (let z = 13; z <= 21; z++) {
  const x = z % 2 ? 33 : 34;
  set(x, 13, z, z % 2 ? "#f1c671" : "#b78238");
  if (z % 3 === 0) set(x, 12, z, "#ffdd8c");
}
sphere(33, 13, 11, 1.5, "#d6a04d");
set(33, 12, 11, "#ffe09a");

// Warm illuminated underside and inner lining pulse independently.
part("shadeGlow", [cx, cy, 28]);
for (let z = 23; z <= 34; z++) {
  const inner = 14.7 - (z - 23) * 0.035;
  for (let x = 8; x <= 40; x++) {
    for (let y = 8; y <= 40; y++) {
      const r = Math.hypot(x - cx, y - cy);
      if (r >= inner - 0.8 && r <= inner)
        set(x, y, z, "#ffd67c");
    }
  }
}
for (let x = 9; x <= 39; x++) {
  for (let y = 9; y <= 39; y++) {
    const r = Math.hypot(x - cx, y - cy);
    if (r >= 3.5 && r <= 14.3) set(x, y, 23, "#ffdc87");
  }
}
animate("shadeGlow", {
  type: "colors",
  palette: ["#ffe29a", "#ffd478", "#ffc66d", "#ffdf90"],
  pattern: "pulse",
  glow: 0.6
});
part("body", [cx, cy, 0]);