The Mathematics of Collision Avoidance in Two Dimensions