Compute distance in 3D.
Validate position range.
Implement octree.
Finish Exercise 2.
Cleanup.