bouncing balls in 3d space

someone please refactor this.