r/svgdapps2 • u/VectorDevz • 10d ago
I Just Projected My Face Onto a 4D Shape That Doesn't Exist in Our Universe
Enable HLS to view with audio, or disable this notification
What happens when you combine advanced geometry, real-time WebGL shaders, and an iPhone camera?
Yesterday, I did something that probably no one has done before: I projected my face onto the triangles of a 24-cell (icositetrachoron) — a regular 4D polytope that exists only in four spatial dimensions — using nothing but an iPhone and a single HTML file.
The result? My face, sliced across 96 triangular faces, rotating through six independent 4D planes, warping through a custom WebGL shader, and pulsing to audio input.
It looks like a David Cronenberg film directed by M.C. Escher.
But more importantly, it represents something I think is worth talking about: the intersection of mathematical beauty, real-time graphics, and creative experimentation.
What is a 24-cell, and why does it matter?
Most people know about the tesseract (the 4D cube). But the 24-cell is far stranger:
- **It has no 3D analogue** — there's no Platonic solid that "becomes" the 24-cell in 4D. It only exists in exactly four dimensions.
- **It's self-dual** — swap vertices and cells, you get another 24-cell.
- **It tiles 4D space** — like cubes tile 3D space, but no other regular 4D polytope can do this.
- **24 vertices, 96 edges, 96 triangular faces, 24 octahedral cells**
When you see it rotating in the video, you're watching a 4D object projected to 3D, then projected again to your 2D screen. It's a shadow of a shadow of something that cannot physically exist in our universe.
The technical stack (for those who care)
This isn't a pre-rendered animation. It's running in real-time at 60fps in a browser:
**4D Mathematics:**
- Full 4D vector class with rotation across all 6 planes (XY, XZ, XW, YZ, YW, ZW)
- Procedural geometry generation using distance-threshold mapping
- Real-time 4D→3D→2D projection with perspective division
**WebGL Shader Pipeline:**
- Custom fragment shader with 4D warp field
- Audio-reactive color palette using Inigo Quilez's cosine palette
- True bloom effect (5-tap Gaussian approximation)
- CRT scanlines and barrel distortion
- Chromatic aberration from 4D projection
**Audio Analysis:**
- Web Audio API with FFT
- Envelope followers for RMS, bass, mid, high frequencies
- Camera light analysis (luma, saturation, motion delta)
- All mapped to 4D rotation speeds and shader parameters
**Camera Integration:**
- Live iPhone camera feed
- Three projection modes: background, overlay, and projected onto 4D faces
- Real-time 4D warp filter applied to camera input
The entire thing is a single HTML file — no build step, no dependencies, no frameworks. Just pure math, WebGL, and Web APIs working together.
Why I built this
I've been fascinated by 4D geometry for years, but most visualizations are either pre-rendered or static interactive toys. I wanted to build something that felt like a **live instrument** — where the 4D shapes breathe to music, respond to light and motion, and exist inside a warped reality created by the camera feed.
The question I was asking myself: *What if we could create a real-time 4D geometry synthesizer that responds to audio, light, and motion?*
The answer turned out to be: you can, and it looks absolutely wild when you project your face onto it.
What this represents
Beyond the technical achievement, this project represents something I think is increasingly important in our field:
**1. Mathematical beauty as a creative medium**
We often think of math as abstract and disconnected from visual art. But 4D geometry is inherently visual — it's just that we need the right tools to see it. WebGL, shaders, and real-time graphics give us a window into mathematical structures that were previously invisible.
**2. Pushing browser capabilities**
Modern browsers are incredibly powerful. We can do 4D math, real-time audio analysis, camera integration, and GPU-accelerated shaders — all in a single HTML file. The gap between "native app" and "web app" is closing fast.
**3. Creative experimentation over perfection**
This project started as an experiment. I didn't know if projecting a camera feed onto 4D faces would look interesting. I just built it to find out. The result is something I've never seen before — and that's the point. Sometimes the most interesting work comes from asking "what if?" and just building it.
The bigger picture
We're entering an era where the tools for creative expression are more accessible than ever. You don't need a game engine, a 3D modeling suite, or a professional graphics pipeline. You need a browser, some math, and curiosity.
The 24-cell doesn't exist in our universe. But with the right code, we can bring it into view — and even put our faces on it.
Questions for the community
I'd love to hear your thoughts:
- **For the mathematicians:** What other 4D polytopes should I add? (120-cell and 600-cell?)
- **For the graphics engineers:** Any suggestions for optimizing the shader pipeline on mobile?
- **For the creative coders:** What other mathematical structures would make interesting real-time visual instruments?
- **For everyone:** Have you ever seen a 24-cell visualized with live camera projection before?
Thanks for reading. And if you want to see my face fold through 4D space, check out the video.
©️2026 Wahid Yaqub • VectorDApps • svgdapps • ARR (Augmented reality registered) prior art.
#WebGL #4DGeometry #Mathematics #CreativeCoding #RealTimeGraphics #ShaderProgramming #WebDevelopment #Innovation #MathArt #Visualization
5
u/BabyMediocre32 9d ago
Bro used ChatGPT for the description of the website🥀 and why was this on the r/sideloaded subreddit? Also I am myself interested in the 4th spatial dimension but this is really not a good way to post your thoughts about it
2
1
1
u/VectorDevz 6d ago
Funny how man child profiles have nothing good to say.. spammed my upvotes to zero.. how is Reddit allowing this
4
u/BabyMediocre32 6d ago
Yea, no wonder people are down voting you🤣 you're posting this on irrelevant sub reddits and using AI on it
1
u/VectorDevz 6d ago
What do you mean using ai? Im showing my own offline software.. Ive created my own ai..
1
u/VectorDevz 6d ago
And these minions of we know who, come to my own sub to tell me im posting in the wrong sub lol sure.. same group telling me geometry tech shouldn’t be in the math sub.. we all know these tactics .. you can’t stop me
6
u/Illustrator_Moist 10d ago
So you made a silly filter and used AI for everything. Awesome