Three-point circle algorithm