You need to upgrade your Adobe Flash Player.
Click here to get the newest version of the player.
Black hole is an application made with Processing. I have been working on it for few last months.
Making it I had to learn some OpenGL and remind my math backgrounds, but I hope it was worth it. At the beginning I wanted to create a dark sphere with dynamic glow. Using a OpenGL substractive blending and simple math transformation I created a resizing glow similar to cloud or nebula. [Turn on the speakers please]
Afterwards I decided to add some particles. I created the 2nd sphere consists of 2500 particles. Position of each particle is generated randomly, but I used a special normalized coordinates. Using following formula
(cos(θ)sqrt(1-u²), sin(θ)sqrt(1-u²), u) where 0≤θ≤2π and -1≤u≤1, gives me an evenly distributed set of points instead of spherical coordinates, which causes too many points to cluster at the poles. Also I used a OpenGL depth buffer to increase sense of depth.
The last step was adding dust and responding to the audio. I used audio to influence a set of objects properties. So the size and behavior of each particle and nebula are related directly to a specific frequency and its amplitude. Also dust’s position and behavior are related to perlin noise.
Here you can download mov file (127 MB). Audio by John Murphy.