eureka
§ A83

Buoyancy & Stability

Imagine jumping into a swimming pool. You feel lighter, right? That's buoyancy in action! "Eureka!" is the famous exclamation the ancient Greek scientist Archimedes made when he realized that water pushes back up against anything placed in it. This upward push is the secret to why massive, heavy steel ships can float across the ocean instead of sinking like a stone, and why they manage to stay upright in rough seas.

Archimedes' Principle

When you place an object in water, gravity is constantly pulling it down. But the water fights back! It pushes upward. The strength of this upward push is called the buoyant force ($F_B$). Archimedes discovered a brilliant rule: this upward force is exactly equal to the weight of the water that the object moved out of the way (displaced) when it went in.

$$ F_B = \rho_{\text{fluid}} \cdot V_{\text{sub}} \cdot g $$

In this equation, $\rho_{\text{fluid}}$ (rho) is how dense or heavy the liquid is, $V_{\text{sub}}$ is the volume (amount of space) of the object that is actually underwater, and $g$ is gravity. Basically, if the buoyant force pushing up matches the object's total weight pulling down, congratulations—the object floats!

Metacentric Stability: Why Don't Boats Tip Over?

Floating is only half the battle. A boat also needs to stay upright without flipping over and dumping everyone into the water. To understand how ships do this, we have to look at an invisible tug-of-war between two important points:

When a floating object tilts (like when a wave hits it), its underwater shape changes. Imagine a square block tipping slightly to the right. The right side sinks deeper into the water, and the left side lifts out. Because there's now more block underwater on the right side, the Center of Buoyancy also shifts to the right to support it.

If you draw a vertical line straight up from this new Center of Buoyancy, it will intersect the object's vertical centerline at a point called the metacenter.

The Golden Rule of Stability: If the metacenter is above the Center of Gravity, the upward push of buoyancy and the downward pull of gravity will twist the object back upright. If the metacenter is below the Center of Gravity, those same forces will cause the object to capsize and flip over! This is why a flat plank floats nicely, but a square block of light wood often prefers to float diagonally.

How do we simulate this?

In a physics engine, figuring out the exact shape of the submerged part of an object on every single frame is tricky. We use an algorithm called Sutherland-Hodgman polygon clipping. It acts like a pair of mathematical scissors, cutting the object exactly at the water line. By finding the exact area and center of that underwater shape, the computer knows exactly how much to push up, and exactly where to push it!