Four and a half billion years ago there was no Sun, no Earth — just a vast, cold cloud of gas and dust drifting between the stars. Gravity pulled it inward, rotation spun it into a flat disk, and grains of dust slowly clumped into worlds. This is the nebular hypothesis. Scroll through the three animations to watch a star and its planets assemble themselves out of a collapsing cloud.
Start with a slowly turning molecular cloud. As gravity pulls it inward, conservation of angular momentum forces it to spin faster (like a skater pulling in their arms), and collisions cancel out up-and-down motion — so the cloud flattens into a disk. Material piling up at the centre heats and ignites into the proto-Sun. Use the time scrubber to fast-forward or rewind the collapse.
Inside the disk, dust grains collide and stick, building pebble-sized clumps, then mountain-sized planetesimals, which sweep up everything in their orbital lane and grow into planets. Where you are matters: inside the frost line it is too hot for ice, so only rock and metal survive — small rocky planets. Beyond it, ice survives too, giving cores enough mass to grab gas and swell into gas & ice giants. Press Replay to run accretion again.
Those two animations are the whole story in miniature. A few consequences fall straight out of it:
Gravity gathers it, rotation flattens it, accretion clumps it — gravity + rotation + accretion is the recipe for a solar system.