This Demonstration simulates a simple Galileo thermometer.
This thermometer works by virtue of the principle of buoyancy. The five glass spheres rise or fall in water depending on their density and the local density of water. The spheres are partly filled with a colored liquid to identify them. They are calibrated to have their density equal to the density of water at five target temperatures: 18, 20, 22, 24, and 26 °C. When the water is warmer than one of these temperatures, the density of the corresponding spheres is greater than that of the water and the sphere sinks.
The approximate temperature indicated by this "thermoscope" is the mean between the values marked by the highest sunken sphere and the lowest floating sphere.