explain how the sun’s gravity affects the planets.