Coding Adventure: Planetary Fluid Sim
From Sebastian Lague · · 27 min

The player loads from YouTube only when you click. It uses YouTube's privacy-enhanced mode.
If the video does not play, the owner may have turned off embedding. Watch it on YouTube instead.
Description
Until today, the Fluid Simulation has been confined to a tiny box. Let's set it free on a planet, with a little orbiting moon, and see what happens!
Support my work (and get early access to new videos and source code) on Patreon or Nebula * Patreon: https://www.patreon.com/SebastianLague * Nebula: https://go.nebula.tv/sebastianlague
Source Code: * GitHub https://github.com/SebLague/Fluid-Planet
Check out my other fluid simulation videos: https://youtube.com/playlist?list=PLFt_AvWsXl0dJrPelwdVSMVC_MDTYPJWn&si=Z5cOCDSI1aS4fe_C
Credits: * Music: https://raw.githubusercontent.com/SebLague/Misc-Project-Info/refs/heads/main/Coding-Adventures/FluidPlanet.txt
Chapters: 00:00 Intro 00:25 Playing with Gravity 03:11 Adding Simple Collisions 04:21 Implementing Orbits 05:36 Visualizing Tidal Forces 07:46 Fluid Shell 08:50 Tide Watching 11:54 Implementing the Earth 17:25 Oceans on Earth 20:26 A Terraforming Experiment 23:48 3-Body System