E = mc²F = G·m₁m₂/r²∇·E = ρ/ε₀ψ = A·eⁱ⁽ᵏˣ⁻ωᵗ⁾p = mvv_esc = √(2GM/r)λ = h/pS = k·ln(W)L = IωE_n = -13.6/n² eV∂ψ/∂t = -iĤψ/ℏR_μν - ½g_μν R = 8πG T_μν
02 · the workshop

Build your sim

You don't write code. You give the AI a physics concept and a set of instructions, and it builds the simulation for you. Your job is to pick the idea and guide it. That's the whole workshop.

Want to see what's possible first? Watch the live demo and read the physics.

Use whatever tools you want
This guide uses Antigravity + Taichi because it's the easiest path from zero to a working sim. But if you'd rather use Claude, ChatGPT, VS Code with Copilot, plain Python with pygame, three.js in the browser, Unity, Blender — go ahead. Pick what gets you to a beautiful simulation fastest. The only thing that matters at the end is what you submit.

How it works (3 steps)

  1. Open Antigravity (the app you installed in setup). File → Open Folder → make a new folder anywhere (name it whatever — my-sim, blackhole). Open it.
  2. Open the AI chat panel. Pick the cheapest model that gives sensible output — save the expensive ones for when you're stuck.
  3. Paste the builder prompt below, with your idea after the last line ("My idea:"). Hit Enter. Then just keep clicking the green buttons Antigravity shows (Run, Accept, Allow, Keep). Let the agent do its job. You don't need to read every line of code it writes.
Let it cook
The whole point of Antigravity is that you don't write or read code. You watch the agent write it and click Accept. If it crashes, paste the error back and say "fix this." That's the entire loop.
Watch your model limits
Every model in Antigravity has a usage limit, and the big ones run out fastest. Start on the smallest or "Fast" model; it handles most of this workshop fine. Switch up only when it's genuinely stuck (same error twice in a row). Your model limit is your fuel for the evening, so spend it where it matters.
watch: full workshop loop — paste prompt, hit run, keep clicking accept

Step 1 · The vocabulary cheat code: make an AI interview you

The better your words, the better your sim. But you can't learn a whole field before you build, so cheat: before you touch Antigravity, take this to ChatGPT (or Claude, or any chatbot) and let it build the vocabulary for you. It asks the questions, you stay the director, and at the end it hands you a rich description of exactly what you want. That description is what you'll feed the builder prompt below.

prompt
I'm about to ask an AI coding agent to build a [YOUR IDEA] simulation in Python with Taichi. My machine: [GPU model, or "no dedicated GPU"]. Don't write anything yet. First, interview me: ask questions one at a time about what I want to see, how it should move, and how I want to interact with it. Offer me the correct technical terms for the things I describe, so I learn the vocabulary as we go. When we're done, write one vivid, detailed paragraph describing my dream simulation, ready to paste into a coding agent.
Interview there, build here
Chatbots in a browser can't run code, see your errors, or iterate. Use them for the interview, then bring the paragraph they write back to Antigravity and build with the prompt below.

In a hurry, or already know what you want? Skip the interview. Grab an idea from the gallery below and go straight to the builder prompt.

Step 2 · The builder prompt

Copy this whole thing into Antigravity's chat. At the bottom, after "My idea:", paste the paragraph from your interview, or an idea card from the gallery below, or your own wild concept in your own words. Then hit Enter and let it cook.

prompt
You are a world-class creative coder and physics simulation artist working in Python + Taichi. I will give you a physics concept at the end of this message. Build me the most stunning, cinematic, interactive simulation of it that you possibly can.

THE GOAL

Something that makes people go "whoa" within five seconds of the window opening. Dense fields of glowing particles, real equations driving every motion, color that carries physical meaning. A screensaver from the future, powered by actual physics. Do not build the minimum version of my idea. Build the version you would show off. If you can think of a detail that would make it more beautiful, more physical, or more fun to play with, add it without asking me.

MAKE IT YOURS

- You choose the particle count, the palette, the composition. Push it as far as the hardware allows while staying smooth (30+ fps).
- Make it interactive: mouse to spawn or pull particles, SPACE to pause, keys to speed up and slow down time, R to reset. Print the controls to the console at startup so I know them.
- Use the real formulas (real gravity, real fields, real springs), then tune the constants until it looks incredible on screen. Name every constant clearly and comment what it means, so a physics student can read it.
- If my concept has a famous emergent phenomenon (spiral arms, tidal tails, resonance gaps, chaos), make sure it visibly shows up. That is the payoff.
- Extra render layers are welcome: a glowing central mass, an event horizon ring, faint field lines, particle trails, whatever serves the concept.

TECHNICAL GUARDRAILS (these prevent crashes, follow them exactly)

1. One single Python file, sim.py. Taichi for all simulation and rendering (NumPy allowed for setup). Taichi only supports Python 3.10 to 3.12. If the system Python is 3.13 or newer, do not fight it: run the file with "uv run --python 3.12 --with taichi sim.py" instead of plain python.
2. Start the file with:

   import taichi as ti
   try:
       ti.init(arch=ti.gpu)
   except Exception:
       ti.init(arch=ti.cpu)
       print("Running on CPU, expect lower FPS. Lower the particle count if it crawls.")

3. All per-particle state lives in Taichi fields (ti.Vector.field / ti.field). All physics updates happen inside @ti.kernel functions. Never store or update particles with Python lists or loops.
4. Semi-implicit Euler integration: update velocity from forces first, THEN position from velocity. This keeps orbits stable.
5. Add a small epsilon (around 1e-3) inside every distance, sqrt, and divide so nothing ever divides by zero.
6. The show never stops. If particles get absorbed or fly off screen, respawn them somewhere sensible so the screen stays alive forever.
7. Render with ti.ui.Window at 1280x800 or larger, per-vertex colors (never one flat color), near-black background so the colors pop.

WORKFLOW

Create the file, run it, and fix any errors yourself until the window opens and looks right. (If you cannot run code, output the complete file and I will run it.) After I see it, I will tell you what to change.

My idea:

Keep the guardrails
The technical guardrails in this prompt prevent specific crashes we've hit before. Dream as big as you want in the idea part, but don't trim the guardrails. If the output doesn't run, copy the error message back into chat and say "fix this." Don't start over from a different prompt.

Idea gallery: pick one (or write your own)

Each card is a starting point. Copy the title plus the sentence below it into the prompt. Or remix two: a galaxy collision inside a wormhole, lightning from gravity instead of voltage, whatever you want. Wild ideas are encouraged.

Black hole accretion disk
cosmic
A spinning disk of gas falling into a black hole. Particles glow hotter as they get closer. Some cross the event horizon and disappear forever.
Galaxy collision
cosmic
Two spiral galaxies pass through each other. Tidal forces tear long arms of stars into space. Real cosmologists call these 'tidal tails.'
Gravitational lensing
cosmic
Light from background stars bends around a massive foreground object. Show photons curving and creating multiple images of the same source.
Nebula expansion
cosmic
A supernova explosion sending a shockwave of glowing gas outward. Color by temperature: hot core, cooling edge.
Globular cluster
cosmic
A spherical swarm of ~10,000 stars all gravitating toward their shared center of mass. The cluster slowly contracts and breathes.
Cosmic web
cosmic
Dark matter filaments forming the large-scale structure of the universe — long strands of mass with empty voids in between.
Plasma jet from a quasar
cosmic
Two narrow beams of ionized particles shooting out perpendicular to an accretion disk. Magnetic field lines twist them into helices.
Pulsar lighthouse
cosmic
A spinning neutron star with two narrow radiation beams sweeping like a lighthouse. From a fixed observer, it pulses on and off.
Solar system formation
solar
A protoplanetary disk of dust and gas. Particles clump from gravity, planets emerge, gaps form where rings used to be.
Saturn's rings with shepherd moons
solar
Thousands of ring particles in orbit around Saturn. Two small moons on either side of the ring keep its edges sharp.
Comet tail in solar wind
solar
A comet flies past the sun. Its tail always points away from the sun (not opposite its motion) — that's the real physics.
Asteroid belt resonances
solar
Asteroids orbiting between Mars and Jupiter. Some orbital periods become unstable due to Jupiter's gravity — show the gaps form (Kirkwood gaps).
Tidal stretching
solar
A planet very close to a star or a moon close to a gas giant. Show it stretch along the gravity gradient — same effect that powers Io's volcanoes.
Lagrange points
solar
Show the 5 Lagrange points of a two-body system. Drop test particles near each — only L4 and L5 are stable, the rest drift away.
Three-body chaos
exotic
Three stars orbiting each other with no analytical solution. Tiny initial differences explode into completely different paths. Pure chaos, visually mesmerizing.
Wormhole funnel
exotic
An Einstein-Rosen bridge as a 3D throat connecting two regions. Test particles fall in one side and come out the other.
Aurora borealis
exotic
Charged particles from solar wind spiraling along Earth's magnetic field lines, glowing green and red as they hit the upper atmosphere.
Magnetic reconnection
exotic
Two opposing magnetic field lines snap together, releasing energy. The mechanism behind solar flares. Particles get flung outward at high speed.
Hawking radiation
exotic
Particle-antiparticle pairs forming near an event horizon. One falls in, the other escapes. The black hole slowly evaporates.
Pendulum wave
earth
15 pendulums of slightly different lengths, all swinging together. They desynchronize, then re-synchronize in waves of pattern.
Double pendulum chaos
earth
Two pendulums attached end-to-end. Trace the tip's path — it never repeats, and small changes in start create wildly different traces.
Lightning fractal
earth
A branching electrical discharge. Each step picks the direction of steepest voltage drop, with some randomness. The result branches like real lightning.
Smoke rising
earth
Buoyancy + turbulence. Particles rise from a heat source, swirl, curl into vortices, fade.
Sand in zero-g
earth
A blob of granular material released in microgravity. Mutual gravity slowly pulls it into a sphere — same way moons form.

After the first version runs

You'll get a window with your sim. It probably won't look perfect on the first try. That's fine. Open Antigravity's chat again and tell it what you want to change. Examples:

  • "make the particles brighter and trail-like"
  • "add a second black hole at the top-right with half the mass"
  • "color particles by their speed instead of distance"
  • "add 5x more particles"
  • "the orbits look unstable, fix the integrator step size"
  • "make the background dark navy with subtle stars"

Each round, Antigravity edits the file. You hit Run again. Repeat until it looks like something you'd post on Instagram. That's the whole iteration loop.

A good sim has
Real physics under the hood, dense smooth motion, color that means something, and a moment where you go "huh, that's actually beautiful." If you've got that, you're done.

Push it to GitHub

Once your sim looks good, upload the folder to GitHub so we (and everyone else) can see the code.

  1. In your browser, go to github.com/new. Give the repo a name. Pick Public. Skip the README + gitignore + license — just click Create repository.
  2. GitHub shows you a page with a URL like https://github.com/<you>/<repo>.git. Copy it.
  3. Back in Antigravity's chat, paste: "initialize git in this folder, commit everything, and push it to <paste your repo URL>". Hit Enter. Approve every button — install prompts, credential prompts, etc.
  4. On first push, Git will open a browser window asking you to log in to GitHub. Log in. Approve. Come back to Antigravity — it'll finish the push.
  5. Refresh the GitHub page. Your files should be there.
If Antigravity fumbles the git commands
Run these yourself in the terminal at the bottom of Antigravity. Replace the URL with yours:
git init
git add .
git commit -m "first sim"
git branch -M main
git remote add origin https://github.com/YOU/YOURREPO.git
git push -u origin main
First push pops open a browser for GitHub login. Log in, approve, done.

If it breaks

  • Window opens then closes instantly: paste the error from Antigravity's terminal back into chat: "this crashed, fix it."
  • Black window, nothing rendering: likely a coordinate issue. Say "the canvas is black, particles are off-screen."
  • Runs at 2 fps: say "this is too slow on my CPU, reduce particle count to 1000 and use smaller radius."
  • Antigravity refuses or hits a rate limit: switch to a different model in the chat picker. Or fall back to claude.ai / chatgpt.com in your browser, paste the master prompt + idea there, and copy the code into a file in Antigravity manually.
  • Stuck anywhere else: ask in chat.