1.根据圆上的两个点和半径获得两个圆的算法
#define MAXCOM_F(a, b) ((a)-(b)>0.00001) ? true : false
QVector<QRectF> EICWidget::getEllipseCoors(const QPointF &r1, const QPointF &r2, float r)
{
double c1=0.0f, c2=0.0f, A=0.0f, B=0.0f, C=0.0f, x0=0.0f, y0=0.0f, x1=0.0f, y1=0.0f;
if (MAXCOM_F(qAbs(r2.x()-r1.x()),0.0f)) {
c1 = (pow(r2.x(),2)-pow(r1.x(),2)+pow(r2.y(),2)-pow(r1.y(),2))/2/(r2.x()-r1.x());
c2 = (r2.y()-r1.y())/(r2.x()-r1.x());
A = 1.0+pow(c2, 2);
B = 2*(r1.x()-c1)*c2-2*r1.y();
C = pow((r1.x()-c1), 2)+pow(r1.y(), 2)-pow(r, 2);
//如何b^2-4ac <= 0,则赋值为0.0f
double b_ac = sqrt(B*B-4*A*C);
if (qIsNaN(b_ac)) b_ac = 0.0f;
y0 = (-B+b_ac)/(2*A);
x0 = c1-c2*y0;
y1 = (-B-b_ac)/2/A;
x1 = c1-c2*y1;
} else {
float d