This is a fork of Mitch Anderson's Accrete.js, adding unit tests and moving the code to a more modern, functional based method. In addition, the Astro.js library has been expanded to include more information for each planet. Much of this was built upon work done by David Caleb Robinson, again adding tests and better organization.
Accrete.js is a port of the awesome planetary system simulation algorithm, Accrete to JavaScript. Originally published* and partly programmed (via FORTRAN) by the amazing Stephen H. Dole. Almost a decade later Carl Sagan and Richard Isaacson refined Dole's model -- which shortly thereafter was also implemented in FORTRAN, and again elaborately and academically published by Martin Fogg.
The late 80's came and Matt Burdick brought this priceless program to the masses (via Turbo Pascal and C). Since then, many versions of Accrete have popped up around the internet, adding varying degrees of planetary specifics the most notable (and ingenious) being Jim Burrow's implementation StarGen. Ian Burrell's Java port is another great up-to-date example (and a huge help in Accrete.js).
Check out, add to, and keep an eye on the render directory for different visualizations of your generated star system. Currently, there's a basic WebGL rendering that I'm still (slowly) adding to.
- A full build process for Browser/Node scripts and modules.
- Implement a good chunk of StarGen's features.
- Organize the codebase into a more modern, and JavaScript friendly structure.
- Live WebGL view and screenshot options for created systems.
- Other cool things to take advantage of this amazing program.
For now, just use accrete.js, which includes each module concatenated in order. Include that script in any environment and the following will output your basic planet data for a system similar to our own:
var gen = new Accrete();
var system = gen.distributePlanets();
for(var i = 0; i < system.length; i++) {
system[i].print();
}
In order to run the tests, you will need node.js, npm and mocha installed. Then you can run
npm install
and finally, in order to run the tests, use:
npm test
Nothing here could have ever (ever, ever, ever) been done without the following amazing, generous, and brilliant people:
- Stephen H. Dole
- Carl Sagan
- Richard Isaacson
- Martin Fogg
- Matt Burdick
- Ian Burrell
- The many brilliant minds that have contributed their knowlege to, and insights into our awe-inspiring universe.
- The original Dole Paper can be viewed here.