Page 1 of 1

[PB 4.31] Random realistic solar system

Posted: Mon Oct 12, 2009 1:56 pm
by Kelebrindae
Hi,

Here is the sequel of these two previous threads:
- Random terrain
- Random planet mesh

The purpose of this program is to generate "scientifically sound" solar system, along with a lot of informations about each of its planet (type, year duration, temperature, atmosphere, etc..).
It is mainly based on two (rather old) articles :
- "Habitable Planets for Man", S. H. Dole (1964)
- "Extra-Solar Planetary Systems: A Microcomputer Simulation", Martyn J. Fogg (1985)
and on several implementations of an algorithim called "Accrete" (Pascal, C, C++, Java...).

The principle is to create a random star with a random quantity of gas and dust around it, and to simulate the accretion of these gas and dust to form planets. Then, from the size/mass/composition/position of these planets, it computes what it looks like.
I can't say that I have a complete understanding of the theory, far from it :wink:, but I actually managed to get something that works. I've even added a few things here and there (what's in a liquid state on the surface, etc..).

Well, here you go. It's a beta version, not perfect nor complete, but it's already quite fun. I can't post the code here (too big) but you'll find it in this zip archive:
http://keleb.free.fr/codecorner/downloa ... ete-en.zip
along with an EXE to test it.

Screenshot:
Image

The ergonomy of the screen is quite bad, so:
- Type in a number in the "seed" zone (or let it blank) to initialize the random number generator, then click on "Generate".
- To browse the planets of the system, click on the tiny buttons under the image
- To zoom on a planet and browse its satellites, click on the tiny "+" button.

A few seeds that gives interesting results:
- 863150: 11 planets, 1 terrestrial planet with 1 terrestrial moon, both habitable
- 25329 :9 planets, 1 sub-Gas giant with its outer layer at 14.8°C and 1 habitable moon (perfect if you want to install a gas mine a la Bespine)
- 528439: 12 planets, 1 venusian, 1 non-habitable terrestrial, and a nice asteroids belt
- 103365: 13 planets, 1 oceanic planet with breathable atmosphere

To do:
- Some infos are missing for moons (distance from the planet, rotation, etc.).
- Add rings around planets.
- Improve the planet classification (I still don't know what to do of the "gas dwarves", which are massive enough to accrete gases like the gas giants, but are composed of almost 100% solid stuff like the rocky planets).
- The name generator could be better.


That's all! Now, it's time to boldly go where no man has gone before...

Re: [PB 4.31] Random realistic solar system

Posted: Wed Oct 14, 2009 8:56 pm
by LCD
I had a similar one on ZX Spectrum, which calculates a complete solar system depending on the size of the sun.

Re: [PB 4.31] Random realistic solar system

Posted: Wed Oct 14, 2009 10:00 pm
by Thalius
Whoa, Great Stuff! ;) Somehow brings back memorys of David Braben's Elite(tm) Series :D

Cheers,
Thalius

Re: [PB 4.31] Random realistic solar system

Posted: Tue Jan 05, 2010 5:53 am
by IdeasVacuum
A fabulous piece of work -concise, clever and very interesting. Reading your code is an education itself and the GUI works really sweetly.

Re: [PB 4.31] Random realistic solar system

Posted: Tue Jan 05, 2010 9:23 am
by kinglestat
only 1 word

wow!

Well done

Re: [PB 4.31] Random realistic solar system

Posted: Tue Jan 05, 2010 10:08 am
by Kelebrindae
Thanks a lot for your kind comments, guys; It means a lot to me! :D

Re: [PB 4.31] Random realistic solar system

Posted: Tue Jan 05, 2010 4:52 pm
by yrreti
I hate to tell you this, but avast reports a virus: Win32:SkiMorph [Cryp] :?:
on your file at http://keleb.free.fr/codecorner/downloa ... ete-en.zip.
Could you or someone else check it as it looks very interesting. But avast won't let
me download it.
Thanks

Re: [PB 4.31] Random realistic solar system

Posted: Tue Jan 05, 2010 11:03 pm
by Rook Zimbabwe
Likewise with I had same issue with my Avast. :evil:

I used my honeypot cpu to DL it at work though... It has several viri attached to it. Looks like it was attracted on host or on transmit host account! :evil:

Sad... this look sSO COOL!!!! I was wondering if you could add a graphic for the "life zone" around eaach star... (there are formulas for this!) :D

Re: [PB 4.31] Random realistic solar system

Posted: Wed Jan 06, 2010 1:06 am
by luis
EDITED: sorry, I wrote bad things about Avast, when usually it's quite good.

I confused it with another: Avira, don't know why... well probably because the name is similar.

Anyway, just donwloaded the zip, I followed exe execution until startup. It doesn't do anything suspicious.

A normal PB executable IMHO.

Nice idea for the program BTW :)

Re: [PB 4.31] Random realistic solar system

Posted: Thu Jan 07, 2010 12:54 am
by somic
Very Nice.

Thank you for sharing.

It remembers me when I was playing (a lot) with my ZX Spectrum (me too, LCD ;-) and (less) with Elite (me too, Thalius ;-).

rgds,
Somic

Re: [PB 4.31] Random realistic solar system

Posted: Thu Jan 07, 2010 1:54 am
by rsts
Incredible. :shock:

Very nice. Thanks for sharing.