Allegro.cc
Projects
Action252
Adventure22
Arcade216
Board Games30
Demos24
Emulators10
Other68
Puzzle139
Role Playing40
Sports25
Strategy58
Utilities46
Resource Directory
Code Gallery3
Compilers12
Help & Documents13
Libraries63
Media2
Tools8
IOTD: Colliding galaxies
Colliding galaxies
Colliding galaxies, by Evert

No exactly game-related, but it shows what I've been using Allegro for lately - visualising simulations of colliding galaxies.

This composition of screenshots shows the initial and later stage of one run in the upper half, and two renderings of a different simulation in the lower half. In each case, the left view corresponds to the xy plane (the equatorial plane) and the right one the xz plane.

The intruder galaxy (blue) is lighter than the target galaxy (yellow/orange). For each galaxy, the core is taken as solid, while the disks is modeled by individual particles (stars). Only the gravitational forces produced by the galactic cores are taken into account; the gravitational field of the disks is ignored.

For the `fuzzy' images, I wrote a short routine that draws a rectangle and interpolates the RGB values of the for corners over the surface. Red and blue intensities are a measure for the number of stars initially in galaxy 1 and 2 respectively. The green channel is the average of the red and blue channels.
This section is only available to registered Allegro.cc members.



The Gallery | Add your own image!
Poll
Is grammer and spelling important?
View Results