Bees build their combs out of regular hexagons: six equal sides and six equal angles of 120°. Three cells meet at every corner, and 3 × 120° = 360°, so they leave no gaps. Only three regular shapes can cover a floor all by themselves: triangles, squares and hexagons.
The source code is at github.com/KirillOsenkov/LiveGeometry. It is written in .NET and Avalonia.