For thousands of years, thinkers have marveled at the feat of engineering that is the honeycomb.
Each waxy cell is a perfect hexagon, its six wafer-thin sides providing not only strength to the honeycomb structure but also the smartest way to store honey.
"By virtue of a certain geometrical forethought... (bees) know that the hexagon is greater than the square and the triangle and will hold more honey for the same expenditure of material in constructing each," wrote a 4th-century Greek geometer, Pappus of Alexandria.
For Charles Darwin, the honeycomb was "absolutely perfect in economising labour and wax."
But how do bees do it?
The answer, according to a new study, is that the cells do not start out as hexagons but as circles.
They gradually form into hexagons by a subtle flow of the wax, which is turned semi-molten by the heat from a special class of worker bee.
The solution is proposed by a trio of scientists in Britain and China, led by Bhushan Karihaloo of Cardiff University.
They looked at what happens after waxy flakes are pulled from the bodies of foraging bees by specialist bees tasked with building the honeycomb.
Working furiously, these bees operate side by side in adjacent and opposite circular tubes, which they build around themselves.
They knead the flakes and tamp them into place near the triple junctions of their tiny six-mm (quarter-inch) cylinders.
Heat provided by the workers and the physical properties of the wax then do what's necessary.
At a temperature of around 45 degrees Celsius (113 degrees Fahrenheit), the wax starts to flow slowly as an elastic, viscous liquid.
At the junction, surface tension causes the wax to stretch like toffee. It gradually pops upwards, forming a tiny point that becomes an "angle" of the hexagon.
During the process, the cell's walls are continually stretched. Ultimately, the walls of adjoining cells fuse and become straightened, forming a perfect hexagon.
Even if the riddle may have been solved through a combination of physics and maths, the scientists are keen to pay tribute to the insects themselves.
"We cannot... ignore, nor can we not marvel at the role played by the bees in this process by heating, kneading and thinning the wax exactly where needed," says the study, published in Britain's Journal of the Royal Society Interface.