Measuring densities of solids and liquids using magnetic levitation: fundamentals.