Compute direction vector dir
from camera to earth as
dir = earth.pos - camera.pos
A line that extends both ways to infinity through camera and earth can be described as
L = camera.pos + π * dir
with:
π < 0
: positions behind the camera (when looking at earth)
π = 0
: position at camera
0 < π < 1
: positions between camera and earth
π = 1
: position at earth
π > 1
: positions beyond earth (when looking at earth)