fogón

← BásicoObjeto 3Dfogon/mesa-de-caballetes

Mesa de caballetes

de fogonCC013438 bloques
Mesa de caballetesArrastrá para girarlo
// «Mesa de caballetes» · gpt-6-sol (medium)
// Trestle table («Mesa de caballetes»).

// Trestle table: warm plank top, two timber trestles, and a long stretcher.
const wood = {
  dark: "#684124",
  shadow: "#80502a",
  mid: "#a66532",
  light: "#c58340",
  edge: "#d99648",
  top: "#efae60",
  pale: "#f7bf74"
};

function timber(x0, y0, z0, x1, y1, z1) {
  box(x0, y0, z0, x1, y1, z1, wood.mid);
  box(x0, y0, z1, x1, y1, z1, wood.light);
  box(x0, y0, z0, x1, y0, z1 - 1, wood.shadow);
  if (x1 - x0 >= 2) {
    box(x0 + 1, y0, z1 - 1, x1 - 1, y0, z1 - 1, wood.edge);
  }
}

// Broad feet, running across the width of the table.
for (const x of [11, 35]) {
  timber(x - 3, 7, 0, x + 3, 41, 2);
  box(x - 2, 8, 3, x + 2, 40, 3, wood.light);
  box(x - 3, 7, 0, x + 3, 7, 0, wood.dark);
  box(x - 3, 41, 0, x + 3, 41, 0, wood.dark);

  // Two stout uprights on each foot.
  for (const y of [13, 33]) {
    timber(x - 2, y - 2, 4, x + 2, y + 2, 26);
    box(x - 2, y - 2, 5, x + 2, y - 2, 6, wood.dark);
    box(x - 2, y - 2, 12, x + 2, y - 2, 12, wood.dark);
    box(x - 2, y - 2, 20, x + 2, y - 2, 20, wood.shadow);
    box(x - 1, y - 3, 22, x + 1, y - 3, 25, wood.light);
  }

  // The crosspiece joining each pair of uprights.
  timber(x - 2, 15, 20, x + 2, 35, 23);
  box(x - 2, 17, 19, x + 2, 33, 19, wood.dark);
  box(x - 1, 18, 23, x + 1, 32, 23, wood.edge);

  // Blocky joinery above the foot.
  for (const y of [13, 33]) {
    box(x - 3, y - 3, 4, x + 3, y + 3, 6, wood.shadow);
    box(x - 2, y - 3, 6, x + 2, y + 2, 7, wood.light);
    box(x - 3, y - 2, 8, x + 3, y + 2, 9, wood.mid);
  }
}

// Long beams linking the trestles, visible below the tabletop.
timber(13, 12, 15, 35, 16, 19);
box(15, 11, 16, 33, 11, 18, wood.light);
box(17, 11, 18, 32, 11, 18, wood.edge);
timber(13, 32, 15, 35, 35, 18);

// Short braces immediately beneath the tabletop.
for (const x of [11, 35]) {
  timber(x - 3, 10, 25, x + 3, 38, 27);
  box(x - 2, 11, 27, x + 2, 37, 27, wood.edge);
}

// Deep, dark underside and the thick rim of the top.
box(3, 8, 27, 44, 39, 28, wood.shadow);
box(4, 9, 27, 43, 38, 27, wood.dark);
box(3, 8, 29, 44, 39, 30, wood.mid);
box(3, 8, 28, 44, 8, 29, wood.dark);
box(3, 39, 28, 44, 39, 29, wood.shadow);
box(3, 8, 28, 3, 39, 29, wood.dark);
box(44, 8, 28, 44, 39, 29, wood.shadow);

// Six long, closely fitted golden planks.
const planks = [
  [9, 13, "#eaa457"],
  [14, 18, "#f1ae61"],
  [19, 23, "#e9a054"],
  [24, 28, "#f2b369"],
  [29, 33, "#eaa758"],
  [34, 38, "#f0ad60"]
];
for (const [y0, y1, color] of planks) {
  box(5, y0, 31, 42, y1, 31, color);
  box(5, y0, 31, 42, y0, 31, "#d99044");
  box(6, y1, 31, 41, y1, 31, "#f7ba70");
}

// Framing around the top, with a crisp light inner edge.
box(3, 8, 31, 44, 8, 31, "#d58b40");
box(3, 39, 31, 44, 39, 31, "#d28a40");
box(3, 8, 31, 3, 39, 31, "#d58c42");
box(44, 8, 31, 44, 39, 31, "#c77d37");
box(4, 9, 31, 43, 9, 31, "#f8bd71");
box(4, 38, 31, 43, 38, 31, "#f8bd71");
box(4, 9, 31, 4, 38, 31, "#f4b264");
box(43, 9, 31, 43, 38, 31, "#e39b4b");

// Short, staggered strokes of grain follow the length of each plank.
for (const [y0, y1] of planks) {
  for (let i = 0; i < 28; i++) {
    const x = 6 + Math.floor(rand() * 33);
    const y = y0 + 1 + Math.floor(rand() * Math.max(1, y1 - y0 - 1));
    const length = 1 + Math.floor(rand() * 6);
    const color = rand() < 0.54 ? "#f8bd73" : "#d9954c";
    box(x, y, 31, Math.min(41, x + length), y, 31, color);
  }
}

// Small variations and wooden seams on the exposed front rim.
for (let x = 7; x < 43; x += 7) {
  box(x, 8, 28, x, 8, 29, wood.dark);
  box(x + 1, 8, 29, x + 3, 8, 29, wood.light);
}
for (const x of [7, 19, 30, 41]) {
  box(x, 11, 31, x, 12, 31, "#cf8640");
}