From Wikimedia Commons, the free media repository
Jump to: navigation, search

Cosmos-animation is a python script to create schematic animations of fixed-size galaxies in an expanding space. Different models are implemented according to the Friedmann equations.


The python script generates an ensemble of randomly placed dots to represent galaxies. Their distances are then scaled with a time-varying parameter.

  • Drawing is done with the cairo library.
  • The mathematics to solve the differential equations is done with scipy.
  • For image format conversion the convert command of ImageMagick is used.
  • The animations are assembled with gifsicle.

Images created with this script[edit]