3D model of eclipses in the earth-moon-sun system