Menu:

¯
RSS  RSS 2.0

Colliding galaxies

While astronomers are busy watching mice collide, flash programmers are also busy working around limits of its computing power. For example, I made this StarField class to allow you simulate up to 50K stars efficiently, each having its own vertex and color. This allows for wide range of effects, from boring starry background to dust devils. What you can see here is simulated collision of two galaxies each made of 4500 stars.

Go get flash player

The gravity in this simulation is modelled using fast and dirty algorithm which, however, also brought singuarities and accumulating errors in the game. So to conquer that, I had to hack gravity laws a bit.

Sources can be downloaded here. Enjoy!

Comments