Gravity simulator
The Tadpole
A spiral with a single tail of stars 100 kpc long. Run under gravity to the stage seen on the sky. Zoom into its stars.
Places to visit
Zoom out of any scene to reach the galaxy it lives in and the cosmic web beyond it, or go straight there.
- The cosmic web Filaments of galaxies hundreds of millions of light-years long, clusters and voids.
- The Milky Way Our galaxy, with the Sun and its neighbours in their real places.
- Andromeda The nearest large galaxy, where it is seen from the Sun, with M32 and M110.
- The Large Magellanic Cloud The Milky Way’s largest satellite, with the Small Cloud and the Magellanic Stream.
- M87 and the Virgo cluster The giant elliptical with its jet, at its real distance and direction in the web.
- The Antennae Two spiral galaxies in collision.
- The Mice A pair of galaxies drawing out long tidal tails.
- The Whirlpool A grand-design spiral with its companion at the end of an arm.
- The Cartwheel A head-on collision leaving an expanding ring of new stars.
- Arp 273 A spiral whose arms a companion’s plunge threw into a rose.
- The Tadpole A spiral with a single tail of stars 100 kpc long.
- Stephan’s Quintet A compact group: one galaxy crashing through three others, a fifth waiting to fall in.
The controls
What every button, key and panel does, from launching a planet to flying a spacecraft.
On the canvas
The buttons down the left side choose what the cursor does, and the keys 1 to 9 pick them too: Select, then Planet, Moon, Comet, Spacecraft, Star, Black hole, Dust and Measure.
- Select: click or tap any body, star or planet, to open it in Bodies, and drag one to move it. Dragging empty space pans the view.
- Launch a planet, comet or spacecraft: press on empty space, drag away from where you want it to go, and let go. It sets off relative to whatever it starts beside. At any zoom, a pull of about 150 pixels gives it the speed of a circular orbit there: round the Sun from out among the planets, or round Earth when you zoom in beside it. Near a binary star, if you start farther from both stars than half their distance apart, it circles the pair, setting off relative to their centre of mass, which stays put while the two stars swing round it. Pull further and it flies faster. While you drag, a dotted line predicts its path for about one orbit, and the body is shown at the size it will be drawn. Once it is wide enough to see, a faint band along the path shows that width, so you can see what it will touch.
- Add a moon: in Realistic mode, click near a planet to set a moon on a circular orbit round it, or pull back to launch one at your own speed. It starts beside the nearest planet in the direction you clicked, inside the planet's Hill sphere, the region where the planet's pull beats the star's; zoom in to see it. In Simple mode planets pull on nothing, so the tool is off there.
- Add a star or black hole: click to set one down at rest, or pull back and let go to throw it. Either way it is free to move, and falls towards whatever is heaviest. A black hole weighs as much as four stars. The scene holds up to a hundred.
- Release dust: pull back and let go to send a puff of 300 grains, aimed the same way as a launch, or click to set one on a circular orbit round what it starts beside. Each grain gets an extra nudge of a few per cent of the launch's speed in a random direction, so the puff stretches along its orbit into a stream, as a comet's dust does into a meteor stream. Grains that strike a planet flash as meteors, and Bodies counts them under Dust swept up. Aim a puff across Earth's path to make a meteor shower of your own.
- Measure: drag between two points to read the distance between them.
- Move a star: drag it. Let go while still moving and the star keeps that speed, so you can throw it; hold it still before letting go and you set it down at rest. While the simulation is paused, dragging changes only where the star is and keeps its velocity for when you resume.
- Edit a star: click, tap or right-click it. Right-click opens a planet too. With the canvas focused, Enter opens the star under the pointer, or the first star. Delete or Backspace removes the star under the pointer, or whichever body you picked in Bodies.
Moving around
- Zoom with the mouse wheel, by pinching two fingers, with the + and − keys, or with the magnifier buttons along the bottom. The wheel zooms about the pointer, so aim at what you want to look at. In 3D it moves you towards whatever is under the pointer, a body or else the plane of the orbits, and the view then turns about that spot, so you can travel out to a distant star by pointing at it and scrolling. In the flat view, zooming in by a body zooms onto it and draws it towards the middle. While you follow a body, zooming stays on it.
- Travel to a body by double-clicking or double-tapping it: the view follows it and glides in until its moons fill the view, or, with none, the space round it. Pan to stop following.
- Pan by dragging with the middle mouse button, with Shift held, or with one finger and the Select tool. In the flat view the right button, two fingers and the arrow keys pan too.
- Follow a body from its editor in Bodies to keep it in the middle of the view as it moves. View offers three ways to follow it. Centred keeps it in the middle and draws trails through space, so its moons trace wavy lines along its path. Trails round it, the usual one, draws trails as seen from the body instead, so a planet's moons trace circles round it. Behind it turns on 3D and flies just behind the body, low over its orbit, turning as it turns so you look where it is heading. It draws trails through space, since seen from a moving body everything else would trace loops round it. You can still turn the view by hand; Behind it keeps your turn relative to the orbit as it follows. It rolls with steep and polar orbits, keeping the same side of the orbit up, and eases upright when you leave it. For a binary star, Follow the pair centres the moving centre of mass; Fit includes both stars and their surrounding planets. The button beside the name of the body you follow shows which one is on; click it, or press the C key, to step to the next. Fit (or the 0 key) frames the scene: it centres the view on the stars and planets and zooms until they fill it, and stops following. While you follow a body with moons, Fit zooms in on it and its moons instead and keeps following. Zoom reaches a hundred thousand times, far enough to watch the Moon circle the Earth in the Solar System. Bodies grow as you zoom in, and once a star or planet is larger at its true size than its marker, it is drawn at its true size. Fit leaves out a body flung far beyond the rest, so one runaway planet cannot shrink everything else to a dot.
- True sizes, in View, draws every body to scale at every zoom, as the Realistic mode's distances already are. Space is mostly empty: across the inner Solar System the Sun is under a pixel and Earth a hundredth of one, so a faint ring marks each body too small to see. A black hole is drawn as its shadow at its horizon's true size, 3 km for each solar mass, enlarged with the stars. Follow Earth and zoom in to see it as it is, with the Moon 60 Earth radii away. Below it, two sliders enlarge stars, and planets and moons, from 1 to 1,000 times their true size, with True sizes on or off. Each kind keeps its true proportions within itself, though not with the other or with the distances: with planets 10 times, Jupiter is as wide as a true-size Sun. Collisions still go by true sizes. The bar at the bottom right shows the scale at the centre of the view.
- Press ? to see every keyboard shortcut. The Explorer has its own list.
Time
The buttons along the bottom pause the simulation (Space) and run time backwards (R); the
speed slider under Physics sets how fast it runs. In Realistic mode they also show the
date, for the Solar System presets, or the days and years since the scene began. Click it
to change the speed with the same slider as in Physics, and for the Solar System to set
another date, from 1800 to 2050, or Now; a link can carry the date too,
as /fun/gravity/milky-way/solar-system?date=2026-08-12 or date=now. Run backwards, Realistic mode retraces its orbits almost exactly,
because its integrators treat the two directions of time alike. Mergers and swallowed
planets cannot be undone that way, so a scene that had a collision changes on the way
back.
Undo (Ctrl+Z) and Redo (Ctrl+Shift+Z), beside them, step through your own edits instead: launches, dust, bodies added, moved, edited or removed, the law, the mode, presets and Clear. Each undo puts back the whole scene as it was just before that edit, its time included, so the bodies jump back to where they then were. A quick run of edits to one thing, a slider dragged or a name typed, undoes as one.
Flying a spacecraft
A spacecraft is a planet with an engine, drawn as an arrowhead along its motion. Make any planet one from its editor in Bodies, or use the probe in the Solar System. With a spacecraft picked, the Engine buttons fire a burn: an instant change of speed of the size you set. Speed up and Slow down fire along or against its motion, Push out and Push in fire away from or towards what it orbits, and Tilt up and Tilt down fire out of its orbital plane. With the canvas focused, W, S, D, A, E and Q do the same. The orbit readout updates at once, so you can see where a burn will take you before you get there.
The toolbar
- Presets loads one of the systems below, or a scene from a shared link. It also saves the scene as a file, dust and all, and opens such files: pick one, or drop it on the box where links are pasted.
- Controls opens the panel with the Bodies, Physics and View tabs. Every setting lives there, and the next three sections go through them.
- Presets also keeps your scenes: name the scene on screen and Save, and it stays in this browser, dust and all, to open, rename or delete later. Another browser keeps its own list; to move a scene, save it as a file or share it.
- Share copies a link that rebuilds this exact scene: every star and planet, where it is and how fast it moves, with the scale, law, speed and view. Links are compressed, so the whole Solar System fits in about 1,200 characters. A link carries dust only while it stays under 8,000; the asteroid belt alone would take 47,000, so for that, save a file.
- Image downloads the scene as a picture, at the screen's resolution or drawn afresh at HD or 4K across, as PNG, JPEG or WebP, without the controls.
- Video records the scene as it plays, without the controls, until you press it again, then downloads the clip: MP4 where the browser can write it, WebM otherwise, at the screen's size up to 1,920 pixels across and 30 frames a second. It is made in the browser and goes nowhere else. The Explorer's web and galaxies record the same way.
- Photo view, the aperture in the bottom bar or the P key, shows the scene as a camera would take it: the grid, curvature, labels, trails, guides and clock rates are hidden, and in the Explorer the curvature sheet and marks. Your settings for each are kept, and come back when you turn it off or change one of them.
- Clear empties the scene: stars, black holes, planets, dust, trails and the clock. The scale, law, speed and view stay. Add a star with the tool rail, or load a preset.
The bar along the bottom holds what you reach for while watching: pause, run backwards, the date, zoom, Fit, the 3D turn control and the body you are following.
Bodies
+ Star adds an anchor: a star that stays where you put it (until you drag it) while everything else falls towards it. You can have up to a hundred, two thousand planets and a hundred thousand grains of dust; each star costs more than a planet, so a crowded scene runs slower. + Planet adds one on a circular orbit round the heaviest star, 1 AU out in Realistic mode, and picks it, so you can type in where it is or set its orbit. + 5 planets adds five small planets on near-circular orbits around the centre.
Below them is a list of every star and planet. Pick one to change its name, mass, position, velocity, size or colour, to freeze it in place, to make a planet a comet or a spacecraft, to make a star a black hole, or to remove it. For the body you pick it also reads out its orbit: what it circles, how far and fast it is going, the orbit’s size, shape, tilt and direction, and how long a lap takes, in simulated time and in seconds at the current speed. It works out what a body circles as the heavier body it is bound to on the smallest orbit, so the Moon circles Earth even though the Sun pulls on it harder. A planet round both stars of a binary, farther from each than half their distance apart, circles the pair and is measured from their centre of mass; each star of the pair circles the other. A change of what a body circles shows only once it has held for a moment, and the readout keeps the same rows throughout, a dash where one does not apply.
The list follows the same rule: each body sits under what it circles, so the Moon is under Earth, and the arrows open and close each branch. More than eight comets, spacecraft or stars under one body fold into a single row, as do more than 24 planets or moons. The search box above it finds bodies by name or by kind, such as comet, moon or black hole, and shows what each one circles; Enter picks the first.
In Realistic mode, Set its orbit puts the body you picked on an orbit you type in: what it circles, the orbit's size in AU and its eccentricity, and in degrees its inclination, the longitude of its ascending node, how far round from there it comes closest (the argument of periapsis), and where on the orbit it starts (the mean anomaly: 0 at the closest point). It opens on the orbit the body is on now, so Mars's shows Mars's real elements. Angles are measured as for the planets: no inclination goes round anticlockwise. Distance to reads out how far the body you picked is from another, how long light takes to cross the gap, and how fast they are closing or parting, live as they move. Over the last minute plots its distance from what it circles, its speed or its eccentricity, read five times a second. Find the closest approach runs a copy of the scene ahead, up to 300 years, to say when the two next pass closest, how close and how fast; Pause there runs on and stops within a frame of it. From the Solar System it finds Mars's close pass of 16 July 1986, 0.40 AU from Earth. The copy leaves out collisions and dust.
Every change takes effect as you make it, except position and velocity. Those sit in their own box: edit them, then Apply, so a half-typed number never moves the body. Refresh values reads where the body is and how fast it moves now. Names and colours change without disturbing the run; a new mass, size or type starts the trails afresh.
Looks like offers what suits the body's type. A planet can be drawn as any planet, dwarf planet or large moon with a map, or as a made-up rocky, icy or gas world in its own colour; a comet as its two-lobed nucleus or a round icy or rocky one; a star as itself, coloured by its temperature, or as the Sun's map. Black holes and spacecraft have one look each. Changing the look leaves the mass alone, and a true radius set by hand wins over the world's.
Physics
Mode picks Simple, a playground in screen units with softened close passes, or Realistic, with real masses, distances in AU and time in days, where every body pulls on every other. Every built-in preset opens in Realistic. Simple remains available for custom sandboxes and older saved scenes. The speed slider sets how fast simulated time passes, and Load Sun–Earth example starts a real-scale Sun and Earth. Below these is the law of gravity: Newton, Einstein or Custom, which the next section explains. In Realistic mode under Newton’s law, a small graph tracks how far the total energy has drifted, which shows how accurately the simulator is integrating.
Integrator chooses how Realistic mode steps its bodies through time. Each works out the pulls, moves the bodies a little, and repeats; they differ in how short a step each body takes and how they bend it to fit the orbit.
- IAS15, the usual one, fits each step with a polynomial of fifteenth order and picks the step's length to keep the error near the limit of the computer's arithmetic, under any law. Between its steps it reads positions off that polynomial rather than stopping short, so slowing the simulation down costs it almost nothing. In most scenes it is as quick as the others; only fast moons, such as Jupiter's, make it two or three times slower.
- Block steps gives each body steps as short as it needs: Io takes sixteen for each one Neptune takes, so one fast moon doesn't hold back the rest. It is the quickest where moons circle fast, works under every law, and keeps every body well within a pixel of IAS15's path.
- Wisdom–Holman moves each body along its exact orbit round the central star, the way planetary scientists integrate the Solar System, and steps only the pulls between planets. Each planet and its moons take short steps of their own, so the planets can step together in long ones: it runs a little faster than Block steps, with the planets a thousand times more accurate. It needs Newton's law and one dominant star; elsewhere Block steps takes over, and the panel says so.
- Leapfrog moves every body with the same step, as short as the closest pair needs. Its energy stays steady for centuries, but every planet waits on Io, so it is the slowest wherever a fast moon circles.
With three or more stars, as in the choreographies, Block steps hands over to Leapfrog's fourth-order steps, which those delicate patterns need. The choice is remembered between visits.
View
- 3D, on at first, tips the view so you see the scene in perspective. Right-drag or middle-drag the canvas, drag the turn control along the bottom, or use the arrow keys to turn it. On a touch screen, drag two fingers to turn it and twist them to spin it round; flick and let go, and it turns on for a moment, as a globe would. The compass beside the turn control shows which way the view faces, its red end along the plane's up, and flattens as the view tips; click it to put the angle back as it started. Above, Edge-on and Below jump to those angles, and you can turn on past edge-on to look up at the plane from beneath. Spin turns the view slowly on its own. The Orbit and Screen buttons at the bottom of the cursor tools choose the launch plane in 3D. Orbit keeps a launch level with its primary. Screen uses the plane you see through the primary, so a vertical drag tilts the orbit without turning the view edge-on. A click that adds a circular moon uses that plane too. The choice is remembered; the flat view always launches level with the primary. A dragged star moves in the plane of the screen, at its own depth.
- The sky behind the scene is the real one: the 5,080 stars of the Yale Bright Star Catalogue down to magnitude 6, in their true colours, with fainter stars and the glow of the Milky Way gathering along the galactic plane. In the Solar System scenes they stand where they stand from the Sun: the plane of the orbits is the ecliptic, so the Milky Way crosses it at about 60°, near Sagittarius and Gemini. The sky turns as the 3D view turns, but zooming does not move it, since a star that far off does not shift as you come closer. Panning moves it a little, which real stars would not do, so you can feel the view slide.
- Every scene has the sky of where it is. The scenes outside the Milky Way, in the Playground and the black holes' host galaxies, show the view from their own place in their own galaxy: its disc, bulge and dust, as you see them on zooming out to it. A star system entered from a galaxy shows the same. Like the real stars, these skies turn with the view and bend round a black hole. Sky under View turns the sky off, for the clearest view of the bodies.
- Light, under View, shows a planetary scene in another band. In the infrared, near 10 µm, each world is drawn in false colour by the temperature it gives off, from near black at 30 K (kelvin, degrees above absolute zero) through magenta, red and yellow to white at 2,000 K. Bare rock is hottest under its star and cools through its night. Worlds with air, and giants with clouds, are even all round, at the temperature their star's light holds them at. At 10 µm a star's light lies on the long tail of Planck's law, so a cool star dims less there than a hot one. In the ultraviolet hot stars blaze, cool red dwarfs nearly vanish and worlds reflect little. The sky is left out in both. Nebulae and supernova remnants visited from the Explorer have bands of their own instead.
- A star's colour comes from its surface temperature, set in its editor. A star shines nearly as a black body, so its light follows Planck's law; the simulator weighs that spectrum by the CIE 1931 colour-matching functions, the measured response of the eye, to find the colour you would see. Under 3,500 K a red dwarf glows orange; the Sun, at 5,772 K, is nearly white, with a warm tint; above 10,000 K a star is blue-white. The editor shows the star's visible spectrum and where it peaks. A star without a temperature of its own takes that of an ordinary star of its mass in the long middle of its life. Its planets are lit in its colour. Disks and glows are drawn in stronger colours than they truly have, as photographs show them, and far stronger up close: the Sun is orange and a hot star deep blue, as in filtered pictures. An eye would see both nearly white, which True colours under View shows. When a star is small on the screen, its middle is overexposed to white, as in a photograph, and its colour shows round its edge and in its glow.
- A star's surface shows when you come close. Every part of it is drawn by how hot it is: deeper in colour where it is cooler, and paler where it is hotter. Broad currents of gas cross its surface with bright veins where they meet, and it boils with granules, the tops of convection cells that on the Sun last about ten minutes and here a few seconds. Active regions come and go, fixed on the surface and lasting a couple of minutes. Each is a group of sunspots, a dark core in a lighter rim, cooler and so deeper in colour than the surface round them, set in bright patches (faculae) strung with hot strands. Now and then one flares: two ribbons whiter than the disk brighten in moments and fade slowly. Past the edge stand tongues of flame and a fuzz of spicules, fine jets from the star's thin lower atmosphere. Where a region nears the edge rise prominences, strands of glowing plasma streaming outwards, coloured between glowing hydrogen's red and the star's own colour, nearer the star's. A flare throws a plume up among them that slows and fades. Round the star the pale streamers of its corona, the hot outer atmosphere, stand over the regions and along the equator, narrowing as they rise. The disk deepens in colour towards its edge, more for a cooler star, and a hotter star's surface is paler. Only the four largest stars on screen show their active regions, so a crowd of close stars stays quick. A star cooler than about 7000 K has a convecting surface. A hotter one is smooth, with no spots, flares or flames, and a giant shows a few huge cells, as the low gravity makes them larger. The bright network over the disk is what a filter shows; an eye would not see it. All this runs faster than the real thing and keeps pace with the simulation: faster at a higher speed, slower at a lower one, and stopped when paused. At the speed a scene opens at, a star's surface turns once in two and a half minutes, or the Sun would spin about once a second. A star whose real spin is slower than that turns at its real rate. It holds still if your system asks for reduced motion.
- Worlds: zoom in until a body is a few pixels across and it becomes a world, lit from its star, so you see its phase. The Sun, the planets and the Moon wear real maps; Earth has clouds, its cities' lights on the night side and a blue rim of air; Jupiter and Saturn are flattened at the poles; Saturn's rings cast their shadow on it and it on them. The mapped planets and moons turn at their true rates about their true poles, from the International Astronomical Union's figures, so on the Solar System's date Earth shows the face it showed then, and Uranus lies on its side. Moons and planets you add get a surface for their kind: rocky, icy or banded like a gas giant. The other large moons get generated surfaces, and the way they face is made up rather than taken from the date. Hyperion's chaotic tumbling is not modelled.
- Lasting paths leaves a lasting line behind every moving body in place of the fading trail. Clear paths wipes the lines drawn so far.
- Grid marks the flat plane in 3D, with a line from each body down to it to show its height. Turn it off for a clear view.
- Curvature bends the grid into a well round each star. Its depth is the gravitational potential, worked out from whichever law is in force, so a custom law digs a differently shaped well. It is on at first, and turning it on turns on the grid, where the sag shows. The sheet is part of the scene, so it zooms with everything else: zoom in on a star and its well grows to fill the view. The grid and curvature show only in 3D, so their switches are greyed out in the flat view. The section on curvature below says what the sheet does and does not show. Mesh sets how fine the grid is, and Depth how deep the sheet can sink; the lines turn from blue to gold as the sheet deepens. Sheet and Lattice choose how it is drawn. On the sheet, wells add, as potentials do: two close together sink deeper than either alone. Depth sets how far the sheet would sink if every mass sat at one point, so the scale holds as bodies move and merge, and a binary's two stars each sink half as far as one star of both their masses. In the Galaxy the sheet sinks under the whole disk, into the well of the galaxy's own pull, its stars, gas and dark matter, which outweigh the black hole at its centre thousands of times. The lattice runs lines through space every way, in a ball round the middle of the view, and pulls each point in towards each star by as much as the sheet would sink there, so the lines crowd into every well from all sides, above and below the plane as well as across it. Its lines ripple with gravitational waves and twist round spinning black holes, as the sheet does; Mesh sets how far apart they are.
- Clock rates, in either view, colours the plane of the orbits by how much slower clocks run there than far from every mass: a power of ten a band, from a part in a million million to stopped at a black hole's horizon. A clock at Earth's distance from the Sun runs slow by a part in a hundred million, one at the Sun's surface by two in a million. These are the true amounts, worked out from Newton's potential, which round a lone black hole gives Schwarzschild's √(1 − rs/r) exactly, where rs is the radius of the horizon; slowing the speed of light in Physics deepens them. In 3D the map lies on the plane of the grid, so it thins away as you turn the view edge-on.
- Orbit guides (or G) draws a dashed Hill sphere round each body that orbits another: the region, out to r·∛(m/3M) from a body of mass m circling one of mass M at distance r, where its own pull beats the heavier body’s tide and moons can stay. It also marks the five Lagrange points of the body you picked in Bodies, or else of the heaviest one that orbits something. There a light third body can keep its place relative to the other two: L1 and L2 either side of the body, L3 opposite it, and L4 and L5 sixty degrees ahead and behind, where Jupiter’s Trojan asteroids gather.
Every preset starts in Realistic with its own scale, speed and law. Older shared scenes keep their original mode and physics; changes apply to the scene on screen until you load another. The simulator remembers only how you like to look: Lasting paths, the 3D view, the grid and curvature. The view starts in 3D, and the presets built in three dimensions always open in it.
Laws of gravity
Newton, Einstein and laws of your own, then the lives of stars, gravitational waves, black holes and the curvature sheet.
The law in the Physics tab sets the force between every pair of bodies: Newton’s law, Einstein’s correction to it, a power law of your choosing, or one of four modified forms. Everything else stays the same: the masses, the speeds you launch with, the way stars merge. Watching the same system under a different law shows how much of what planets do comes from the exact shape of the force.
Newton
Two masses M and m pull on each other in proportion to each mass and in inverse proportion to the square of the distance r between them. G is the gravitational constant. The square comes from geometry: a star’s pull spreads over the surface of a sphere around it, and that surface grows as r².
Around a lone star this law gives Kepler’s three laws. Every bound orbit is an ellipse with the star at one focus. A planet sweeps out equal areas in equal times, so it speeds up near the star. And the time T for one orbit depends only on the orbit’s size a, its semi-major axis:
That the ellipse closes, bringing a planet back to the exact point where it started, is rarer than it looks. Change the force even slightly and the orbits stop closing, as the other two laws show.
Einstein
General relativity replaces Newton’s force with curved spacetime. Around one star, though, you can capture its effect on an orbit with a single extra term. h is the planet’s angular momentum per unit mass, its distance from the star times its sideways speed, and c is the speed of light. Near the star, where a planet moves fastest, the pull grows a little stronger than Newton’s. Each close pass then swings the planet slightly further round, so its closest approach, the perihelion, creeps forward by
per orbit, where e is the orbit’s eccentricity. For Mercury this adds up to 43 arcseconds a century. Newton’s law could not account for that drift, and Einstein’s 1915 calculation matched it.
With real light, Earth’s orbit would turn by about 0.00001° a lap, far too little to see. The Speed of light slider lets you slow light down to 50 km/s instead. At 200 km/s an orbit moving at Earth’s 30 km/s turns about 24° a lap; at 100 km/s, about 96°. The panel shows the figure as you slide.
This force reproduces the exact shapes of relativistic orbits around a single star that does not spin, including two of their oddities. Closer than 6GM/c², a circular orbit is unstable, and closer than 3GM/c² none exists at all. With slowed light these distances reach the planets: at 50 km/s in Realistic mode, circular orbits within about 2 AU of a Sun-like star are unstable. The force leaves out how relativity changes the timing along an orbit, and the slow inward spiral as orbits radiate gravitational waves unless those are switched on. Round a spinning black hole it adds frame dragging, which turns an orbit's plane about the hole's axis at the Lense–Thirring rate, and a light body follows Kerr's exact orbits, in the body's own time, at any spin and tilt and either way round. With several stars, the simulator applies the correction to each pair from their relative motion, which approximates the full many-body theory.
Custom
Custom gives you two sliders and a switch. The strength s scales G from 0.1 to 5 times its usual value. A planet at a given distance then needs √s times Newton’s speed to stay on a circle, and its year shortens by the same factor. Planets already moving at Newton’s speeds drop into ellipses when you raise G and drift outwards when you lower it.
The exponent n sets how fast the pull dies away with distance, from 1/r⁴ down to n = −1, a pull that grows with distance like a stretched spring. The factor (1 AU)n−2 keeps every law equal to Newton’s at one astronomical unit (in Simple mode, a quarter of the screen’s shorter side). Inside that distance a steeper law pulls harder than Newton’s and outside it pulls more weakly, so the force changes shape without the whole scene suddenly speeding up or stalling.
A planet on a circle needs a sideways speed whose square equals its distance times the pull, so circular speed varies with radius as . A planet on a nearly circular orbit swings in and out, and the angle it turns from its closest point to its farthest is
Newton’s n = 2 gives 180°: the farthest point lies opposite the closest, and the orbit closes after one lap. The spring gives 90°, an ellipse centred on the star. Any other exponent gives a rosette that never quite repeats. Joseph Bertrand proved in 1873 that these two laws are the only ones under which every bound orbit closes. From n = 3 the square root has no real value, and circular orbits are unstable.
| n | Force law | What orbits do |
|---|---|---|
| 4 | Gravity in five space dimensions | Circular orbits are unstable. A nudge sends a planet spiralling in or flying off. |
| 3 | Gravity in four space dimensions | The same instability. Ehrenfest used it in 1917 to argue that stable planets need exactly three dimensions. |
| 2 | Newton | Closed ellipses. Circular speed falls as 1/√r, so outer planets move slower. |
| 1 | Gravity in a flat, two-dimensional universe | Every circular orbit has the same speed. Others trace rosettes, turning about 127° from closest to farthest point. |
| 0 | A constant pull | Rosettes turning about 104° per half orbit. Circular speed grows as √r. |
| −1 | Hooke’s spring | Every orbit is an ellipse centred on the star, and every orbit, large or small, takes the same time. |
The flat speeds of n = 1 echo what astronomers measure in spiral galaxies, whose outer stars orbit about as fast as inner ones. Most explain that with unseen dark matter; a minority of theories, such as MOND, change gravity itself at very low accelerations.
The relativistic correction switch adds Einstein’s extra term to whatever law you build, so you can combine, say, a 1/r pull with relativistic precession.
Other forms of gravity
Custom’s Form menu swaps the power law for one of four laws that physicists have proposed or that real objects produce. Each one is Newton’s law with something added, so it matches Newton somewhere and departs from it elsewhere.
Fifth force (Yukawa). A new force, of strength α compared with gravity, that fades beyond a range λ:
Well inside the range, gravity acts 1 + α times as strong; well beyond it, Newton’s law returns. A negative α weakens gravity close in. Physicists have searched for such a force from millimetres to the distances between planets and found none, which limits α and λ. Orbits that straddle the range precess.
MOND. Mordehai Milgrom proposed Modified Newtonian Dynamics in 1983 to explain galaxy rotation curves without dark matter. Where Newton’s pull aN drops below a tiny threshold a₀, gravity becomes stronger than Newton’s:
Far out the pull fades as 1/r instead of 1/r², so circular speeds level off, and their final speed grows as the fourth root of the star’s mass, as galaxies show. The slider sets how far from a Sun-like star the change happens; for the real a₀ it would be about 7,000 AU. The simulator applies MOND to each pair of bodies, so momentum is not exactly conserved, a known difficulty with simple versions of the theory.
Dark energy. Dark energy speeds up the expansion of the universe. Around a star it adds an outward push that grows with distance:
At rΛ the push cancels gravity, and beyond it nothing stays bound. With the real value, the Sun’s balance distance is roughly 360 light years. The simulator shares the push out between pairs in proportion to mass, so it pushes everything away from the centre of mass and keeps momentum conserved.
Extra close-in pull. A pull that grows as 1/r⁴ on top of Newton’s, set by its share α at 1 AU:
A flattened, spinning star or planet pulls this way in its equatorial plane, which is one reason satellite orbits around Earth precess. Orbits here precess forwards, as under Einstein, by an amount that depends on the orbit’s size but not on the speed of light.
The lives of stars
In Realistic mode every star in every scene lives out a life. The exception is a star whose radius or temperature you set by hand: it stays as you drew it until you press Skip. A star ages one day for each day on the date, so a star on the main sequence, the long steady middle of its life, will not visibly change while you watch. Pick a star in Bodies to see its stage, its age and how it will end, and press Skip to play it on to its next stage over a few seconds, or to its end. Only that star ages when you do. First, time speeds up for whatever orbits it, until the fastest orbit takes about a second a lap, so you see planets drift outward as the star changes; time slows again when the star is done. The orbits are the same ones stepped faster, and the date counts the time they cover. Time keeps its speed for a star with nothing round it, in a paused scene, and in a scene of 300 bodies or more. Try the Supernova, Lives of the stars and Type Ia supernova scenes, which hold nothing but stars of the right mass and age.
A star’s stage sets the radius, temperature, light and mass that the rest of the simulation reads. So a giant’s pull weakens as it loses mass, and its planets spiral out: each orbit grows as the star’s mass falls, and keeps its shape. The simulator works this out directly instead of leaving it to the orbits, since a skip would otherwise make a wind lasting a hundred thousand years as sudden as an explosion. A giant swallows what it swells over, and its tide drags in what it nearly reaches. As a red giant the Sun takes Mercury, Venus and then the Earth. Astronomers still argue over whether the real Earth goes; it depends on how much mass the Sun loses first. At the end, a star like the Sun sheds a nebula that takes much of its remaining mass, so its planets drift further out as the nebula grows: Mars ends near 3 AU and Jupiter near 10 AU. The simulator shows that widening over a few seconds; in reality it takes thousands of years. A star that fills its Roche lobe, the region its own gravity holds, spills gas onto its companion, and momentum is kept. At a star's end its mass goes to a remnant, a white dwarf, neutron star or black hole, which gets the kick that balances what was thrown off. The gas leaves as grains with the right energy, and the planets feel the sudden loss of mass: if the star loses more than half of it, they are unbound.
The life tracks are formulas fitted to stars of the Sun’s make-up, after Hurley, Pols and Tout; they do not model the inside of a star. Two things are left out: stars with far less metal (elements heavier than helium) than the Sun, and the push of the ejected gas on planets. No star shines brighter than its Eddington luminosity, where the push of its light on its gas beats its gravity: about 38,000 times the Sun’s light for each Sun of its mass. The heaviest stars shine near that limit and their winds strip them fast, so a star born with a thousand Suns has fewer than two hundred halfway through its life and under fifty at its end. The heaviest star seen, R136a1, was born with about 250. A star of a hundred thousand Suns or more cannot hold together at all under Einstein’s gravity, and falls straight into a black hole. A helium core of 35 to 64 Suns turns some of its light into pairs of electrons and positrons, which makes it pulse and throw off shells before it collapses, so no black hole is left heavier than about 46 Suns. A core of 64 to 133 Suns burns all at once in one pulse, and the whole star is blown apart, leaving nothing. A heavier core falls straight in. With winds this strong, only stars far poorer in metal, or stars made by a merger, keep cores that heavy. Astronomers are still unsure whether a star of twenty to forty Suns explodes or collapses quietly, so each star here settles it from its own random seed. For its first weeks the gas of an explosion is opaque, so you see a boiling fireball that cools from blue-white to amber. As the gas thins, the fireball sinks and the torn gas above it comes into view. In the end a ragged remnant is left, its thrown-off gas lit by a shock running back through it. At a scene’s opening speed that thinning would take minutes, so the simulator plays it over nine seconds. The shell grows to its true size and soon outgrows the view, so zoom out to keep it whole. When time runs too fast to watch, the shell starts at a pace you can follow and then catches up. Its brightness follows the real light curve of its kind of explosion, on the simulation’s clock: a Type II holds steady for about a hundred days, then drops to a tail lit by radioactive cobalt; a Type Ia fades from its peak; a kilonova is gone in weeks. Then a faint remnant lasts for tens of thousands of years, slowing as it sweeps up gas. Brightness is drawn as a photograph stretches it, as the square root of the light. The remnant’s brightness, the dimming from inside gas larger than the screen, and how bright the blast starts are all set so you can see them. The grains coast in straight lines, since they move far too fast for gravity to bend them. Gas blown off cannot be called back, so reversed time stops at the moment of a star’s end. Undo still goes back to it.
Gravitational waves
Two masses orbiting each other ripple spacetime, and the ripples carry energy away, so the orbit shrinks. With relativity on, the Gravitational waves switch adds that loss in Realistic mode. A circular orbit then shrinks at the rate Peters worked out in 1964:
The loss grows steeply as the orbit tightens, so the pair spirals in faster and faster, and an eccentric orbit loses most at closest approach, which rounds it off. The c⁵ makes the effect tiny for planets: Earth’s orbit would need about 10²³ years to decay this way. It decides the fate of close pairs of neutron stars and black holes, and the LIGO detectors first heard the last fraction of a second of such a merger in 2015. Slow light far enough and you can watch one here.
On the curvature grid each pair sends out its own waves from its own centre, their height set by its masses and how fast it turns, and the grid adds them together, as weak waves superpose. So a third black hole adds ripples of its own, faint from a wide or light pair, and a pair that merges rings down while the waves it already sent carry on outwards. The grid draws the three strongest at once. A lone hole sends none: waves come from masses orbiting each other.
In Realistic mode every orbiting pair does this, planets and ordinary stars as well as holes, whichever law the orbits follow. The switch decides whether the loss changes the orbit, and under Einstein’s law turning it off leaves the waves out as well. At true size, a wave’s height compared with its well’s depth equals the wave’s strain (how far it stretches space) compared with the well’s potential at the same distance. For a pair that ratio is 2η(v/c)² in the plane of its orbit and twice that straight above or below it, where v is the orbital speed and η the pair’s reduced mass as a share of its total. The ratio is the same at any distance, since wave and well fall off with distance alike. Two black holes about to merge reach about a twelfth of the well in their plane and a sixth above it, close to LIGO's first merger. A star swinging past Sagittarius A*, the black hole at the centre of the Milky Way, reaches a twenty-millionth, and the Earth's orbit 10⁻¹³. So the waves are mostly too low to see, unless you slow light, which raises (v/c)² and with it every pair's waves. They show only in the grid's shape, not its colour. A pair's first crest lies a quarter of a wave out, often beyond the opening view, so zoom out to see the spiral.
Enlarge waves, in View, is on unless you turn it off. It draws each wave at the cube root of that ratio instead, scaled so a tenth is drawn as three tenths. It measures the wave against the sheet's whole depth beside the pair, instead of the well where the wave is, lets it fall off as one over the square root of the distance instead of one over the distance, and draws it taller when you zoom out. At true size, a few orbits out, the well is a few hundredths of the sheet's depth, so the waves would rise and fall by a pixel or two. Stronger sources still draw taller, but the gaps shrink: holes about to merge are drawn at about a fifth and a collapsing star at a fiftieth, ten times lower where the true gap is nearly a thousand times. Sources under a hundred-thousandth of their well, ordinary binary stars or a star passing Sagittarius A*, are left out even then. Turn it off to see the waves at their true height.
A collapsing star is the other source. A core that falls in lopsidedly sends out one brief burst, over in under a second. Beside its star's well the burst is under a ten-thousandth as tall, so it is drawn only when waves are enlarged. Bodies that collide head on, with no orbit to radiate from, send out one burst instead, as tall as a pair's waves would be where they touch. Two black holes or neutron stars ring loud; anything larger, such as a white dwarf or an ordinary star, rings too faintly to see. Only Einstein’s law with this switch off leaves them out. With the grid hidden each is a faint ring of its own. Their waves are drawn far longer than their true few hundred km, and they take a few seconds to cross a view that light would cross in a frame. A spinning pulsar with a slightly uneven crust should give off a steady hum, a billionth of its well. None has been heard, and the simulator does not draw it.
Black holes
A star swallows whatever touches its surface. A black hole has no surface: it swallows whatever crosses its event horizon, at the Schwarzschild radius 2GM/c², and the simulator draws that horizon to scale. With real light the horizon is tiny, 3 km for a black hole of the Sun’s mass, so a planet can swing far closer to a black hole than to a star. The dark shape you see is its shadow, 2.6 times wider than the horizon, as light passing any closer ends in the hole. A hole gives no light of its own and has no disk until something falls in, so one with nothing to feed on is only that shadow, shown by the sky behind it. Its gravity bends starlight, so stars near it are pushed outwards and drawn into arcs, and every star in the sky is seen a second time on the far side, squeezed against the shadow’s edge. That crowd of images is the soft haze round the shadow, brightened here as a long exposure would brighten it, since in reality it would be far too faint to see. Of what lies behind a hole, only the background sky is bent, not the grid or the bodies in the scene. Close to the shadow, under Einstein’s law, relativity takes over: passes within a few horizons swing far round before heading back out, and closer ones spiral in. The Black hole and merger presets show this with real light round supermassive holes, whose horizons reach a fraction of an AU; slowing light instead scales any horizon up the same way, as GM/c² sets them all. In Simple mode, where distances are not to scale, a black hole also catches anything within 4 pixels of its centre. Pick a black hole in Bodies to read its horizon’s radius and the speed of light it is worked out with. Light’s speed is set under Physics, under any law: the Speed of light slider runs from real light down to a crawl. Without relativity it changes no orbit, only the horizons, and the horizon grows as one over its square, so light ten times slower makes it a hundred times wider.
Changing the law mid-flight
A new law takes effect at once, but every body keeps the speed it had, which suited the old law. Most planets then swing onto eccentric orbits or escape. With a preset on screen, the Physics tab offers Restart, which rebuilds the preset with circular speeds worked out for the new force. The choreographies and three-body orbits are solutions of Newton’s law alone, so any other law breaks them apart. Loading a preset any other way brings back the law it was built for.
Seeing the curvature
In Einstein’s theory there is no force of gravity. Mass curves space-time, and a body left alone follows the straightest path it can through it. For anything moving much slower than light, almost all of that curvature lies in time: a clock deeper in a gravitational well ticks slower, by a fraction Φ/c², where Φ is the potential. At the Earth’s surface the fraction is under a billionth, yet GPS satellites, higher up, gain 45 microseconds a day on clocks on the ground and must be corrected for it. A slow body takes the path along which its own clock runs longest, and that path is the one Newton’s law predicts.
Curvature in the View tab draws this as a sheet that sinks by Φ below the flat plane, so the deeper the sheet, the slower time runs there. The depth is exaggerated to be seen, and the bottom of each well is rounded into a bowl, as if the star's mass filled a small ball, where the true well would plunge out of view. Every body dents the sheet directly beneath itself, however far above or below it is, so that you can see them all; the lattice, which runs through space, bends at each body's true position. Bodies stay at their own heights rather than resting on the sheet: the sheet is a map of time, not a surface that things roll on. A ball rolling into a dip in a rubber sheet needs gravity underneath to pull it down, which explains nothing.
The sheet's well is the slowing of clocks drawn as depth. Clock rates shows the same slowing as colour, at its true size, and the Lattice draws it through space in three dimensions, pulling the lines in where clocks run slow. Neither is a measured stretch of space: there is nothing for a three-dimensional space to bend into that we could draw.
The sheet leaves out the curvature of space itself. That part matters for light and for fast bodies: it doubles how far starlight bends past the Sun, and supplies part of the turning of Mercury’s orbit that Einstein’s law adds. Round a black hole, space alone curves into Flamm’s paraboloid, which this sheet does not try to draw. Under a custom law the sheet follows that law’s potential, so a 1/r force digs wells whose sides never level off.
Two more effects of Einstein's theory show on the sheet when they are switched on. Gravitational waves, on in the Black hole merger, ripple outwards from the pair that radiates most, at the scene's speed of light. A pair on a circular orbit sends waves at twice its orbital frequency, so the crests trail out in two spiral arms, each set by where the pair was when it left; they swell as the pair spirals in faster, and the last ones carry on outwards after the merger. They weaken as 1/r, as the well does. At their true height beside it only a pair close to merging shows them; Enlarge waves, on at first, draws them taller (see Gravitational waves above). Close to the pair, within about a wavelength, there are no waves yet, only a slowly turning saddle. Their crests lie at least ten times the pair's separation apart, so zoom out to see the spiral.
Frame dragging, under Einstein's law, twists the sheet round each spinning star and black hole in the sense it spins: a spinning mass drags space round with it, an effect Gravity Probe B measured round the Earth in 2011. Space is carried round at 2a(GM/c²r)² of light's speed, a the body's spin, and the sheet is turned by that many radians, true to size: about half a radian at the horizon of a hole spinning at 0.7, falling as the square of the distance, and a few millionths of a millionth at the Sun's surface. So only space close to a black hole is seen to turn. A black hole's spin is set in its editor, from −1 to 1, the most a black hole can spin; stars spin at 0.2, about the Sun's. Gas changes it: what goes round with the spin raises it towards 0.998, as Bardeen and Thorne found, and what goes against it slows the hole. Two holes merging leave a mass, spin and recoil set by theirs, with the spin's axis turned towards the orbit's, and those with spins across the orbit can be kicked out of its plane at thousands of km/s.
The sheet is drawn by the graphics card where it can be, cutting each line into a thousand pieces; elsewhere it is drawn in 2D with the sag alone.
Things to try
Experiments to run yourself, such as turning back the clock on the Solar System.
- Turn back the clock. In the Solar System, press R and watch the planets run backwards from 1986. Halley’s Comet climbs back out towards the orbits of the giant planets, where it came from.
- Catch Halley’s Comet. Open the Solar System: the comet starts at its closest to the Sun, tail streaming away. Turn on Lasting paths, follow it and zoom out as it climbs beyond Neptune on an orbit tipped steeply out of the planets’ plane.
- Find the Lagrange points. Open Trojan swarms and turn on Orbit guides in View. L4 and L5 ride along with the giant planet, and the two swarms of asteroids circle slowly round them.
- Watch an orbit trade its tilt for its stretch. Open Kozai–Lidov cycles, follow the Planet and turn on Lasting paths. Over a few centuries its round orbit stretches until its closest pass is a sixth of where it started, lying over towards the companion's plane, and then rounds out again.
- Count the resonance. Open Jupiter’s large moons. Io laps Jupiter twice for each lap of Europa and four times for each of Ganymede, and the three are never all on one side of the planet. Then try TRAPPIST-1, whose seven planets keep a longer chain of such ratios.
- Watch a star feed its neighbour. Open Algol and zoom in between the two stars. Gas leaves the cool subgiant at the point where the two pulls balance and curves on to the hot star, which the stream strikes directly.
- Read a star’s light. Open A planet’s transit and wait for the dip in the Light curve card: a hot Jupiter crossing its star takes 1.5% of its light. Then open δ Cephei, which brightens in a day and a half and fades over four. Its period gives its true brightness, and so its distance.
- Hear a pulsar's orbit run down. Open the Hulse–Taylor pulsar and turn on Lasting paths. With light slowed, its stretched orbit turns a little each lap into a rosette, shrinks as gravitational waves carry its energy away, and ends with the two neutron stars merging into a black hole.
- Watch two moons swap orbits. Open Janus and Epimetheus. The view turns with Janus, so Saturn stays put while Epimetheus creeps up on it, turns back without passing, and goes all the way round to meet it from the other side.
- See a double world. Open Pluto and Charon: Pluto circles a point outside itself, and Styx, Nix, Kerberos and Hydra circle the pair.
- Let a rogue through. Open Rogue planet, turn on Lasting paths and zoom out. Five Jupiters fall through the planets' plane past the asteroid belt; watch which orbits it bends.
- Tear a comet apart. Open the Sungrazer and turn on Lasting paths. The comet dives inside its star’s Roche limit, breaks into six fragments, and the string stretches a little further each time round.
- Merge two black holes. Open the Black hole merger and turn on Lasting paths. The pair circles for most of a minute, each lap a little tighter and quicker than the last, until they plunge together and merge.
- Watch the wells move. Open Binary star. Two wells circle each other, and planets launched between them trace the dips and ridges of the sheet. Pick the Black hole tool and throw one in: its well is four times as deep.
- Fall into a black hole. Open Black hole and turn on Lasting paths. The planets start from the same distance aimed at different closest approaches. The deeper a planet dives, the further each pass swings its closest approach round, and the innermost cross the horizon and vanish.
- Fly to Mars. In the Solar System, pick the Probe in Bodies, set each burn to 2.95 km/s and press Speed up once. The orbit readout’s farthest point jumps to about 1.52 AU, the distance of Mars: a Hohmann transfer, the cheapest way between two circular orbits. The probe gets there 259 days later. Whether Mars is there too depends on where it is in its orbit, which is why missions wait for launch windows.
- Watch Jupiter’s moons. In the Solar System, pick Jupiter in Bodies, press Follow, then Fit to zoom in on its four large moons, and slow the speed. Io laps the others: it goes round twice for each turn of Europa and four times for each of Ganymede.
- Watch an orbit precess. Open the Solar System, turn on Lasting paths, choose Einstein and slow light to about 300 km/s. Mercury's orbit then turns about 30° each lap and its path becomes a rosette; slow light further and watch the petals spread.
- Flatten the rotation curve. Open Tilted orbits, choose Custom, set the exponent to 1 and Restart. Every planet now moves at the same speed, so the outer ones, with further to go, fall behind far less than under Newton’s law.
- Break the solar system. Set the exponent to 3.5 and Restart, then drag the star a short way. The planets cannot settle back onto circles: they spiral in or fly out.
- Throw anything at a spring. On Tilted orbits, set the exponent to −1 and launch planets in any direction at any speed. Each one returns close to where you let go of it, and all of them take about the same time. The planets’ weak pull on each other, also spring-like, keeps the return from being exact.
- Look at a ring side on. Open Polar ring, press Edge-on, then Spin. The two stars orbit in one plane while the ring stands upright through it.
- Find the backwards planet. In Tilted orbits, the outermost planet is tilted past 90°, so it circles the other way. Turn the view to see its orbit cross the others.
The presets
Every ready-made scene, grouped by what it shows, with a link to open each one.
Our Solar System
- Solar System. The Sun, the planets and their 22 major moons, Pluto, the asteroid belt and six comets, Halley’s at its closest to the Sun, as they were on 9 February 1986. Zoom out past the Kuiper belt to the Oort cloud.
- Asteroid belt. The real orbits of 12,000 numbered asteroids around the planets. Switch to orbit sizes and the Kirkwood gaps open where Jupiter clears them out.
- Solar System, all moons. The same Solar System with all 460 moons that have JPL orbits, from Phobos to the far, retrograde irregulars of the giants.
- Edge of the Solar System. Beyond Neptune today: Pluto, Eris and the other dwarf planets, the Kuiper belt, the Voyagers leaving the Sun’s bubble, and the Oort cloud as you zoom out.
- Saturn’s rings. Saturn’s rings, and thousands of grains in its equator that sample them, with Pan and the shepherd moons among them. Zoom in close on the ring to see the grains; the planet’s bulge keeps their orbits flat.
- Janus and Epimetheus. Two of Saturn’s moons share an orbit. The inner one gains on the other, and as it catches up, their pull swaps their orbits, so it falls back: seen turning with Janus, a horseshoe.
- Jupiter flyby. A craft leaves Earth on Voyager 2’s dates and passes behind Jupiter, which throws it onward. Its speed from the Sun is plotted before and after.
- Earth satellites. The ISS, Hubble, GPS and geostationary craft on their real orbits from a dated set of tracking data, at a minute a second.
- Perseid meteor shower. Earth and the Moon run into the dust of Comet Swift–Tuttle in August 2026; each grain that strikes flashes as a meteor.
- Sungrazer. A comet dives inside its star’s Roche limit and is torn into a string of fragments, as Shoemaker–Levy 9 was by Jupiter.
- Jupiter’s large moons. Io, Europa, Ganymede and Callisto on their real orbits. The inner three keep time 1:2:4 and are never all on one side of Jupiter: Laplace’s resonance.
- Pluto and Charon. A double world: Pluto and Charon circle a point between them every 6.4 days, and four small moons, Styx, Nix, Kerberos and Hydra, circle the pair.
Other planetary systems
- TRAPPIST-1. Seven Earth-sized planets round an ultracool dwarf a tenth the Sun’s mass, all closer than Mercury is to the Sun, each pair of orbits near a ratio of small whole numbers.
- A planet’s transit. HD 209458 b, a hot Jupiter, crosses its star every 3.5 days as seen from Earth, and the starlight dips by 1.5%: the first planet found this way.
- Rogue planet. A made-up rogue planet of five Jupiters falls through the Solar System, passing 3 AU from the Sun. Watch what its pull does to the planets’ orbits.
- Trojan swarms. Asteroids sharing a giant’s orbit, 60° ahead and behind it (L4 and L5).
- Kepler-16. A real planet with two suns: a world of about Saturn’s mass circles both stars of a pair that eclipse each other every 41 days.
Double stars & close passes
- Binary star. Two stars orbiting their shared centre of mass, with planets circling both.
- Alpha Centauri. The two Sun-like stars nearest us on their 80-year orbit, with a test planet where water could be liquid round each, and Proxima with its two planets 13,000 AU out: zoom out to find it.
- Algol. The Demon Star: a cool subgiant fills its Roche lobe and spills a stream of gas on to its hotter, heavier companion, though it is the lighter and the more evolved of the two.
- Hulse–Taylor pulsar. Two neutron stars on the binary pulsar’s measured orbit, under Einstein’s law with light slowed sixty times: the orbit turns 13° a lap and spirals in within minutes, where the real one turns 4.2° a year.
- Kozai–Lidov cycles. A companion star on a tilted orbit trades a planet’s tilt for its eccentricity: its orbit stretches until it passes within about 0.3 AU of its star, then rounds out again, every thousand years or so.
- Close encounter. Two stars with disks of 2,900 particles pass close; tides pull out long tails.
- Two stars merging. Two stars so close that both overflow their Roche lobes lose gas past the smaller one. The gas winds out in a spiral and carries off the orbit’s spin, so over a few orbits they sink together, their cores meet, and the gas they throw off glows as a luminous red nova.
Lives & deaths of stars
- Supernova. A red supergiant of fifteen Suns collapses seconds in, blowing off its envelope and flinging away its planets and companion.
- Lives of the stars. Six stars from one and a half Suns to sixty meet the ends their masses set, one by one: a planetary nebula, supernovae and a black hole.
- Type Ia supernova. A white dwarf takes gas from a red giant until it passes its limit and burns up all at once, leaving nothing but the giant, flung away.
- Recurring novae. A giant spills hydrogen on a white dwarf too slowly for it to burn as it lands. It piles up for 19 years, ignites, and most of it is thrown off as a nova, again and again. The scene runs at four years a second, so one comes about every five seconds.
- δ Cephei. δ Cephei, the star Cepheids are named after, swells and shrinks every 5.37 days. Its period gives its true brightness, a rung on the ladder of cosmic distances.
- Mira. A red giant near the end of its life swells and cools every 332 days, and fades in visible light from easy to see by eye to far too faint.
- Young star with jets. A star a million years old, still shrinking, seen edge-on through its disc as HH 30 is. Jets from its poles shock the gas into red knots moving at 150 km/s.
- Stellar nursery. A cloud of cold gas fifteen hundred times the Sun’s mass, stirred by turbulence, falls in on itself into filaments, and a cluster of stars forms where they meet. Once it makes a star of more than eight Suns, that star’s ultraviolet light makes the gas round it glow red and drives the cloud apart.
Bursts & mergers
- Neutron stars merging. GW170817’s neutron stars spiral in and merge. A jet flashes as a short gamma-ray burst, the remnant becomes a black hole, and a kilonova glows blue, then red.
- Long gamma-ray burst. A Wolf–Rayet star’s core collapses to a black hole whose jets drill out through the star in seconds: a long gamma-ray burst, its afterglow, then a hypernova.
- Magnetar and radio bursts. SGR 1935+2154, a magnetar with a field of 2×10¹⁴ gauss, flares in X-rays and at times sends out a fast radio burst, swept across the band by the gas between.
Black holes
- Black hole. Planets swinging close to a black hole of 36 million Suns, under Einstein’s law: some whirl round it, some fall in.
- Star torn apart. A star like the Sun dives at a black hole of 4.1 million Suns and is pulled apart: part of its gas swings round the hole into a bright disk, and the rest is flung away.
- Star slowly eaten. A star on a turning orbit round a black hole loses gas at each close pass. The gas swings past the hole and winds into a growing disk, while the star shrinks until the tide tears it apart.
- Star torn by a small black hole. A star like the Sun passes a black hole of 20 Suns at little more than its own radius. The tide strips most of it, and the hole, fed far past its limit, grows a slim, white-hot disk.
- Star through a disk. A star circles a black hole of 100 million Suns on an orbit tilted to its disk, punching through it twice an orbit, the way quasi-periodic eruptions are thought to be made.
- Rocky planet torn apart. An Earth on a long orbit round a black hole of 4.1 million Suns passes inside its Roche limit. It cracks along faults, holds together round the hole, and is then drawn out into a stream that gathers into a chain of pieces along its orbit.
- Gas giant torn apart. A Jupiter on a long orbit round a black hole of 4.1 million Suns dives inside the distance where a fluid planet comes apart. With no strength to hold it, it is drawn out into a stream of its own gas.
- Quasar. A spinning black hole of a thousand million Suns taking 20 Suns of gas a year, outshining a galaxy, with the jets of a strong magnetic field. Change its gas supply and it dims.
- Black hole merger. Two supermassive black holes radiate gravitational waves and spiral together, faster and faster, until they merge.
- SS 433 microquasar. A supergiant spills gas on to a black hole, whose jets shoot out at a quarter of light’s speed and turn every 162 days, tracing a corkscrew.
- Quasar with two black holes. PG 1302−102: two supermassive black holes 0.01 pc apart, the lighter fed more as it swings round, so the quasar brightens and fades every four years.
Clusters & galaxies
- Galaxy. A barred spiral about as bright as the Milky Way, drawn from the light of its own simulated stars. Fire another galaxy or a black hole into it and watch them merge.
- Star swarm. A black hole of four million Suns with 1,000 stars round it, each a body of its own pulling on every other, from red dwarfs to blue giants.
- Star cluster. Seven stars in a ball, swarming until one is flung out or two merge.
Three-body orbits
- Figure-eight. Three equal stars chase one shared figure-eight path.
- Butterfly I. Three equal stars form paired wings with tight turns.
- Butterfly II. A second butterfly orbit with sharper close passes.
- Bumblebee. Three equal stars weave a pattern that takes a long cycle to repeat.
- Moth I. Three equal stars wind through a symmetric moth-shaped orbit.
- Moth II. A longer moth orbit with repeated loops and crossings.
- Goggles. Three equal stars trace a pair of looping lobes.
- Dragonfly. Three equal stars trace delicate wings and close encounters.
- Lagrange triangle. Three equal stars rotate as an equilateral triangle.
- Euler line. Two stars circle a third while all three stay in a straight line.
Many-body choreographies
- Super-eight. Four equal stars weave through a shared double loop.
- Six-body heptagram. Six equal stars trace a seven-pointed star.
- Eight-body enneagram. Eight equal stars weave a nine-pointed star in close pairs.
In three dimensions
- Tilted orbits. Planets on orbits tipped out of one plane, one of them going backwards.
- Polar ring. Planets circling a binary star at right angles to the stars’ own orbit.
In a choreography, equal masses follow the same closed curve, spaced out in time. Super-eight, the six-body heptagram and the eight-body enneagram come from the Montaldi–Steckles gallery. The triangle and Euler line are rotating configurations. These presets and the figure-eight open in Realistic mode with an orbit of roughly 24 seconds. Only Realistic mode under Newton’s law reproduces their intended orbits, so switching either knocks them off their curves. Turn on Lasting paths to trace the pattern.
Expect most of them to fall apart. Their starting values are known to a limited number of digits, and the computer rounds at every step. In an unstable orbit those errors, far smaller than the orbit itself, grow exponentially with each lap, until the pattern breaks up into chaotic motion, often flinging a star or a pair away. The triangle and Euler line are unstable for equal masses, and so are most choreographies, including the super-eight, heptagram and enneagram. The figure-eight is the exception: it is stable, so the same errors only make it drift slowly. This is a property of the orbits, not a fault in the integrator; a more precise one only delays the break-up. Load the preset again to start it over.
Butterfly I, Butterfly II, Bumblebee, Moth I, Moth II, Goggles and Dragonfly are periodic three-body orbits from Šuvakov and Dmitrašinović (2013), in which each star can follow a different curve. They also open in Realistic mode, with a cycle of 24 to 42 seconds. Butterfly II and Dragonfly use wider distances to keep their close passes clear of the stars’ physical radii.
The two Solar System presets are the same scene with different moons. They place the Sun, the eight planets, Pluto and Halley’s Comet where they stood on 9 February 1986, the day the comet passed closest to the Sun, or on any date you pick from 1800 to 2050. The planets’ positions come from JPL’s average orbits and how fast those change, good to a fraction of a degree over that span, and the comet’s from its 1986 orbit, which drifts further from the real one the further the date is from 1986. Five more comets go round with it, each on the orbit of its own last return: Encke, the shortest-period comet at 3.3 years; 67P/Churyumov–Gerasimenko, which Rosetta visited; Swift–Tuttle and Tempel–Tuttle, the parents of the Perseids and the Leonids; and Hale–Bopp, the great comet of 1997, on a 2,500-year orbit tilted 89°. A belt of 1,500 dust particles on made-up orbits fills the space between Mars and Jupiter. Real masses and Realistic mode make it a working Solar System: the Sun wobbles about the centre of mass as Jupiter goes round, and Halley returns after about 76 years. Both open on the rocky planets, since no single scale fits both Mercury, 0.4 AU from the Sun, and Neptune, at 30 AU; zoom out for the giants.
Solar System has the 22 major moons: our Moon, placed by its mean longitude so its phase is right to within a few degrees, Phobos and Deimos, Jupiter’s Io, Europa, Ganymede and Callisto, Saturn’s Mimas, Enceladus, Tethys, Dione, Rhea, Titan, Hyperion and Iapetus, Uranus’s Miranda, Ariel, Umbriel, Titania and Oberon, Neptune’s retrograde Triton and Pluto’s Charon. Solar System, all moons has every distinct orbit in JPL’s list of average orbits, 460 in all, including small, irregular and provisionally named moons, and takes more computing. From afar a moon sits within a pixel of its planet: follow the planet and Fit to see them. A scene too full for every moon says how many it left out, before any planet’s centre of mass is adjusted for them.
The moons follow JPL’s average ellipses, not exact predicted positions. S/2009 S1 appears in JPL’s discovery catalogue but has no average orbit in this source, so it is left out. Where a moon’s mass is unmeasured, the simulator estimates it from the moon’s listed radius, taking a density of 1,500 kg/m³. The editor labels these estimates; they pull like any other mass and are kept when you share the scene. Where the size is unknown too, the moon has no mass: it feels gravity but pulls on nothing, and is never torn apart by tides. A moon of unknown size is drawn as a marker; neither a marker nor a generated surface shows a measured shape. The average ellipses leave out flattened planets, tides and the slow turning of orbits, so crowded inner systems and distant irregular moons are approximate.
A comet is a planet with a tail. Sunlight boils gas and dust off its surface and the solar wind pushes them away, so the simulator draws the tail pointing directly away from the star that pulls hardest on it, growing as the comet nears that star. Choose Comet as a planet’s type in its editor to give it one. Up close its nucleus is two dark lumpy lobes, like comet 67P’s, its dust reflecting only a few percent of the light, with patches of bright ice. Within 3 AU of a star a comet also sheds real dust, faster the nearer it is. Starlight pushes on each grain as if the star were lighter, the smallest grains most, so the grains spread into a broad, curved dust tail that lags behind along the orbit, unlike the straight gas tail. They fade after one to three months, and saved scenes leave them out.
Perseid meteor shower sets the Solar System on 9 August 2026 and follows Earth and the Moon as they run into the stream of dust Comet Swift–Tuttle has shed on its 133-year orbit. Every August Earth crosses the comet's orbit where it passes 1.01 AU from the Sun, and the grains meet it at 59 km/s, all from one direction, the radiant in Perseus. Time runs at two hours a second, so the peak, on the night of 12 to 13 August, comes after about 40 seconds. A real stream holds far more grains than any simulation could, and a random sample of it would almost never hit a planet drawn to its true size. So the scene holds two kinds: 3,000 grains spread through the stream near Earth's orbit, to show its shape, and 800 on course for Earth, traced back from where they will strike over five days, most within a day of the peak. Each one that strikes flashes on Earth, and Bodies counts them under Dust swept up.
The three presets in three dimensions open in the 3D view. Tilted orbits and Polar ring set their planets on circular orbits turned out of the flat plane. Star cluster scatters seven stars through a ball with random velocities, scaled so the cluster neither flies apart nor collapses at first; close encounters then trade energy until a star escapes or two merge.
Each preset starts from a numerical approximation and then gravity takes over. The delicate solutions lose their symmetry over time through rounding error, or at once when you change a mass, move a star or launch a planet. Load the preset again to restart it.
How the simulation works
The two modes, and how dust, collisions, time steps, softening and 3D are worked out.
Two modes
Realistic mode treats every body alike: each one pulls on every other. Star masses are in solar masses, planet masses in Earth masses, distances in astronomical units, and the speed slider sets simulated time per second, from a minute to 120 days, or down to a thousandth of the speed a scene opens at if that is slower, as for the black hole merger's last orbits. A scene that opens far faster or slower gets a range round its own speed. In Simple mode it runs from a hundredth of normal speed to twice it. Collisions use the stars’ physical radii, though the simulator draws stars larger so you can see and grab them.
Simple mode is the faster playground. Stars pull on each other and on planets, planets pull on each other at a tenth of the strength, and planets do not pull on stars. Stars merge when their visible cores overlap. At either scale a merger conserves mass and momentum.
Dust
Every star and planet pulls on every other, so doubling their number quadruples the work, and a few dozen is the practical limit. Dust gets round that. Its particles feel the stars and, in Realistic mode, the planets and moons, but pull on nothing themselves, so thousands cost no more than a handful of planets. Toomre and Toomre modelled colliding galaxies the same way in 1972, and the Close encounter preset does it with 2,900 particles; the Solar System’s asteroid belt is dust too. Planets of ten Earth masses or more pull on dust everywhere; lighter ones only within three Hill radii, beyond which the star’s pull drowns theirs. Any planet or moon swallows the dust that hits it, with a small flash, and Bodies counts the grains it has swept up. Starlight pushes on small grains and, in Realistic mode, drags on them too (the Poynting–Robertson effect), so dust slowly spirals in towards its star over centuries. Dust does not appear in Bodies, and a share link carries only a little of it, but a saved file keeps all of it, and Clear sweeps it away.
Collisions and break-ups
Stars swallow planets that reach their surface, and black holes those that cross their horizon. In Realistic mode, planets, moons and comets that touch each other merge too, at sizes worked out from their masses. Comets break up before they hit. A comet is a loose pile of ice and dust, and inside a heavier body’s Roche limit the difference in that body’s pull across the comet beats the comet’s own gravity. The simulator then splits it into a string of six fragments that drift apart along the orbit, as Comet Shoemaker–Levy 9 did after passing Jupiter in 1992, two years before its pieces struck the planet. The limit is about 0.015 AU for the Sun and 220,000 km for Jupiter; in Simple mode, where distances are not to scale, it is 2.5 times a star’s drawn radius.
In Realistic mode solid worlds break up too, closer in. A moon or planet held together by its own gravity and rock survives inside the comets’ limit, out to Roche’s rigid-body limit, 1.26·R·(ρ/ρw)^⅓ from a body ten or more times its mass, where R and ρ are that body’s radius and density and ρw the world’s density: about 9,500 km from Earth for the Moon, and 5,500 km from Mars for Phobos, which orbits at 9,400. Inside it the world splits into eight fragments and sheds dust that shears out along its orbit into a ring. At a black hole it goes further. Each fragment, as dense as the world and so inside the same limit, goes on being torn, and wears away into gas that winds in towards the hole; the hole gains what stays bound. The gas is far fainter than a star’s, as there is far less of it. A fragment on its way out keeps what it has left until it comes back.
The tidal radius of a black hole is R·(M/m)^⅓: a star’s radius R scaled by the cube root of the hole’s mass M over the star’s mass m. For the Sun at Sagittarius A* it is about 0.74 AU. What a pass costs a star depends on how close it comes, not where it is now. On the way in a star is only drawn out; its gas leaves on the way out, most of it within the hours or days the pass takes. A pass whose closest distance is r_p takes (ℛt/r_p)³ of the star, where ℛt, the distance that takes all of it, depends on how the star is built (Ryu and others, 2020). A Sun-like star has a dense core and holds on until 0.37 times the tidal radius from a hole of a few suns, so a pass to the tidal radius costs it a twentieth, as simulations of such a star and a hole of 10 suns find. A red dwarf, with much the same density all through, goes from 1.1 times it. Close to a heavy hole Einstein’s law makes the tide stronger: at Sagittarius A* a Sun-like star goes from 0.62 times it, 0.46 AU. A star that survives goes on with what is left, and shrinks. One with a dense core is bound to the hole by the tide it raised and comes back to lose more: within weeks round a hole of a few suns, after thousands of years round a heavy one. A red dwarf is flung away instead, at up to 250 km/s, because it loses more from one side than the other. Each lot of gas leaves from where the star is at the time. From a dive, half the gas is held by the hole and half flung away. From a star already on a bound orbit all of it stays, and comes back about when the star does, so its disk grows while the star is still there: see Star slowly eaten. Gas from a dive has gone too far to come back for weeks or months, so a real disk forms only once the star has gone: see Star torn apart. Round a hole of a few suns everything is quicker and closer. The gas comes back within hours, a few million kilometres out, a hundred million times faster than the hole can take it, so once that gas is back its disk is drawn as bright as a disk can be. A disk’s look depends on how fast gas arrives as a share of the hole’s Eddington limit, the most it can take before its light blows the gas away. That share sets how hot and bright the disk’s surface is, whatever the hole weighs; past the limit the disk grows only slowly, as the rest is blown away. A hole of more than about a hundred million suns has its horizon outside the tidal radius, and swallows a Sun-like star whole, without a flare. Gas also falls straight in if its angular momentum is below 4GM/c, the least that even a parabolic orbit needs to come back out. So at a hole of tens of millions of suns, like the Black hole preset’s, nearly every star goes in whole, with a brief glow and no lasting flare. You need a lighter hole to see a star torn up slowly, as in the Star torn apart preset.
A hole fed past its limit hides in its own wind. What it cannot take is blown off at the escape speed from where the disk’s own light first reaches the limit, or from where the gas arrives if that is nearer. The wind is ionised, and its free electrons scatter light, so the hole, its disk and anything inside the wind are hidden behind a photosphere: the surface from which light can just escape, one optical depth in from the wind’s edge. The photosphere grows out at the wind’s speed, towards κṀ/4πv for a wind carrying mass at a rate Ṁ at speed v, where κ measures how strongly the gas scatters light. It stops where its gas would be cool enough, about 10,000 K, for hydrogen to recombine and let light through. Its light is the limit’s times 1 + ln of how far past the limit the hole is fed (Shakura and Sunyaev 1973). Spread over the photosphere, that light sets its temperature: tens of thousands of kelvin, as the optical light of real stars torn by holes shows. The wind leaves from the disk’s faces. Round each end of the axis is a funnel the light escapes through, which takes 73/ṁ² of the sky for a hole fed ṁ times its limit (King 2009): wide open at ten times the limit and closed to a pinhole past a thousand. Seen from the side, a wide funnel shows as a bright bowl; looking down it, you see hotter gas deeper in, and the well glows white. The face of the photosphere dims towards its edge, as a star’s does, and is hotter wherever the eye sees deeper into the wind. Once the hole can take all it gets, the wind stops, its gas goes on out, and the photosphere thins from inside until the disk shows again. Wind photospheres, under Colours in View, turns it off, so you can watch the disk that a real wind would hide.
A hole fed steadily can be a quasar. Set a black hole’s gas supply in its editor, or open the Quasar preset. Gas falling to the last stable orbit gives up 5.7% of its rest mass as light. It counts as a quasar from 10⁴⁵ erg/s, about 260 thousand million suns, and its light cannot pass the Eddington limit, where it would push the gas away as hard as the hole pulls, so a hole of under about 8 million suns can never be one: anything more only blows off as a wind. Below 1% of its limit the gas is too thin to radiate, and the hole is dim. Two things here are not worked out: the gas’s source, which is only a number, and whether a given real quasar has a strong field, which only about one in ten does. Disk brightness goes by the logarithm of its light, and the glare is what a camera might show. The hole gains what reaches it, less what leaves as light.
Jets
A hole’s jets follow from five conditions, never from a switch, a preset or what the hole is eating, and the Event horizon section of its panel says which is missing. The hole has to spin, as the jet’s power is the hole’s own rotation, drawn off through a magnetic field that threads its horizon (the Blandford–Znajek process). Gas has to be arriving, from a steady supply or a torn star, since nothing else holds that field against the horizon. The field has to be strong: the jet’s power grows as the square of the field, up to the most the gas can hold. At that limit a fast-spinning hole gives back more energy than the whole rest mass of the gas, 130% at a spin of 0.9. Gas going against the spin holds less, and gives far less. The flow has to be thick. Below 1% of the hole’s limit, as at M87, and above the limit, as with most of a torn star, the flow is puffed up and gathers more field as it comes. A thin disk between those gathers none and holds its jets back. And the jets have to get out: gas at more than about 20° to the hole’s own plane stands in their way, and they stall inside it.
So a hole that has had a thick flow keeps its field when it later takes a thin one, as seems to happen in the one quasar in ten with strong jets, and a hole eating a second star starts with what it gathered from the first. A slightly tilted disk is turned round the hole’s axis by frame dragging, and swings its jets with it, as was seen in AT2020afhd. Once the flow has thinned, the inner disk settles into the hole's equator, over days round a million-Sun hole, and one going against the spin settles against it, while gas beyond the warp stays in its old plane. A new jet’s head goes out at 0.9c at the scene’s own speed of light, and when the gas fails its tail follows the head out, so the jet leaves the hole behind.
Some of this is simplified. How much a thin disk holds jets back is a single factor of 25, the least seen in X-ray binaries, where the real figure varies. A star’s own field is far too small to supply one, so a hole fed only by torn stars has jets only if it kept a field from gas it had before, which here is 3 holes in 100, each decided once. Observations say a few percent, and only weakly. A hole with steady gas, or a field you set yourself, gathers more within about 10,000 light-crossing times. Running jets slow a hole’s spin as they draw on it, to about 0.06 if they are strong and last. The tilt never shrinks as it would in months or years, and a disk’s plane turns but its grains stay in their own. Brightness goes by the logarithm of the power over the hole’s limit, as a photograph might, and a jet seen end on, which beaming and the long way through it make thousands of times brighter than one seen side on, is drawn only a few times brighter, so that a picture can hold it. Its shape is a true cone, seen from any side as one is. The jets push on what is inside them, as below, and are not bent by the hole.
Whatever leaves a star or a hole acts on what it meets. A star’s blast strips and pushes each star and planet it reaches, once, as its edge passes. The amounts come from simulations of a Type Ia supernova striking a Sun-like companion (Pakmor and others, 2008): the share stripped falls as the distance to the power 3.5 and the kick as the power 1.5, from a fourteenth of the star and 97 km/s at three of its radii. The simulator scales these to other blasts by their energy and momentum, and to other bodies by how tightly their gravity holds them. A red giant beside a white dwarf that explodes loses nearly all its outer layers; a planet loses far more of itself than a star at the same distance. Further out, a body catches only the share of the blast its size covers on the sky. A body crossing a hole’s disk sweeps up the gas in its path, which drags on it and flares as it is shocked, twice an orbit. This is one explanation of the repeating flares, called quasi-periodic eruptions, seen from some holes (Linial and Metzger, 2023). A body inside a jet is pushed along it by the momentum on its face, and loses gas as fast as that push can lift it clear. Mostly these are small: a Sun-like star in a quasar’s jet thousands of AU out loses a ten-billionth of itself a day, and one crossing its disk is slowed by millionths, but the flares show.
The gas is worked out from where it leaves. Each grain leaves the star’s tips moving with the star as one body, so gas from the near tip has much less angular momentum than the star and falls in towards the hole, and gas from the far tip has more and swings wide. From there a grain keeps to a Kepler orbit of its own, whose ellipse relativity turns by 3π·rs/p as it passes the hole, where rs is the horizon’s radius and p measures the orbit’s size; this close in that is up to about 100°. Past the hole it meets the gas falling in behind it and shocks, winds out to the circle its angular momentum allows, then slowly in, keeping to Kepler’s speed at each radius, and heats until it is lost near the hole. Threads of gas leave side by side on slightly different orbits, so they shear into the spiral arms you see. The disk lights with the gas that has arrived and not yet drained away, so it grows pass by pass, and fades when the supply ends. How bright it gets follows the mass: a heavier star is brighter, and a planet’s flare is far fainter than a star’s. A body going straight in flashes by its mass over the hole’s. The disk lies in the plane of the gas’s orbits, with an inner edge at the last stable orbit, three times the horizon for a hole that does not spin. Each ring gives off the heat Page and Thorne worked out for a thin disk round a spinning hole: none at the inner edge, most a little outside it, and falling as the cube of the radius far out. Its colour is Planck’s law at that temperature, in a camera’s three bands. Moving gas, its light shifted by its motion, looks exactly like gas at a shifted temperature, so the same law reddens the side moving away and gives the side moving towards you its blue and its glare. A real disk is far hotter, and would be the same pale blue from edge to edge (choose True colours under View to see that), so the picture lowers the temperature scale to fit a camera’s range of colours, deepens those colours as a filtered photograph does, and is exposed for each disk’s own brightest gas. Light bends over the hole by the solution for its orbit, 1/r = sin ψ/b + rs(1 − cos ψ)²/(2b²), where b is how far from the hole the light would pass if it went straight. That bending lifts the far side of the disk into view above the shadow, and the second image, whose light has gone half a turn further round, lies just outside the shadow on the other side. Each is worked out for the angle you are looking from. So one side of a disk is brighter than the other, as in a real one, and a disk with gas enough to shine is thick enough that its near side hides the ring and arcs behind it.
Some of this is changed so you can see it, the stream most of all. A star is drawn far larger than its true size, and its gas leaves as it would from a star of the size drawn, between 15% and 30% of its distance from the hole. A real Sun is far smaller than that, so its gas would stay close to its orbit in a thin stream, and at Sagittarius A* a dive’s gas would go 60 AU out and take about 80 days to come back. Here it is back within seconds of the star going, on a faster clock than the scene’s. Three things are pictures rather than calculations of a real disk’s viscosity (its internal friction): the near tip getting most of the gas, the wind off the shock, and the gas winding in at a steady rate. The stream is many times wider than a real one would be, though it widens as slowly as one held together by its own gravity. The hole gains mass as the gas arrives: up to its Eddington rate, less the share that leaves as light, while any more goes out on the wind. A body that crosses the horizon whole is drawn as a streak, with a brief glow if the tide would have torn it up on the way: the simulator takes it in a single step, so the streak is a picture of the fall, not a calculation of it. The third image is the thin photon ring round the shadow, and those beyond it are too fine to draw. A disk’s pattern turns faster or slower as the scene’s speed compares with the preset’s own, up to twenty times faster, backwards when time runs backwards, and stops when you pause. Above about eight times it blurs smoothly, as in a long exposure. With several disks in view a lighter hole’s disk turns faster, in proportion, since its orbits are shorter. Every disk still turns far slower than real gas so close to a hole. Grains are capped at a size on the screen, and keep their brightness per pixel at every zoom. None of the drawing moves anything. Without WebGL 2 there is no stream or bending, only the dust and a plain disk.
Light from whatever lies behind a hole is bent too. A star or planet passing behind one is drawn from where its light truly left, so it appears as two images either side of the hole, or as a whole Einstein ring when it is exactly behind, sized by how far behind the hole it is. Gas behind the hole does the same. A second black hole behind the first is bent the same way, shadow and disk, and so is the sky behind both. The sky’s light passes the nearer hole first and reaches the farther one already bent, by a share set by the gap between them over the farther one's distance. So two holes side by side bend it independently, their bending adding up, and a hole far behind another is seen through it, its shadow stretched round the nearer one's ring, or drawn into a ring when they line up. The simulator finds where that puts each star by Newton's method, a step-by-step search. Close to a merging pair a few stars may sit where a single hole would put them, since two holes can make more images of a star than the search looks for. This is a thin lens, with all the bending at the hole’s distance. It has the exact bending of a hole without spin, within 0.6% from just outside the shadow outwards, and corrections for spin that agree with fully traced rays round a spinning (Kerr) hole to within 7% of the bend beyond 1.3 shadow radii. It works well while the body is far behind the hole, and less well when it is close. A rocky world more than a few hundred kilometres across is held together by its weight more than by the strength of its rock, so it is torn further out than a rigid moon, at about 1.7 times the primary’s radius by the cube root of the densities, where Phobos, held by its strength, keeps the rigid 1.26. A gas giant has no strength at all, and is torn as a star is. On an orbit that keeps it close it overfills its Roche lobe inside 2.44 on that scale and wears steadily away; a pass takes (ℛt/r_p)³ of it, ℛt being 0.93 times R·(M/m)^⅓ for a giant whose centre is about three times as dense as its mean, as Jupiter’s is (Ryu and others, 2020), so a pass inside about three times R·(M/m)^⅓ draws it out to points where its gas pours off.
Stepping through time
The simulator advances in fixed steps of a sixtieth of a second, with eight smaller substeps in each. Sandbox uses semi-implicit Euler integration, which is quick and keeps orbits from steadily gaining or losing energy. Realistic mode uses IAS15 unless you pick another integrator in Physics: it chooses its own steps, short during close passes and long on quiet orbits, and holds the error near the limit of the computer’s arithmetic. Block steps and leapfrog switch to Yoshida’s fourth-order version of leapfrog with three or more stars, which keeps the choreographies on their curves.
Softening
In Simple mode, the pull between a star and a planet is softened by ε, about 16 pixels, so a close pass bends a path instead of flinging the planet off at enormous speed. The softening weakens the pull close in, which turns orbits slightly backwards each lap, the opposite of Einstein’s correction. Realistic mode uses almost no softening, so it shows relativistic precession most cleanly.
Three dimensions
Every body has a height as well as a place on the screen, and gravity pulls in all three directions. A scene that starts flat stays exactly flat, because nothing then pulls anything out of its plane. The 3D view draws the scene in perspective, with a faint grid on the flat plane and a line from each body down (or up) to it. Its trails store each body’s recent positions in the scene, so they stay in place as you turn the view; with Paths on, each body keeps its last few thousand points.
References
The papers, data and galleries the simulator draws on.
- E. M. Standish, Keplerian Elements for Approximate Positions of the Major Planets, NASA JPL: the planets’ orbits in the Solar System presets.
- J. Bertrand (1873), “Théorème relatif au mouvement d’un point attiré vers un centre fixe”, Comptes rendus de l’Académie des sciences 77, 849–853: only the inverse square and the spring close every orbit.
- A. Einstein (1915), “Erklärung der Perihelbewegung des Merkur aus der allgemeinen Relativitätstheorie”, Sitzungsberichte der Preussischen Akademie der Wissenschaften, 831–839: Mercury’s perihelion.
- P. C. Peters (1964), Gravitational Radiation and the Motion of Two Point Masses, Physical Review: how fast gravitational waves shrink an orbit.
- P. Ehrenfest (1917), “In what way does it become manifest in the fundamental laws of physics that space has three dimensions?”, Proceedings of the KNAW 20, 200–209: unstable orbits in more than three dimensions.
- H. Yoshida (1990), Construction of higher order symplectic integrators, Physics Letters A: the fourth-order method used for systems of three or more stars.
- D. Hoffleit and W. H. Warren (1991), The Bright Star Catalogue, 5th revised edition: the stars of the sky.
- B. A. Archinal et al. (2018), Report of the IAU Working Group on Cartographic Coordinates and Rotational Elements: 2015, Celestial Mechanics and Dynamical Astronomy: the poles and turning of the Sun, planets and moons.
- Surface maps of the Sun, planets and Moon: Solar System Scope, based on NASA data, under the Creative Commons Attribution 4.0 licence.
- M. Šuvakov and V. Dmitrašinović (2013), Three Classes of Newtonian Three-Body Planar Periodic Orbits, Physical Review Letters: the Butterfly, Bumblebee, Moth, Goggles and Dragonfly initial conditions.
- James Montaldi and Katie Steckles (2013), N-Body Choreographies: the gallery and its Fourier data, with animations by Dan Gries.
- A. Chenciner and R. Montgomery (2000), A remarkable periodic solution of the three-body problem in the case of equal masses, Annals of Mathematics: the figure-eight.
- A. Toomre and J. Toomre (1972), Galactic Bridges and Tails, Astrophysical Journal: the close encounter.
