The n-body problem in 3 dimensions

Now we've done the 2D case, it shouldn't be too hard to make a 3D $n$-body simulation, and animate the result in Julia. I can't resist showing you the final product:

In [1]:
# Function for creating an embedded video given a filename
function html_video(filename)
	base64_video = base64(open(readbytes, filename))
	"""<video controls src="data:video/x-m4v;base64,$base64_video">"""

display("text/html", html_video("4Body3D.mp4"))