This is a solar system in WebGL, made for a university assignment. It scored 89%.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
documentation
source
.gitignore
Gruntfile.js
README.md
package.json

README.md

CS32310 - Advanced Computer Graphics assignment

The assignment, worth 50% of the module, requires visualising a 3D animated solar system in WebGL.

Instructions

Run:

cd assignment

python -m SimpleHTTPServer

Then go to http://localhost:8000/source/ to see the solar system, or http://localhost:8000/api-docs/ to see the documentation.

Hooks

The program adds a webgl_solarsystem__loaded class to the body to tell you when all the assets have finished loading. You can hook into this and add your own loading gifs, etc.

The loading gif I use in the example is taken from the BBC's iframe scaffold.

Maintenance

I use Grunt to make sure my JavaScript is linted and to generate my documentation. To replicate this on your machine:

  • download and install Node.js, and then Grunt
  • cd into this directory
  • Install the node modules (npm install)
  • You can now run grunt to run the automated processes.

Acknowledgements

Orbit distances taken from:

http://www.northern-stars.com/solar_system_distance_scal.htm

Orbit periods and rotation periods taken from:

http://www.windows2universe.org/our_solar_system/planets_table.html

Planet sizes taken from:

http://www.universetoday.com/36649/planets-in-order-of-size/

Planet axes taken from:

http://www.astronomynotes.com/tables/tablesb.htm

Jupiter's Galilean moons info taken from:

http://www.daviddarling.info/encyclopedia/J/Jupitermoons.html

Saturn's rings info taken from:

http://cseligman.com/text/planets/saturnrings.htm

Planet texture maps were taken from:

http://planetpixelemporium.com/

Lots of code taken from/inspired by various lessons at:

http://learningwebgl.com/blog/?page_id=1217

Phong shading very much taken from:

http://learningwebgl.com/blog/?p=1658