Skip to content

kbingman/accretejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ACCRETE.js

Planetary system creation simulation in the browser or on server.

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).

Render

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.

Goals

  1. A full build process for Browser/Node scripts and modules.
  2. Implement a good chunk of StarGen's features.
  3. Organize the codebase into a more modern, and JavaScript friendly structure.
  4. Live WebGL view and screenshot options for created systems.
  5. Other cool things to take advantage of this amazing program.

Usage

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();
}

Testing

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

THANK YOU

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.

About

Fork and expansion of tmanderson/Accrete.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published