def elements_for_apsides(apocenter_radius, pericenter_radius):
    """Calculate planar orbital elements for given apside radii."""
    ra = apocenter_radius
    rp = pericenter_radius

    a = (ra + rp) / 2
    e = (ra - rp) / (ra + rp)
    return a, e