Planetary accretion code

Linguofreak

Well-known member
Joined
May 10, 2008
Messages
5,034
Reaction score
1,273
Points
188
Location
Dallas, TX
I know that several people on OF have in the past developed projects that have involved, as part of their scope, randomly generating planetary systems (OrbiterGalaxy and Spaceway jump immediately to mind, both are defunct, as I recall).

I know that a lot of hobbyist code has used some variation on the "accrete" algorithm from the '70's, but that it has the limitation of not modeling hot Jupiters, and I believe, not modeling binary systems.

Can anybody comment on more modern open-source hobbyist or low-level-academic code (low-level-academic meaning doesn't require a graduate degree to work with, runs on consumer hardware, as opposed to billion-particle n-body simulation requiring three months of compute time on some massively-parallel-data-center-filling-monster, etc)? Or does everybody pretty much still use accrete?
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
Been a while since i looked for anything like that. From what i remember, newer code was available from NASA's code release program, but it was extremely convoluted and bound into many arcane frameworks, making it impossible to really use. One i really wanted to get to work was the stellar lifecycle simulation thing.

For Spaceway, i used the old acrete and added a bunch more less-than-scientific dice rolls for things like multiple stars, moon parameters, atmospheric composition, mineral availability and the rest.
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
Not aware of anything newer that actually simulates accretion, but depending on your purposes there are alternatives that just use statistical distributions based on observations and current models. I.e. they don't simulate accretion, but just try to come up with a credible end result. So depending on whether you just want something that generates cool star systems that mostly have an air of credibility or are after actual scientific modelling, those will have much better results than the somewhat limited accrete-based solutions.

An in my opinion very good one of those is contained in the GURPS: Space rpg source book (along with tons of other helpful things for science-fiction world building). It's conceptualised in a way that it can be used manually (i.e. rolling dice and taking notes), though that does take a pretty long tinme. I remember coding most of it up in an android app when I needed an interesting little project to force myself to get a hang of android and java, and the results were a lot better than what I had gotten out of stargen before. Don't think I ever finished the extended atmospheric model I wanted to put in though...
Still, that code should still be lying around somewhere, if you're interested. (The source book is highly recommendable if you're into worldbuilding either way).

There also has to be a decent system generation algorithm based on statistical distribution lying around somewhere in the Pioneer source code, I guess.
 
Last edited:

Linguofreak

Well-known member
Joined
May 10, 2008
Messages
5,034
Reaction score
1,273
Points
188
Location
Dallas, TX
Not aware of anything newer that actually simulates accretion, but depending on your purposes there are alternatives that just use statistical distributions based on observations and current models. I.e. they don't simulate accretion, but just try to come up with a credible end result. So depending on whether you just want something that generates cool star systems that mostly have an air of credibility or are after actual scientific modelling, those will have much better results than the somewhat limited accrete-based solutions.

An in my opinion very good one of those is contained in the GURPS: Space rpg source book (along with tons of other helpful things for science-fiction world building). It's conceptualised in a way that it can be used manually (i.e. rolling dice and taking notes), though that does take a pretty long tinme. I remember coding most of it up in an android app when I needed an interesting little project to force myself to get a hang of android and java, and the results were a lot better than what I had gotten out of stargen before. Don't think I ever finished the extended atmospheric model I wanted to put in though...
Still, that code should still be lying around somewhere, if you're interested. (The source book is highly recommendable if you're into worldbuilding either way).

There also has to be a decent system generation algorithm based on statistical distribution lying around somewhere in the Pioneer source code, I guess.

Statistical or lightweight simulation works. What's Pioneer?
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
Statistical or lightweight simulation works. What's Pioneer?

Basically a Elite2: Frontier remake that is still in somewhat sporadic development:
https://pioneerspacesim.net

Their generator provides nice and varied results, but I have no idea how simple it would be to pick it out of the engine, I've never really looked at the code.
 

Linguofreak

Well-known member
Joined
May 10, 2008
Messages
5,034
Reaction score
1,273
Points
188
Location
Dallas, TX
An in my opinion very good one of those is contained in the GURPS: Space rpg source book (along with tons of other helpful things for science-fiction world building). It's conceptualised in a way that it can be used manually (i.e. rolling dice and taking notes), though that does take a pretty long tinme. I remember coding most of it up in an android app when I needed an interesting little project to force myself to get a hang of android and java, and the results were a lot better than what I had gotten out of stargen before.

And I just figured out another issue with Accrete/Stargen, and why, despite the source being publicly available, it's not in the Ubuntu repositories: It is absolutely murky as far as copyright goes. The guy that wrote the first C code implementing the algorithm released it on Usenet back in the day without any license attached, which under the Berne Convention means all rights reserved. But, of course, if you're just casually posting it on a public network, that's probably not what you actually intend. And all the people that have adapted that code afterward have also released their source publicly without any explicit license. The credits file for Stargen has a word-of-mouth account from somebody who apparently managed to contact the original accrete author (who had dropped off the net long ago when that was written, let alone by now), and was told that he was OK with any non-commercial usage, but that's about the only thing that's ever been said about the copyright for any of it.

And then Stargen uses images sourced from JPL and marked all rights reserved. JPL is a public/private partnership overseen by NASA. The "private" part of that means that by the letter of the law, the images, marked all rights reserved, aren't even actually legal to distribute or use, but the "public" part means that by the spirit of the law, which states that all works of federal employees in the course of their duties are in the public domain, it really should be legal to use because the US taxpayer paid for it.

And then an initially promising-looking derivative of Stargen that handles planetary migration is in an entirely unambiguous (and bad) position where copyright is concerned: most of it has no explicit license, but it incorporates a single source file with an explicitly noncommercial use license, but then also links to the GNU Scientific Library, which is under the GPL (not LGPL, and no linking exception), which means that one can't modify and redistribute the entire package without violating at least one license.

The upshot of this all is that if I want to use the accrete algorithm at all in anything that I might possibly think of releasing publicly, I'm going to need to implement it from scratch myself. :compbash:
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
The upshot of this all is that if I want to use the accrete algorithm at all in anything that I might possibly think of releasing publicly, I'm going to need to implement it from scratch myself. :compbash:

[sarcasm]
Or just be a criminal. Today you'll end up as such anyway, if you do anything at all in computer science. Copyrights, copy-lefts, GDPR, upload-filters, hacker paragraphs... legislation all around the world is working hard to make you a criminal the moment you open a text editor to write code. After all, only the proper people should have the power to write computer programs, right?
[/sarcasm]
 

Linguofreak

Well-known member
Joined
May 10, 2008
Messages
5,034
Reaction score
1,273
Points
188
Location
Dallas, TX
[sarcasm]
Or just be a criminal. Today you'll end up as such anyway, if you do anything at all in computer science.
[/sarcasm]

Not the first time. From the 18th century:

"It is a melancholy truth, that among the variety of actions which men are daily liable to commit, no less than a hundred and sixty have been declared by Act of Parliament to be felonious without benefit of clergy; or, in other words, to be worthy of instant death."
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
So Orbiter Galaxy is illegal? Big whoops... :lol:

Psst, let sleeping dogs lie. It is illegal and you should feel like a criminal, but nobody is using it, anyway. Just chastise yourself the next time you dare to think about programming something that is free to use for everybody. You bad, bad developer! :lol:
 

Linguofreak

Well-known member
Joined
May 10, 2008
Messages
5,034
Reaction score
1,273
Points
188
Location
Dallas, TX
So Orbiter Galaxy is illegal? Big whoops... :lol:

If you released it under a non-commercial use license, then it's probably legal except maybe for the images from stargen, but the previous authors didn't do a good job of making that clear.

One reason that code out of the US can end up having vague copyright is that we've only been a signatory to the Berne Convention since 1988 (implemented by legislation in 89) and have only had Berne-like copyright law since 1976, so when the first versions of accrete that are available online were written, the way that older people (or younger people that consulted older people that weren't up to date) remembered copyright law working would have been different to how it actually worked. In particular, before 1976, works had to be registered with the copyright office and have a copyright notice to actually be protected. That's less of an issue with recent works now that a Berne-like structure has been in place for almost half a century, but can make the letter-of-the-law legal status of a work significantly different from the author's intent for older works.
 
Top