forked from: forked from: bouncing balls in 3d space

someone please refactor this.