Implement inefficient ray-terrain intersection