Planet Simulator

Planet Simulator

Download...

I wrote this as a project for a graphics class. Since I was given leeway for the language, I chose Python. I tested it on my Thinkpad running gentoo, and my iMac running OS X 10.4.

From the README:

Inspiration

Paul Bourke's web page is a wonderous playground of graphics algorithms, cool ideas and code bits. His idea for generating random landscapes really caught my eye.

Paul Bourke's planet rendering

I decided to try my hand at it using my favorite language, Python, without looking at his "C" source code.

Prerequisites

Python 2.3+
[Pyopengl](http://pyopengl.sourceforge.net/)

Keyboard Commands

  • Esc Quit
  • r Randomly generate a crater.
  • m Median smooth see below.
  • s Save the planet data as planet.data
  • l Load planet.data
  • g Generate 10 planet slices.
  • c cycle through the colormaps:
    • mars_palette.txt
    • earthy-green_palette.txt
    • earthy-dirt_palette.txt
    • earthy-cliff_palette.txt
    • venus_palette.txt
    • neptune_palette.txt
  • p toggle Pause
  • x rotate on x-axis 5 degrees
  • y rotate on x-axis 5 degrees
  • z rotate on x-axis 5 degrees
  • = double the scale on the slices
  • - halve the scale on the slices
  • [ zoom out by 5 degrees
  • ] zoom in by 5 degrees

Popular Tags

Archives