All AI Labs
WebGL InteractiveThree.js 3D·Interactive 3D

3D Cat: Interactive Quadruped Robot Playground

The MicroDuck's sibling joins the lab: a robot kucing with glowing OLED eyes, a three-segment articulated tail, and real quadruped kinematics — walk, run, sit, pounce, and a synthesized meow.

Live Hardware-Accelerated Viewport

System Architecture & Engineering Concept

Kucing 3D is Lutfi's quadruped companion to the MicroDuck: a robot cat built from the same rounded-box PBR construction — chest and rear body segments joined by a spine joint, pointed ears with colored insets, a muzzle with a soft nose, glowing OLED iris eyes under glass domes, and a three-segment tail that sways, curls and lashes. A pure kinematics engine computes all four legs independently in cycle space: a lateral-sequence four-beat walk where each paw lands separately a quarter cycle apart and stays planted 68% of the cycle, a transverse gallop with spine flexion and a brief airborne suspension, a classic folded sit with the tail curled around its side, and a play pounce complete with the pre-jump butt wiggle every cat owner recognizes. Drive it on the treadmill or free-roam the arena with WASD, switch between four studio themes (Snow, Midnight, Ginger, Ash), jump between camera presets, and press Meow for a fully synthesized cat call — no audio files anywhere.

Mathematical Formulation / Heuristic:
Quadruped gait in cycle space: every leg splits its cycle into stance (paw planted, sweeping back at ground speed) and swing (paw folded, reaching forward), governed by a duty factor — 0.68 for the four-beat walk (footfalls rear-left → front-left → rear-right → front-right, body kept level) and 0.42 for the gallop (front pair vs rear pair, spine flexion A * sin(phi), brief all-paws-airborne suspension). Treadmill grid scrolls at true stride speed so planted paws never skate. Poses cross-fade via blendCatPoses over 0.35 s, exactly like the duck engine.

Implementation Highlights

  • Model (Cat3DRobot) shares the MicroDuck design system: the same createRoundedBoxGeometry generator, PBR materials, RoomEnvironment studio lighting and ACES tone mapping — two robots, one design language.
  • The head carries two OLED-style eyes: black display discs, emissive iris rings whose color follows the theme, slit pupils, and transmissive glass domes (MeshPhysicalMaterial with transmission).
  • Kinematics is a pure module (calculateCatPose) returning a 25-field pose including per-paw ground-contact flags, which the scene manager turns into soft paw-tap audio on each footfall.
  • The meow is synthesized with Web Audio: a sawtooth gliding 480 Hz up to ~745 Hz and back down through a sweeping bandpass with vibrato — the feline counterpart of the duck's FM quack.

Interactive Parameters

Walk / Run / Sit / Pounce
Four-beat lateral-sequence walk, transverse gallop with airborne suspension, folded sit with curled tail, and a play pounce with crouch, butt wiggle, leap and landing absorption
Treadmill / Free Roam
Treadmill walks in place on a scrolling grid; Free Roam leads the cat around the arena with W A S D / arrow keys
Camera Presets
Orbit freely, or jump to Follow, Head (OLED eye close-up) and Paws (leg articulation close-up)
Themes & Speed
Four themes — Snow, Midnight, Ginger (the default coat), Ash — recolor fur, iris glow, paw pads, inner ears and joint rings; speed runs 0.2x–3.0x
Meow & Shortcuts
Meow button (or Space / Q) fires the synthesized call; keys 1–4 switch Walk / Run / Sit / Idle
Core Engine LoopTypeScript
// Four-beat walk in cycle space (cat/kinematics.ts)
// Footfalls: rear-left -> front-left -> rear-right -> front-right,
// each paw planted for 68% of the cycle (duty factor).
const rl = cycleLeg(cycle + 0.0, 0.34, 0.55, 0.09, 0.68);
const fl = cycleLeg(cycle + 0.25, 0.34, 0.5, 0.05, 0.68);
const rr = cycleLeg(cycle + 0.5, 0.34, 0.55, 0.09, 0.68);
const fr = cycleLeg(cycle + 0.75, 0.34, 0.5, 0.05, 0.68);
// Gallop drops duty to 0.42 and flexes the spine once per cycle:
spineFlex: -Math.cos(phase - 0.7) * 0.14