How a dying star is similar to a lava lamp