fogón

← Basics3D assetfogon/biblioteca

Biblioteca

by fogonCC015481 blocks
BibliotecaDrag to turn it
// «Biblioteca» · gpt-6-sol (medium)
// Bookshelf («Biblioteca»). Be faithful to the reference: keep thin parts thin (1–2 blocks: strings, necks, handles, legs, rods), keep its exact proportions and silhouette, and every visible detail (books on shelves, sound holes, tuning pegs, valves). Don't make it chunkier than the reference.

// Warm wooden cabinet, with its open face toward -y.
const wood = {
  dark: "#633c27",
  side: "#78492c",
  frame: "#986139",
  edge: "#ad7142",
  shelf: "#b87946",
  light: "#d99a60",
  top: "#e5aa72"
};

function trim(x0, y0, z0, x1, y1, z1, face, highlight) {
  box(x0, y0, z0, x1, y1, z1, face);
  box(x0, y0, z1, x1, y1, z1, highlight);
}

// Recessed back and narrow, solid side panels.
box(9, 28, 3, 40, 30, 34, "#513523");
box(8, 17, 2, 10, 30, 34, wood.side);
box(39, 17, 2, 41, 30, 34, wood.side);
box(8, 17, 3, 8, 29, 33, "#694028");
box(41, 17, 3, 41, 29, 33, "#8b5633");

// Small raised plinth.
trim(6, 14, 0, 43, 32, 0, "#70442c", "#a96b3d");
trim(7, 15, 1, 42, 31, 1, "#89522f", "#bd7b48");
box(9, 17, 2, 40, 29, 3, wood.dark);

// Shelves: thin, with distinct bright front edges.
for (const z of [3, 14, 25]) {
  box(10, 17, z, 39, 29, z + 1, "#80502f");
  box(11, 16, z + 1, 39, 27, z + 1, "#c0834d");
  box(10, 14, z, 40, 16, z, "#965b32");
  box(10, 14, z + 1, 40, 16, z + 1, "#d49758");
  box(11, 14, z, 39, 14, z, "#764628");
}

// Slender front uprights cover the ends of the shelves.
box(9, 14, 2, 11, 17, 34, "#925a34");
box(10, 14, 3, 10, 14, 33, "#b47745");
box(39, 14, 2, 41, 17, 34, "#995d35");
box(39, 14, 3, 39, 14, 33, "#b97c49");
box(12, 16, 4, 12, 17, 33, "#67422b");
box(38, 16, 4, 38, 17, 33, "#684029");

// A book has a narrow, readable spine and slightly darker page block.
function book(x, bottom, width, height, spine, light, band = "#d5ba83") {
  const right = x + width - 1;
  box(x, 17, bottom, right, 23, bottom + height - 1, spine);
  box(x, 17, bottom, right, 17, bottom + height - 1, light);
  box(x, 18, bottom + height - 1, right, 22, bottom + height - 1, "#c8ad80");
  box(x, 17, bottom, right, 17, bottom, spine);
  if (height >= 5) {
    box(x, 16, bottom + 1, right, 16, bottom + 1, band);
    box(x, 16, bottom + height - 2, right, 16, bottom + height - 2, band);
    set(x, 16, bottom + Math.floor(height / 2), band);
  }
}

function stackedBook(x, bottom, width, color, edge) {
  box(x, 17, bottom, x + width - 1, 23, bottom + 1, color);
  box(x, 16, bottom + 1, x + width - 1, 16, bottom + 1, edge);
  box(x, 18, bottom + 1, x + width - 1, 22, bottom + 1, "#d2bd90");
}

// Upper row: differently sized, closely packed upright volumes.
book(13, 26, 2, 6, "#7a3435", "#a45d54");
book(15, 26, 1, 7, "#b2a173", "#dfcb91");
book(16, 26, 2, 7, "#576849", "#8c9564");
book(18, 26, 3, 8, "#246c69", "#438d86");
book(21, 26, 2, 7, "#2b6567", "#52948d");
book(23, 26, 1, 8, "#96835e", "#c3ad78");
book(24, 26, 2, 7, "#7a6d4e", "#a99a68");
book(26, 26, 2, 8, "#37536d", "#64839a");
book(28, 26, 1, 8, "#bea270", "#e2c78d");
book(29, 26, 3, 9, "#526c49", "#81946a");
book(32, 26, 2, 7, "#605842", "#948567");
book(34, 26, 3, 8, "#62504e", "#967978");
book(37, 26, 1, 6, "#a4764c", "#c89a63");

// Middle row: upright books at left, a small pile at right.
book(13, 16, 2, 7, "#77744e", "#aba578");
book(15, 16, 2, 7, "#9d895c", "#c9b47e");
book(17, 16, 1, 6, "#4d6c52", "#789478");
book(18, 16, 2, 8, "#4e684d", "#82966a");
book(20, 16, 2, 6, "#795b67", "#aa8790");
book(22, 16, 2, 7, "#734961", "#a47483");
book(24, 16, 1, 6, "#b09261", "#d4b47a");
book(25, 16, 2, 7, "#415b71", "#68869b");
book(27, 16, 2, 6, "#656b58", "#9da184");
stackedBook(29, 16, 7, "#524e65", "#948a9b");
stackedBook(30, 18, 6, "#655d70", "#b8a891");
stackedBook(29, 20, 6, "#294b70", "#6389a5");
stackedBook(30, 22, 5, "#42648a", "#87a7bb");

// Lower row, including short books and horizontal piles.
book(13, 5, 2, 7, "#697e66", "#9eae82");
book(15, 5, 2, 6, "#ac956b", "#d7bd85");
book(17, 5, 2, 8, "#765f55", "#ab8c78");
book(19, 5, 1, 6, "#835559", "#bc8480");
book(20, 5, 2, 6, "#b5a076", "#d9c290");
book(22, 5, 2, 5, "#576c55", "#8d9c73");
book(24, 5, 2, 7, "#447466", "#7ca394");
stackedBook(26, 5, 7, "#817b60", "#c6b78d");
stackedBook(27, 7, 7, "#50735e", "#a6b18d");
stackedBook(25, 9, 8, "#a2966a", "#dac89c");
book(34, 5, 2, 6, "#506b59", "#8a9e74");
book(36, 5, 2, 7, "#8c6546", "#c08c5b");

// Fine wood grain and occasional small knots on the outer side.
for (let i = 0; i < 85; i++) {
  const y = 19 + Math.floor(rand() * 10);
  const z = 4 + Math.floor(rand() * 29);
  set(8, y, z, rand() < 0.5 ? "#825233" : "#70452d");
}

// Overhanging cap: a dark underside, thin rim, and broad sunlit top.
box(7, 15, 34, 42, 31, 34, "#71452c");
box(5, 14, 35, 43, 32, 35, "#a7663c");
box(6, 15, 36, 42, 31, 36, wood.top);
box(6, 14, 35, 42, 14, 35, "#c4824b");
box(6, 15, 36, 42, 15, 36, "#efb47a");

// Subtle flecks in the broad wooden top.
for (let i = 0; i < 190; i++) {
  const x = 7 + Math.floor(rand() * 35);
  const y = 16 + Math.floor(rand() * 15);
  set(x, y, 36, rand() < 0.55 ? "#eab07a" : "#dda16d");
}