It is currently Wed Dec 02, 2020 10:39 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: [PB 4.31] Random realistic solar system
PostPosted: Mon Oct 12, 2009 1:56 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Apr 01, 2008 3:23 pm
Posts: 151
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/download/purebasic/accrete-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...


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 4.31] Random realistic solar system
PostPosted: Wed Oct 14, 2009 8:56 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 01, 2003 10:55 pm
Posts: 206
Location: Austria, Vienna
I had a similar one on ZX Spectrum, which calculates a complete solar system depending on the size of the sun.

_________________
My PC
Ryzen 7 1700, 16 GB RAM, nVidia 1050 GT, Win 10
Bulldozer FX 6100 3.3 GHz, 8 GB DDR3 1600 RAM, nVidia 960 GT, Win7 x64
Athlon 5770, 8 GB RAM, nVidia 750 GT
intel Core Quad, Q8300, 4 GB RAM, nVidia GT 1050


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 4.31] Random realistic solar system
PostPosted: Wed Oct 14, 2009 10:00 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Jul 17, 2003 4:15 pm
Posts: 711
Whoa, Great Stuff! ;) Somehow brings back memorys of David Braben's Elite(tm) Series :D

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! ;)"


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 4.31] Random realistic solar system
PostPosted: Tue Jan 05, 2010 5:53 am 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 6262
Location: Wales, UK
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 4.31] Random realistic solar system
PostPosted: Tue Jan 05, 2010 9:23 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Jul 14, 2006 8:53 pm
Posts: 695
Location: Malta
only 1 word

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 4.31] Random realistic solar system
PostPosted: Tue Jan 05, 2010 10:08 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Apr 01, 2008 3:23 pm
Posts: 151
Thanks a lot for your kind comments, guys; It means a lot to me! :D


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 4.31] Random realistic solar system
PostPosted: Tue Jan 05, 2010 4:52 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 31, 2006 4:34 am
Posts: 540
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


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 4.31] Random realistic solar system
PostPosted: Tue Jan 05, 2010 11:03 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Jan 02, 2007 8:16 pm
Posts: 4327
Location: Cypress TX
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

_________________
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 4.31] Random realistic solar system
PostPosted: Wed Jan 06, 2010 1:06 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 31, 2005 11:09 pm
Posts: 3698
Location: Italy
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 :)

_________________
[ My little PureBasic review ]


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 4.31] Random realistic solar system
PostPosted: Thu Jan 07, 2010 12:54 am 
Offline
User
User

Joined: Sun Jun 29, 2008 9:11 am
Posts: 66
Location: Italy
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

_________________
----------------------------------------------------------------------------
Semel in anno licet insanire (Seneca)
email: somic@libero.it, website: http://www.semelinanno.com


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 4.31] Random realistic solar system
PostPosted: Thu Jan 07, 2010 1:54 am 
Offline
Addict
Addict

Joined: Wed Aug 24, 2005 8:39 am
Posts: 2736
Location: Southwest OH - USA
Incredible. :shock:

Very nice. Thanks for sharing.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 32 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye