Here is a simulation of a galaxy using Newton’s law of universal gravitation. Click here to see a 3D rotatable model of the Milky Way Galaxy.
(* runtime: 8 seconds *)
n = 275; G = 1; SeedRandom[0]; image = Table[0, {n}, {n}]; nstar = 500;dt = 0.001; theta = Pi/4; Trot = {{1, 0, 0}, {0, Cos[theta], Sin[theta]}, {0, -Sin[theta], 1}};
stars = Table[r = 0.5 Random[]; theta = 2Pi Random[]; {Trot.{r Cos[theta], r Sin[theta],0.1(2Random[] - 1)Exp[-4r]} + {0, 0, 1}, Sqrt[G/r]{-Sin[theta], Cos[theta], 0}}, {nstar}];
Do[image *= 0.9; stars = Map[({r, v} = #; v -= G r dt/(r.r)^1.5; r += v dt; {x, y, z} = r; {j, i} = Round[n({x, y}/z + 0.5)]; If[0 < i <= n && 0 < j <= n, image[[i, j]] += 0.5/z]; {r, v}) &, stars]; ListDensityPlot[image, Mesh -> False, Frame -> False,PlotRange -> {0, 1}], {50}];
Links
- Milky Way and Andromeda Galaxy Collision – amazing simulations by John Dubinski
- Millennium Simulation – interesting video, see also Dark Matter Simulation
- Type Ia Supernova – simulations
- Simulation of Newtonian Gravity – Java applet by Mathew Tizard
- Hyperion Spiral Galaxy Demo – cool-looking but I don’t know how accurate this is
- Colliding Galaxies – fun Java applet, originally by Uli Siegmund
- galaxy – nice-looking Java applet
- Universe Holocube – 100 Megaparsec scale laser-etched crystal cube
- Milky Way Galaxy Holocube – scale laser-etched crystal cube
- Astronomy Picture of the Day – amazing astronomy pictures, some of my favorites are Crab Pulsar, Cat’s Eye Nebula, Eta Carinae, Variable star V838 Monocerotis, and Hourglass Nebula
- Cosmographica – impressive astronomical art gallery by Don Dixon
- Breakthrough Propulsion Physics (BPP) – is warp drive possible?






Recent Comments