fogón

← Basics3D assetfogon/comoda

Cómoda

by fogonCC035965 blocks
CómodaDrag to turn it
// «Cómoda» · gpt-6-sol (medium)
// Drawer chest («Cómoda»).

// Wooden chest of drawers: front faces -y.
const dark = "#4b291d";
const shadow = "#603720";
const frame = "#754329";
const wood = "#915831";
const warm = "#ab6a3c";
const light = "#c0804b";

// Four short, square feet.
for (const x of [10, 37]) {
  for (const y of [12, 37]) {
    box(x - 2, y - 2, 0, x + 2, y + 2, 2, dark);
    box(x - 1, y - 1, 1, x + 2, y + 2, 3, frame);
    box(x - 2, y - 2, 3, x + 2, y + 2, 4, shadow);
  }
}

// Solid body, with a darker recessed left side.
box(10, 11, 4, 39, 39, 32, shadow);
box(11, 12, 5, 38, 38, 31, wood);
box(9, 12, 5, 10, 38, 31, "#694027");

// Framed panel on the visible left side.
box(8, 13, 5, 9, 38, 31, frame);
box(8, 16, 8, 8, 35, 28, "#835032");
box(7, 13, 5, 9, 14, 31, dark);
box(7, 36, 5, 9, 38, 31, dark);
box(7, 14, 6, 9, 37, 7, shadow);
box(7, 14, 29, 9, 37, 31, shadow);
box(7, 16, 9, 7, 16, 28, warm);
box(7, 35, 9, 7, 35, 28, "#59321f");
for (let y = 19; y <= 33; y += 4) {
  box(7, y, 10, 7, y, 27, y % 3 ? "#895332" : "#764629");
}

// Front structural rails and corner posts.
box(9, 8, 4, 40, 11, 5, dark);
box(9, 8, 31, 40, 11, 33, shadow);
box(9, 8, 5, 11, 12, 32, shadow);
box(38, 8, 5, 40, 12, 32, dark);
box(10, 7, 7, 10, 7, 30, "#9b6038");
box(39, 7, 7, 39, 7, 30, "#9b6038");

// Four rows of two inset drawer fronts.
const rows = [7, 14, 21, 28];
for (const z of rows) {
  for (const [x0, x1] of [[13, 24], [26, 37]]) {
    box(x0, 9, z - 2, x1, 9, z + 2, dark);
    box(x0 + 1, 8, z - 1, x1 - 1, 8, z + 2, wood);
    box(x0 + 1, 7, z + 2, x1 - 1, 8, z + 2, "#b47242");
    box(x0 + 1, 7, z - 1, x1 - 1, 8, z - 1, "#774225");
    box(x0, 7, z, x0, 8, z + 1, "#a56539");
    box(x1, 7, z, x1, 8, z + 1, "#63371f");

    // Subtle horizontal wood grain.
    for (let i = 0; i < 5; i++) {
      const xx = x0 + 2 + Math.floor(rand() * 7);
      const zz = z + Math.floor(rand() * 3) - 1;
      box(xx, 7, zz, Math.min(xx + 1 + Math.floor(rand() * 3), x1 - 1), 7, zz,
        rand() < 0.5 ? "#a6683c" : "#84502f");
    }
  }
}
// Rails between the drawers, and the central upright.
for (const z of [4, 11, 18, 25, 32]) {
  box(11, 7, z, 39, 9, z, shadow);
  box(12, 6, z, 38, 6, z, z === 32 ? "#ac6d40" : "#935731");
}
box(24, 8, 5, 25, 10, 31, "#653821");
box(24, 7, 5, 24, 7, 31, "#9a5d34");

// Projecting square brass ring pulls.
for (const z of rows) {
  for (const x of [18, 31]) {
    box(x - 1, 6, z, x + 1, 7, z + 1, "#49301c");
    box(x - 2, 5, z + 1, x + 2, 6, z + 1, "#d9af47");
    box(x - 2, 4, z - 1, x - 1, 5, z + 1, "#bd8a2b");
    box(x + 1, 4, z - 1, x + 2, 5, z + 1, "#e3bc55");
    box(x - 2, 4, z - 1, x + 2, 5, z - 1, "#b78127");
    box(x - 1, 3, z, x + 1, 3, z, "#f0ce68");
    box(x - 2, 4, z + 1, x - 1, 4, z + 1, "#ffe078");
  }
}

// Thick overhanging top, with a dark lower lip and warm beveled edges.
box(7, 7, 33, 42, 42, 34, dark);
box(6, 6, 34, 42, 42, 34, "#784324");
box(7, 7, 35, 41, 41, 36, "#b97844");
box(8, 8, 36, 40, 40, 36, "#bf804b");
box(6, 6, 35, 42, 6, 35, "#995a32");
box(6, 7, 35, 6, 42, 35, "#9b5c34");
box(7, 7, 36, 41, 7, 36, "#d09158");
box(7, 8, 36, 7, 40, 36, "#d39258");

// Long, irregular grain across the polished tabletop.
for (let y = 10; y <= 39; y += 3) {
  const shade = y % 2 ? "#cb8b52" : "#aa6c3e";
  for (let x = 9; x < 40; x += 5 + Math.floor(rand() * 5)) {
    const length = 3 + Math.floor(rand() * 9);
    box(x, y, 37, Math.min(x + length, 40), y, 37, shade);
  }
}
for (let i = 0; i < 55; i++) {
  const x = 9 + Math.floor(rand() * 30);
  const y = 9 + Math.floor(rand() * 32);
  box(x, y, 37, Math.min(x + 1 + Math.floor(rand() * 4), 40), y, 37,
    rand() < 0.5 ? "#d19358" : "#ad7041");
}