elastic collision in 3D | ScratchStats