Here's how it works:
* Light bends: When light passes from one medium to another (like from air to denser air), it bends. This bending is called refraction.
* Atmosphere's density: The Earth's atmosphere is denser near the ground and less dense higher up.
* Light from the horizon: Light from the sun or moon near the horizon has to travel through more of the atmosphere at an angle. This causes the light to bend more than light coming from directly overhead.
* Elliptical shape: This bending of light near the horizon makes the bottom of the sun or moon appear stretched out, creating the illusion of an ellipse.
It's important to note that the sun and moon are actually spherical objects, and the elliptical shape is just an optical illusion caused by the way light travels through the atmosphere.