fogón

← Asian3D assetfogon/rickshaw

Rickshaw

by fogonCC07867 blocks
RickshawDrag to turn it
// «Rickshaw» · gpt-6-sol (medium)
// A Japanese rickshaw: a red lacquered two-seat carriage with a folding black canopy on top, two big wooden-spoke wheels on the sides, a padded red seat, and two long wooden pulling poles stretching forward toward -y.

const lacquer = "#a71920", red = "#c52b2b", bright = "#df4938";
const darkRed = "#75151c", gold = "#d6a54c", paleGold = "#f2cf76";
const wood = "#80502b", lightWood = "#a8733b", darkWood = "#4b2b20";
const black = "#202327", charcoal = "#34383b", roofLight = "#484a48";

// Carriage frame and raised floor.
box(15, 19, 9, 33, 35, 12, darkRed);
box(16, 19, 12, 32, 34, 13, lacquer);
box(15, 19, 9, 33, 19, 10, gold);
box(15, 34, 10, 33, 35, 13, gold);
box(17, 18, 8, 31, 23, 9, darkWood); // front footboard
box(18, 17, 9, 30, 19, 9, gold);
for (let x = 18; x <= 30; x += 3) {
  box(x, 19, 10, x, 34, 10, lightWood);
}

// Lacquered front apron, side rails, and armrests.
box(15, 19, 11, 33, 21, 15, lacquer);
box(15, 19, 15, 33, 19, 15, paleGold);
for (const x of [15, 32]) {
  box(x, 21, 12, x + 1, 34, 18, lacquer);
  box(x, 21, 18, x + 1, 33, 19, gold);
  box(x, 22, 19, x + 1, 32, 20, darkRed);
}
box(16, 34, 14, 32, 35, 25, darkRed);
box(17, 34, 15, 31, 34, 24, red);
box(16, 34, 25, 32, 35, 25, gold);

// Two plump, separately padded seats and back cushions.
for (const [a, b] of [[18, 23], [25, 30]]) {
  box(a, 23, 14, b, 31, 16, darkRed);
  box(a, 23, 17, b, 30, 18, red);
  box(a + 1, 24, 19, b - 1, 29, 19, bright);
  box(a, 31, 17, b, 33, 24, red);
  box(a + 1, 30, 20, b - 1, 30, 23, bright);
  box(a, 31, 24, b, 33, 24, darkRed);
}
box(24, 23, 17, 24, 33, 24, gold);
box(18, 33, 17, 30, 33, 17, gold);

// Exposed axle beneath the carriage.
box(9, 25, 10, 39, 27, 12, darkWood);
box(14, 25, 12, 15, 27, 13, gold);
box(33, 25, 12, 34, 27, 13, gold);

// Long wooden shafts, angled subtly upward toward the carriage.
for (const x of [18, 30]) {
  line(x, 1, 6, x, 20, 8, 1, wood);
  line(x, 3, 7, x, 19, 9, 0, lightWood);
  box(x - 1, 0, 6, x + 1, 2, 7, gold);
  box(x - 1, 18, 7, x + 1, 22, 9, darkWood);
  box(x - 1, 19, 9, x + 1, 20, 9, gold);
}
line(18, 9, 7, 30, 9, 7, 0, darkWood);

// Folding canopy supports: the front stays open to display the seats.
for (const x of [16, 32]) {
  for (const y of [20, 35]) {
    line(x, y, 18, x, y, 29, 0, darkWood);
    box(x, y, 19, x, y, 20, gold);
  }
}
box(17, 36, 18, 31, 37, 28, black);
box(17, 36, 18, 17, 36, 27, charcoal);
box(31, 36, 18, 31, 36, 27, charcoal);
for (let z = 20; z <= 27; z += 4) {
  box(18, 37, z, 30, 37, z, charcoal);
}

// Arched black fabric, with distinct transverse folding ribs.
for (let x = 15; x <= 33; x++) {
  for (let y = 19; y <= 36; y++) {
    let top = Math.round(35 - 0.045 * (x - 24) ** 2 - 0.016 * (y - 27) ** 2);
    if (y === 19 && (x <= 17 || x >= 31)) top += 2; // upturned front corners
    const shade = rand() < 0.12 ? roofLight : charcoal;
    set(x, y, top - 2, black);
    set(x, y, top - 1, black);
    set(x, y, top, shade);
  }
}
for (const y of [19, 23, 27, 31, 35]) {
  for (let x = 15; x <= 33; x++) {
    let top = Math.round(35 - 0.045 * (x - 24) ** 2 - 0.016 * (y - 27) ** 2);
    if (y === 19 && (x <= 17 || x >= 31)) top += 2;
    set(x, y, top + 1, y === 19 ? darkWood : roofLight);
  }
}
for (const x of [15, 33]) {
  set(x, 19, 32, gold);
  set(x, 20, 30, gold);
}

// A wheel is built entirely inside its own spinning part.
function wheel(name, cx) {
  part(name, [cx, 26, 11]);
  const cy = 26, cz = 11, radius = 11;
  for (let i = 0; i < 12; i++) {
    const a = (i * Math.PI * 2) / 12;
    line(cx, cy, cz,
      cx, cy + Math.cos(a) * 9.5, cz + Math.sin(a) * 9.5,
      1, i % 2 ? wood : lightWood);
  }
  for (let i = 0; i < 144; i++) {
    const a = (i * Math.PI * 2) / 144;
    const yy = Math.round(cy + Math.cos(a) * radius);
    const zz = Math.round(cz + Math.sin(a) * radius);
    box(cx - 1, yy - 1, zz - 1, cx + 1, yy + 1, zz + 1, darkWood);
    set(cx - 2, yy, zz, wood);
    set(cx + 2, yy, zz, wood);
    const innerY = Math.round(cy + Math.cos(a) * 9);
    const innerZ = Math.round(cz + Math.sin(a) * 9);
    set(cx - 1, innerY, innerZ, gold);
    set(cx + 1, innerY, innerZ, gold);
  }
  cylinder(cx - 2, cy, cz, 3, 5, wood, "x");
  cylinder(cx - 3, cy, cz, 2, 1, gold, "x");
  cylinder(cx + 3, cy, cz, 2, 1, gold, "x");
  set(cx - 3, cy, cz, paleGold);
  set(cx + 3, cy, cz, paleGold);
  animate(name, { type: "spin", axis: "x", speed: 4 });
}
wheel("left wheel", 9);
wheel("right wheel", 39);
part("body", [24, 26, 11]);