Gravity of ring planets and annular disks