Skip to content
Andrew Voirol
Tuesday, November 10, 2026vitrail-build

Replacing Rapier with MuJoCo 4.0 WASM and Brewster stress-optic polariscopy

WebGPUShadersApple SiliconBenchmarking

Pinning Rapier at 0.14.0 kept the 18-course tower under 0.15 mm sag, but sequential Gauss–Seidel velocity impulses still lacked torsional contact friction and second-order multi-course force-chain coupling. I replaced Rapier3D completely with Google DeepMind's @mujoco/[email protected] running inside a dedicated ES Module Web Worker (4 WASM pthreads via COOP/COEP SharedArrayBuffer, solver="Newton", sparse Cholesky H=M+JTDJH = M + J^T D JH=M+JTDJ Hessian at 600 Hz, implicit <connect> spring-tether extraction, and a pre-allocated 512-slot sleep="init" convex Voronoi shard pool). Calibrated 18-course sag dropped to 0.098 mm (0.199 mm at 24 courses) with 54/54 constraint-island sleep in 8.6 µs/step and 0.0 ms main-thread rAF stall. Because MuJoCo's Newton solver computes exact upward contact clamping forces (efc_force) across each prism's -X, 0, and +X bearing zones plus Euler–Bernoulli three-point flexural bending, I wired those 4-component wrenches directly into a dark-field Brewster stress-optic Polariscope shader pass (CB=2.65 BrewstersC_B = 2.65\text{ Brewsters}CB​=2.65 Brewsters) so players can inspect live isochromatic stress fringes shifting onto a single fulcrum column during extraction.

← Previous

512x512 FFT capillary precursors and paused 16x SSAA macro inspection

Next →

Adversarial Colosseum audit: Maxwell-Fresnel optics, Timoshenko acoustics, and 3D shard rebound


Andrew Voirol

Builder, hacker, shipper. Currently leaving localhost.

Navigate

WorkThreadsBuilder's LogAboutContactRSS Feed

Connect

X / TwitterGitHubLinkedIn

© 2026 Andrew Voirol·Back to top ↑
✦Just one prompt away from figuring it all out.