fogón

← Casa completaObjeto 3Dfogon/toallero

Toallero

de fogonCC04897 bloques
ToalleroArrastrá para girarlo
// «Toallero» · gpt-6-sol (medium)
// A standing towel rack: a chrome frame with three horizontal bars on two feet, holding three folded towels hanging over the bars in pastel pink, mint and white with striped ends.

// Chrome towel rack with three staggered bars and folded pastel towels.
const chrome = "#b9c5c8";
const chromeLight = "#edf4f2";
const chromeShadow = "#83979c";
const chromeDeep = "#647a80";

function chromeTube(x0, y0, z0, x1, y1, z1) {
  line(x0, y0, z0, x1, y1, z1, 1, chrome);
  line(x0, y0 - 1, z0 + 1, x1, y1 - 1, z1 + 1, 0, chromeLight);
}

// Two long, stable feet with rounded-looking ends.
for (const x of [6, 41]) {
  box(x - 2, 10, 0, x + 2, 35, 1, chromeShadow);
  box(x - 2, 11, 2, x + 2, 34, 2, chrome);
  box(x - 1, 12, 3, x + 1, 33, 3, chromeLight);
  box(x - 1, 9, 0, x + 1, 10, 1, chromeLight);
  box(x - 1, 35, 0, x + 1, 36, 1, chromeLight);

  // Upright and gently sloping side rail.
  chromeTube(x, 29, 3, x, 29, 40);
  chromeTube(x, 14, 28, x, 29, 40);
  box(x - 1, 27, 39, x + 1, 30, 41, chrome);
  set(x, 28, 42, chromeLight);
}

// The three bars are visible between and beside the towels.
for (const [y, z] of [[14, 28], [21, 34], [28, 40]]) {
  box(7, y - 1, z - 1, 40, y + 1, z, chromeShadow);
  box(7, y, z, 40, y + 1, z + 1, chrome);
  line(8, y - 1, z + 1, 39, y - 1, z + 1, 0, chromeLight);
}

// Each towel folds over its own bar. The shorter back flap is visible
// beneath the rounded fold, while the longer striped flap faces forward.
function towel(x0, x1, barY, top, bottom, colors) {
  const [main, light, shade, stripe] = colors;

  // Back flap.
  for (let z = bottom + 5; z <= top - 2; z++) {
    for (let x = x0; x <= x1; x++) {
      for (let y = barY + 2; y <= barY + 4; y++) {
        set(x, y, z, z === bottom + 5 ? shade : main);
      }
    }
  }

  // Thick, softly rounded fold over the chrome bar.
  box(x0, barY - 2, top - 1, x1, barY + 3, top, light);
  box(x0 + 1, barY - 2, top + 1, x1 - 1, barY + 2, top + 1, main);
  box(x0 + 1, barY - 1, top + 1, x1 - 1, barY + 1, top + 1, light);
  for (let y = barY - 1; y <= barY + 1; y++) {
    set(x0, y, top + 1, main);
    set(x1, y, top + 1, main);
  }

  // Front flap with a subtle woven texture.
  for (let z = bottom; z <= top - 1; z++) {
    for (let x = x0; x <= x1; x++) {
      if (z === bottom && (x === x0 || x === x1)) continue;
      for (let y = barY - 4; y <= barY - 2; y++) {
        let c = main;
        if (y === barY - 4) c = rand() < 0.13 ? light : main;
        if (x === x0 || z === bottom) c = shade;
        if (z === bottom + 2 || z === bottom + 5) c = stripe;
        if (z === bottom + 3) c = light;
        set(x, y, z, c);
      }
    }
  }

  // Raised side stitching and a bright folded hem.
  line(x0, barY - 5, bottom + 7, x0, barY - 5, top - 2, 0, shade);
  line(x1, barY - 5, bottom + 7, x1, barY - 5, top - 2, 0, light);
  line(x0 + 1, barY - 5, bottom + 1, x1 - 1, barY - 5, bottom + 1, 0, light);
}

towel(9, 18, 14, 29, 14,
  ["#f5aebf", "#ffd0d9", "#d889a2", "#fff3e9"]);
towel(20, 29, 21, 35, 18,
  ["#9edbc5", "#c9f1df", "#75bda8", "#fff4dd"]);
towel(31, 39, 28, 41, 22,
  ["#f3f0e9", "#ffffff", "#d9d9d2", "#a9cfdb"]);