Manufacturers can make milk alternatives, like almond milk, shelf stable by adding emulsifiers such as xanthan gum, which helps keep fats suspended in the water. "Things that help to stabilize oil and water mixtures also tend to be good at stabilizing water-based foams," Hartings said. So, additives originally intended to keep some products from separating also improve the texture of a coconut milk latte.
Whether it starts with milk or an alternative, the finished foamy product will be a "porous viscoelastic material," said Howard Stone, head of the Complex Fluids Group at Princeton University in New Jersey. [Liquid Beauty: Dreamy Images Reveal Fascinating Physics]
Because it's porous, the milk foam will hold other fluids, like steam-injected air, but also espresso in between the bubbles. "The coffee is like the ink," Stone said. "[Liquid areas] are letting you print black and white."
Viscoelasticity means the foam will bounce back to its original shape when deformed slightly, but will also flow like a liquid if enough force is applied, Dressaire said. And the nature of that flow could be key to the marbling effect that the best latte art is able to achieve.
Rather than combining turbulently with milk already in the cup, newly added milk mixes in sheets, a motion called laminar flow. The stark borders that form between colors in the cup hold up, at least for a little while, because of the foam's elasticity.