Girih XR is a hands-only quasicrystal lab for Meta Quest, in the browser. Girih is the star-and-polygon geometry of medieval Islamic architecture. In 2007 Lu and Steinhardt showed in Science that the Darb-i Imam shrine in Isfahan (1453) carries a nearly perfect quasicrystal: ordered, yet never repeating, five centuries before Penrose. Girih XR lets you hold that idea in your hands.
1. The puzzle. The five girih tiles lie on a table in front of you. Pinch one, turn your wrist like a dial to rotate it in 36° steps, and set it in its place. Fill every place and the hidden girih lines light up across the pattern. Decoy tiles teach you to read the shapes. Seated, no controllers, no reading needed; progress is saved.
2. The endless dive. Every girih tile is replaced by smaller girih tiles, the way the Darb-i Imam pattern nests a small girih inside a large one. Pinch with both hands and pull apart to dive. Coordinates are renormalised at every level, so you can go hundreds of levels down (over 10^84× magnification) with no seam and no loss of precision.
3. Mixed reality. Look at a real wall or table: a gaze ring finds the surface (WebXR hit-test) and one pinch pins the endless girih flat onto it, facing the room. The two-hand dive works there too.
4. The Quasicrystal Lab. The tiling is computed live as a slice of a 5-dimensional lattice (de Bruijn's pentagrid). Pinch and drag with the right hand to slide the cut: rhombs flip, yet the order never breaks. Raise the left hand to bend the girih lines (Hankin's method). The diffraction pattern is computed on the GPU on every change and shows the sharp ten-fold peaks that won Dan Shechtman the 2011 Nobel Prize in Chemistry. Missions ask you to solve a structure from its diffraction pattern alone, the way crystallographers do.
5. A lab for two. Share a link and someone in another city stands at the same crystal. Each control is a last-writer-wins register ordered by a Lamport clock, so simultaneous turns still converge (checked over 2000 random histories). Fingertips travel in crystal coordinates and appear on the other person's crystal, wherever each of you pinned it.
How we built it. Plain JavaScript and three.js, no build step, no runtime dependencies. Hand tracking via the WebXR
hand-tracking feature with pinch hysteresis; MR via immersive-ar and hit-test. The relay is a tiny dependency-free
Node server (SSE + POST). Every claim above has an automated test: geometry invariants, quasicrystal properties,
Playwright runs in Meta's Immersive Web Emulator (IWER, Quest 3) for hands, VR and MR (with a stand-in wall), and two
live browsers through the CDN for the lab for two.
What's next. Walk-along room-scale murals, a guided restoration of the Darb-i Imam pattern itself, and classroom sessions led by a teacher.
Islamic art here is geometry only: no images of living beings, no music, no chance.
Built With
- iwer
- javascript
- meta-quest
- node.js
- playwright
- three.js
- webxr
Log in or sign up for Devpost to join the conversation.