Posted June 11, 2022 by zenith391
Since many years, I've always wanted a sort of successor to SimEarth. Even if the game was made before I was even born, I always have found interesting and weirdly captivating the way that a lots of simple systems interact, to make in the end a planet like the Earth. It also really help gauge how many thing we need for life to exist (see the Fine-tuned universe theory to see how it applies to the whole universe). And I want to perpetuate this feeling in Stella Dei.
And there was Light
If the Earth was flat, it would have helped me as it would have made all algorithms much simpler to make and faster. But no, sadly the Earth and all planets are spheres-ish (slightly flatenned on the poles) and I need to account for that. First thing to know is that when I'll do temperature and water simulation, etc. I'll do it point per point. So I needed to distribute points evenly on a sphere.
Fortunately, in computer graphics there's a very simple way to generate a sphere with points, called an UV sphere. Hooray! Except.
The poles have WAY too many points (see how the lines all cross towards the poles). So I searched more and found out that having points perfectly evenly spaced on a sphere is impossible. I then found about Fibonacci lattice which gives a bunch of unconnected points which is inconvenient because computers make 3d graphics using triangles, not single points. All of that until QuantumDeveloper just suggested I use an ico-sphere.
An icosphere is based on an icosahedron that you subdivide into more triangles at each step.