[PB 4.31] Random realistic solar system
-
- Enthusiast
- Posts: 151
- Joined: Tue Apr 01, 2008 3:23 pm
[PB 4.31] Random realistic solar system
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 , 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:
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...
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 , 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:
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
I had a similar one on ZX Spectrum, which calculates a complete solar system depending on the size of the sun.
My PC
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
Re: [PB 4.31] Random realistic solar system
Whoa, Great Stuff! Somehow brings back memorys of David Braben's Elite(tm) Series
Cheers,
Thalius
Cheers,
Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! "
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! "
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: [PB 4.31] Random realistic solar system
A fabulous piece of work -concise, clever and very interesting. Reading your code is an education itself and the GUI works really sweetly.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
- Enthusiast
- Posts: 732
- Joined: Fri Jul 14, 2006 8:53 pm
- Location: Malta
- Contact:
Re: [PB 4.31] Random realistic solar system
only 1 word
wow!
Well done
wow!
Well done
I may not help with your coding
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
-
- Enthusiast
- Posts: 151
- Joined: Tue Apr 01, 2008 3:23 pm
Re: [PB 4.31] Random realistic solar system
Thanks a lot for your kind comments, guys; It means a lot to me!
Re: [PB 4.31] Random realistic solar system
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
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
- Rook Zimbabwe
- Addict
- Posts: 4326
- Joined: Tue Jan 02, 2007 8:16 pm
- Location: Cypress TX
- Contact:
Re: [PB 4.31] Random realistic solar system
Likewise with I had same issue with my Avast.
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!
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!)
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!
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!)
Re: [PB 4.31] Random realistic solar system
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
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
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
Re: [PB 4.31] Random realistic solar system
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
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
----------------------------------------------------------------------------
Semel in anno licet insanire (Seneca)
email: somic@libero.it, website: http://www.semelinanno.com
Semel in anno licet insanire (Seneca)
email: somic@libero.it, website: http://www.semelinanno.com
Re: [PB 4.31] Random realistic solar system
Incredible.
Very nice. Thanks for sharing.
Very nice. Thanks for sharing.