phi

Learn by Building

Not tutorials. Real projects.

1Pick a Project

These three are drawn live in your browser, by the same code you'd be writing.

Gravity Simulator

relativityorbitsc++
Build your own

Black Hole Renderer

ray tracingglslgeodesics
Coming soon

Quantum Atom

wave mechanicsorbitalssampling
Coming soon

2Learn Real Skills

Nothing here is on the list because it sounds impressive. Each tier is what the one above it needs.

start0102030405MathCodevectorscalculuspolar coordinatesthe render loopfloating-pointerrornumericalintegrationRunge-Kutta 4vertex buffersGLSL shadersGPU parallelismNewton's gravityKepler's orbitsconservation ofenergythe metric tensorray marchinggeneral relativitygravitationallensingSchwarzschildradiuscomplex numbersSchrödinger'sequationprobabilitydensitystart hereMathMathEverything on the left of theboard grows out of this.CodeCodeEverything on the right of theboard grows out of this.vectorsDirection and distance in onething you can add and scale.calculusHow fast something is changing,at one exact instant.polar coordinatesA position as a distance and anangle, the way orbits think.the render loopClear, draw, show, repeat, sixtytimes a second, forever.floating-point errorComputers round every number,and the crumbs pile up.numerical integrationWalking a curve forward in smallstraight pieces.Runge-Kutta 4Four trial slopes averaged intoone step that barely drifts.vertex buffersA block of raw floats handed tothe card once, not every frame.GLSL shadersA small program that runs onceper pixel, on the card itself.GPU parallelismThe same instruction running ona few thousand things at once.Newton's gravityEvery mass pulls every other one,weaker with the square of range.Kepler's orbitsWhy an orbit is an ellipse, andwhy it speeds up close in.conservation of energyKinetic plus potential shouldn'tchange. When it does, you have a bug.the metric tensorThe rule for distance when thegrid itself has been stretched.ray marchingStepping a ray forward by howfar the surface can't be.general relativityGravity as curved spacetime: astraight line that looks bent.NASA / ESA Hubblegravitational lensingMass bends the light behind it,so one star arrives twice.NASA / ESA / STScISchwarzschild radiusThe radius where getting outwould take more than light speed.complex numbersA number that also carries arotation. Every wave runs on them.Schrödinger's equationThe rule a particle's wave obeys,and what fits inside an atom.probability densitySquare the wave and you getwhere the electron actually is.

Scroll sideways to follow the branches.

Start at the bottom and keep going until one of the projects up the page is running on your own machine. Hover anything for what it actually is.