A solar system of food
Everyday foods, orbiting in black and white. Which orbit is your favourite?
On the last page of my home, the things that matter to me orbit around a small centre. I often imagine orbits like these for many of the topics that interest me, and food is one of them. Here I borrowed that universe for something ordinary: what we eat. Each planet is a food, and its orbit depends on how many kilocalories it has per 100 grams. Cucumber and coffee stay close to the centre. Butter and olive oil drift along the outer edge.
Add and remove planets below to build your own system. Hover over a planet (or tap it) to see its value. And if you want another universe, it has a sibling: a solar system of footprints.
Planets
Press a food to add it to the system, or press it again to send it away.
A note on the numbers
Energy is only one side of a food. Olive oil sits on an outer ring not far from sugar, and coffee orbits close to the centre with cucumber, but that says nothing about which ones are good for you. This is a picture of one number, not advice.
All values are energy per 100 grams of the edible part, for the food as it is usually eaten: boiled rice and pasta, a boiled egg, brewed coffee.
See all the data (from the Swedish Food Agency's food composition database)
| Food | kcal / 100 g | Database entry |
|---|
The solar system formula
In the solar system, the Sun pulls each planet with a force that weakens with distance, and that sets how fast the planet must travel to stay in orbit. Kepler's third law can be applied to other things if you substitute specific parameters. For a planet at distance r, it gives an angular speed:
ω = √(G · M / r³) → ω ∝ r^(−3/2)
Here there is no gravity. Calories take its place, and they decide the distance instead of the speed. Each food falls into one of seven bands of energy, and each band is a ring:
ring = 1 if kcal < 50, 2 if < 100, 3 if < 200, 4 if < 400,
5 if < 500, 6 if < 600, 7 otherwise
r = 0.16, 0.29, 0.42, 0.55, 0.69, 0.83, 0.97
(fraction of the system's radius)
Then the speed follows a softer version of Kepler's law. With the real exponent, the outer planets would barely move, so I use −0.8 instead of −1.5:
ω = 0.26 · (r / 0.16)^(−0.8) radians per second
x = centre + r · width · cos(θ)
y = centre + r · height · sin(θ) with θ growing by ω every second
The size of each planet grows with the square root of its energy (2.5 + 0.38 · √kcal pixels), a bit like mass. When a food joins the system, it starts outside and slides towards its ring, covering a fixed share of the remaining distance every frame, so it slows down as it arrives. And planets on the same ring push each other gently apart, so their names can be read.