How are the perihelion and aphelion of a planet determined?