Ice cubes in a water glass

By |

The animation simulates the physical behavior of ice cubes in a glass of water. By clicking or using a button, ice cubes can be created that fall into the water, submerge, and float to the surface due to buoyancy—an illustrative example of Archimedes’ principle.

Links

Description of the Animation

The animation shows a glass filled with water into which ice cubes can be dropped. The ice cubes are subject to gravity, sink into the water, and create realistic wave effects on the water surface. After submerging, they float due to the difference in density between ice and water.

The floating behavior is based on Archimedes’ principle: A body in water experiences an upward buoyant force equal to the weight of the displaced water. Since ice has a lower density than water (about 0.92 g/cm³ compared to 1.0 g/cm³), it floats with about 8% of its volume above the water surface.

The water surface reacts dynamically to the submerging ice cubes. Wave propagation is simulated using a spring-mass system in which adjacent surface points are coupled. This creates realistic wave effects with propagation, reflection at the glass walls, and gradual damping.

Interactive Controls

The animation offers several interaction options:

  • Mouse click: A click above the water surface creates an ice cube at the click position, which then falls into the water.
  • + Ice cube: Adds an ice cube at a random position above the water.
  • Reset: Removes all ice cubes and restores the calm water surface.

A maximum of 12 ice cubes can float in the glass at the same time. The ice cubes interact with the glass walls and can rotate slightly due to the wave motion.