CUDA terrain density function, a first step