fogón

← BásicoObjeto 3Dfogon/silla-bucket

Silla bucket

de fogonCC09907 bloques
Silla bucketArrastrá para girarlo
// «Silla bucket» · gpt-6-sol (medium)
// Bucket chair («Silla bucket»).

// Splayed wooden legs
const wood = ["#765236", "#90643f", "#aa7950"];
const legs = [
  [[16, 18, 16], [12, 10, 1]],
  [[32, 18, 16], [36, 10, 1]],
  [[16, 32, 16], [12, 37, 1]],
  [[32, 32, 16], [36, 37, 1]]
];

for (const [top, foot] of legs) {
  line(...top, ...foot, 1, wood[0]);
  line(top[0] - 1, top[1] - 1, top[2] - 1,
       foot[0] - 1, foot[1] - 1, foot[2] + 1, 0, wood[1]);
  box(foot[0] - 1, foot[1] - 1, 0,
      foot[0] + 1, foot[1] + 1, 1, "#c6a36b");
  box(top[0] - 2, top[1] - 2, 13,
      top[0] + 1, top[1] + 1, 16, "#795638");
}

// Rounded, solid bucket and its open U-shaped back and arms
const cx = 24, cy = 24;
for (let x = 6; x <= 42; x++) {
  for (let y = 8; y <= 41; y++) {
    const dx = (x - cx) / 17;
    const dy = (y - cy) / 16;
    const d = Math.sqrt(dx * dx + dy * dy);
    if (d > 1.015 || y < 10) continue;

    // Deep upholstered seat, with a subtly lighter sitting surface.
    for (let z = 15; z <= 21; z++) {
      let color = z <= 16 ? "#145b61" :
                  z <= 18 ? "#1a7478" :
                  z === 19 ? "#258d90" : "#309da0";
      if (z >= 20 && rand() < 0.065) color = "#38a6a7";
      if (d > 0.91) color = z < 19 ? "#145e63" : "#237c80";
      set(x, y, z, color);
    }

    if (y < 14) continue;

    const sideHeight = 24 + Math.max(0, y - 15) * 0.32;
    const arch = Math.sqrt(Math.max(0, 1 - Math.pow((x - cx) / 17, 2)));
    const rearHeight = 26 + 13 * arch * Math.min(1, Math.max(0, (y - 19) / 13));
    const top = Math.min(40, Math.floor(Math.max(sideHeight, rearHeight)));
    const innerRadius = y >= 27 ? 0.73 : 0.77;
    if (d < innerRadius) continue;

    for (let z = 22; z <= top; z++) {
      let color = d < innerRadius + 0.055 ? "#28898b" :
                  y < 25 ? "#176d72" : "#1b7779";
      if (z >= top - 1) color = "#349a9a";
      else if (z < 26 && d > 0.92) color = "#16676c";
      if (z < top - 2 && rand() < 0.055)
        color = d < 0.85 ? "#329596" : "#226f73";
      set(x, y, z, color);
    }
  }
}

// Chunky rolled front edge and its layered horizontal trim
box(15, 10, 17, 33, 12, 19, "#145c62");
box(14, 11, 19, 34, 14, 21, "#237f82");
box(16, 10, 20, 32, 11, 21, "#339b9a");
box(16, 10, 17, 32, 10, 17, "#104e55");
box(15, 10, 18, 33, 10, 18, "#1c7075");
box(18, 10, 20, 30, 10, 20, "#47aaa6");

// A few broad, softly mottled marks across the seat cushion
for (let i = 0; i < 28; i++) {
  const x = 16 + Math.floor(rand() * 17);
  const y = 16 + Math.floor(rand() * 16);
  if (get(x, y, 21) === "#309da0" || get(x, y, 21) === "#38a6a7")
    set(x, y, 21, rand() < 0.5 ? "#278e91" : "#39a7a7");
}

// Raised, irregular vertical channels on the inside of the curved back
for (const x of [15, 18, 21, 27, 30, 33]) {
  const dx = (x - cx) / 17;
  const frontY = Math.round(cy + 16 * Math.sqrt(1 - dx * dx) * 0.74);
  const height = Math.floor(26 + 10 * Math.sqrt(1 - dx * dx));
  for (let z = 24; z < height; z++) {
    const y = frontY + (z % 6 === 0 ? 1 : 0);
    if (get(x, y, z)) set(x, y - 1, z,
      z % 7 < 2 ? "#226f72" : "#329092");
  }
}

// Broken highlights along the thick upper rim
for (let x = 7; x <= 41; x++) {
  for (let y = 13; y <= 40; y++) {
    const d = Math.hypot((x - cx) / 17, (y - cy) / 16);
    if (d < 0.84 || d > 1.02) continue;
    for (let z = 25; z <= 40; z++) {
      if (get(x, y, z) && !get(x, y, z + 1) && rand() < 0.38)
        set(x, y, z, "#3ca3a2");
    }
  }
}