Turning a single prompt into a standalone 3D interactive math explorer (and how you can use the same workflow for any topic).
Have you ever tried to learn an abstract concept from a textbook page or a Wikipedia article? Did you stare at static diagrams wishing you could drag a slider to see what actually changes? Have you ever thought about coding a quick visualizer yourself, only to stop at project setup and 3D boilerplate?
With agentic environments like Google Antigravity, you can ask for intuition directly and get a custom interactive playground in minutes.
In this post, you’ll see how to…
- Turn a simple curiosity about prime numbers into a colorful, interactive 3D web app
- Let Antigravity plan, build, test, and visually polish the entire experience autonomously
- Reuse the same workflow to build intuition about almost any topic
…and do it all from just one prompt!
💬 One simple prompt
I started with an empty folder, opened Antigravity with Orchestrator mode selected, and typed one request:
/goal
I want to build intuition about prime numbers.
Build a colorful standalone HTML app with interactive 3D animations.
That’s it. No library choices, no UI wireframes, and no list of math theorems to implement.
Every piece of this short prompt pulls its weight:
-
/goal: Tells Antigravity this is an autonomous goal (plan thoroughly, verify everything, audit the output, and don't stop at a rough draft). - “build intuition about prime numbers”: Points the agent toward aha! moments rather than a dry chart. You don’t need to know the theorems upfront (the planner curates them for you).
- “colorful … interactive 3D animations”: Goes beyond flat plots so geometry, color, and motion carry the explanation.
- “standalone HTML app”: Guarantees a single HTML file you can open directly in any browser.
🔍 Under the hood
Once I hit Enter, Antigravity ran autonomously for 28 minutes. Here is the workflow it executed on its own:
- Environment & WebGL2 probe: The agent found Node.js and Chrome, then ran a quick headless check to verify WebGL 2.0. It caught an OS quirk right away: headless Chrome exits silently if desktop Chrome is running unless you pass an isolated Chrome user profile directory.
-
Curriculum & architecture planning: In Orchestrator mode, the planning model designed Prime Prism 3D from scratch (choosing five complementary 3D worlds, a precomputed math engine up to
10,000, a custom WebGL2 engine with instanced meshes, star halos, and 3D ribbons, a Number DNA Inspector, a guided tour in 8 steps, and optional Web Audio chimes). -
Clean modular assembly: The execution model kept five clean CSS and JavaScript modules inside its scratch workspace. A Node builder (
build.mjs) validated syntax, confirmed zero external URLs, and emitted one readableindex.html(167 KB, around4,550lines). -
Automated math & browser verification: It wrote a headless Chrome DevTools Protocol (CDP) test script (
verify_app.mjs) over native WebSockets. Openingfile:///.../index.html, it checked WebGL2 health, zeroconsole.errorevents, math assertions (π(100) = 25,π(1000) = 168,360 = 2³ × 3² × 5, Euler's streak of 40 primes,41 = 5² + 4², Goldbach pairs for100and210), orbit drag, search, and 10 screenshots across1440×900and1024×768.
Note: The project folder stays clean! Because the build sources and test scripts live in Antigravity’s scratch directory, the destination folder holds only one file:
index.html.
🎨 Updates: when the agent looks at its own pixels
Passing unit tests doesn’t guarantee a 3D app actually looks good. Because /goal keeps auditing until completion, Antigravity opened every rendered screenshot to inspect the result visually.
That visual review caught three bugs that code assertions missed:
-
3D labels clipping behind side panels: Floating landmark pills initially wandered under the side cards. The agent added safe margins around them and tightened tab spacing for
1024pxviewports. -
Jagged and striped 3D ribbons: On the Goldbach rainbow arches, the GLSL ribbon shader first showed sawtooth edges. Flipping two vertices fixed the quad winding, yet created dashed stripes along every arc! Inspecting the new screenshot, the agent traced the bug to
v_edgeglow interpolation flipping across each quad, negated the endpoint width to align extrusion with glow falloff, rebuiltindex.html, and verified it again. - Smoother 3D connectors: Twin prime connectors became smooth parabolic golden arches, and Euler’s curve was smoothed on Sacks’ polar spiral.
Watching an agent debug its own shaders from screenshots (without a single prompt from me) is where /goal shines.
🌈 Five 3D worlds to build prime intuition
The result is Prime Prism 3D. Each tab drops you into a live 3D experiment where numbers react to your mouse and sliders.
1. Sieve & Factor City
In Sieve Wave Cascade (shown at the top of this post), each prime p launches a colored shockwave starting at p² that knocks its multiples down into tiles colored by their smallest prime factor. Once the waves pass √N (12 for N = 144), no new composites can fall, and every surviving pillar lights up in gold as a guaranteed prime.
Flip to Factor Tower City , and every composite turns into a stacked tower of colored prime factor bricks (12 = 2 × 2 × 3) beside unbreakable golden prime monoliths.
2. 3D Spiral Vortex
Morph smoothly between Ulam’s square spiral, Sacks’ polar spiral, and a Golden Hex spiral. Turn on Mod 4 coloring to see Fermat’s Two Squares theorem: emerald primes (4k + 1) always equal a² + b² (41 = 5² + 4²), while coral primes (4k + 3) never do.
Switch to Sacks Polar and highlight Euler’s n² + n + 41: a green curve threads through 40 consecutive primes before hitting 41² = 1,681.
3. Modular Wheel Helix
Why do number theorists repeat 6k ± 1? Wrap integers around a cylinder of modulus M = 6, and four spokes lock immediately to multiples of 2 or 3 (forcing every prime above 3 onto two twin laser rails).
Slide the modulus to M = 30 (2 × 3 × 5), and 22 of 30 spokes go dark on the spot, eliminating 73% of all integers at a glance.
4. Harmonic Waves & Riemann’s Staircase
Switch to π(x) & Zeta Zeros and drag the harmonic slider from 0 to 30: rotating phase rings sculpt a smooth curve into sharp steps at every prime power (Bernhard Riemann's "Music of the Primes" made tangible). In the companion Divisor Waves mode, each prime p sends out a |sin(πx / p)| wave that crushes composites on the front rail while prime spires erupt wherever every wave misses zero.
5. 3D Goldbach Comet
Below, rainbow arches pair primes p + q = E for any even E ≤ 400. Above floats the Goldbach Comet: pull the E mod 6 slider to watch multiples of 6 (like 210 = 2 × 3 × 5 × 7, with 19 pairs) soar in a golden upper wing with roughly twice as many prime sums!
Antigravity also added thoughtful extras I never asked for: a Number DNA Inspector (1 to 10,000), 15 preset "Aha! Moments" , a Guided Tour in 8 steps, and optional Web Audio chimes.
🚀 Try it yourself
Because Prime Prism 3D compiles down to a single HTML file with zero external dependencies, there is nothing to install. Open it in your browser, spin the 3D worlds with your mouse or finger, click any integer to inspect its prime factors, or launch the guided tour:
👉 Open Prime Prism 3D in your browser
Note: You can also save the page (
Ctrl+SorCmd+S) asindex.htmlon your computer (it runs 100% offline).
🧭 Learning about anything: a reusable recipe
Prime numbers were just one test case. The exact same pattern works whenever a topic feels too abstract on paper:
- Ask for intuition, not a UI spec: Describe what you want to understand, not which widgets to draw. Let the planner curate the best mental models and experiments.
-
Combine Orchestrator +
/goal: Give the agent room to plan, run automated checks, inspect rendered screenshots, and polish visual details before stopping. -
Request a standalone HTML app: Zero setup, zero package managers, instant
file://opening in any browser, and effortless sharing as one file. - Iterate with a next prompt: Once your app exists, one more prompt can add a quiz mode, tune parameters, or localize the interface into multiple languages.
Want to try it right now? Drop one of these prompts into an empty folder:
-
Physics & Space:
/goal I want to build intuition about orbital mechanics, Hohmann transfers, and Lagrange points L4/L5. Build a colorful standalone HTML app with interactive 3D animations. -
Music & Signal Processing:
/goal I want to build intuition about Fourier series, overtones, and consonance. Build a colorful standalone HTML app with interactive animations and Web Audio. -
Distributed Systems:
/goal I want to build intuition about Raft consensus, leader election, and quorum failures. Build a colorful standalone HTML simulator where I can drop packets and kill nodes. -
Chemistry & Biology:
/goal I want to build intuition about enzyme kinetics and competitive vs. allosteric inhibition. Build a colorful standalone HTML explorer with live particle simulations.
🎯 It’s up to you!
Static diagrams show you the finished rule, but an interactive playground lets you feel why it holds. Next time a book chapter, research paper, or midnight rabbit hole sparks a question, drop a /goal prompt into Google Antigravity and see what explorer comes back.
🖖 Feedback, questions, or a fun interactive explorer you built? I’d love to read from you!
🪢 Follow me on Twitter/X or LinkedIn for more explorations…








Top comments (0)