Spherical coordinate system in ActionScript

Kim Christiansen @ Sep 21 2010 11:05 am

To understand the spherical coordinate system i created an example showing the change of the values phi and theta.
The coordinates can be retrieved from spherical coordinates (r, θ, φ) where r = radius, θ=theta and φ=phi by this calculation
pX = radius * Math.sin(theta) * Math.cos(phi);
pY = radius * Math.sin(theta) * Math.sin(phi);
pZ = radius * Math.cos(theta);

You can rotate the particles using the arrow keys.
Thanks to bit101 for the great minmalcomps.