A floating body settles at the waterline where the weight of water it displaces exactly equals its own weight (Archimedes' principle). For a body of uniform density, that reduces to a simple ratio: the submerged fraction of its volume equals ρice / ρwater, independent of size or shape.
submerged fraction = ρ_ice / ρ_water
buoyant force = ρ_water · V_submerged · g
weight = ρ_ice · V_total · g
at equilibrium: buoyant force = weight
This lab treats the jagged cross-section as a 2D polygon and finds the waterline numerically: it clips the polygon at a trial height, measures the submerged area with the shoelace formula, and binary-searches the height until submerged-area ⁄ total-area matches ρice/ρwater — the same equilibrium condition, solved geometrically instead of assumed. The 3D companion animates a fixed ~90% waterline for visual effect; here the line is actually derived from the two density sliders every time they move, so glacier ice in fresh water (≈90% submerged) and denser ice in salty seawater (≈88%) sit at visibly different depths. Volume, mass and displaced volume extrude the 2D cross-section through an assumed 18 m breadth to give illustrative real-world units.
- Dashed line — the computed equilibrium waterline.
- Tinted lower half — the submerged portion, shown through the translucent water layer.
- New shape — regenerates a fresh jagged silhouette; the equilibrium waterline is recomputed for it immediately.