perlin heightmap generation for mesh - it works, but I really don't know what I'm doing