三点确定一个圆(输出圆心、弧长、圆心角、方向)
已知圆弧上的三个点,求解该圆的描述信息
/**
* @brief The PointF class 基础点结构定义浮点型
*/
class PointF
{
public:
PointF() {
};
PointF(double _x, double _y) :
m_x(_x), m_y(_y) {
};
PointF operator-(const PointF& rhs) {
PointF tem(this->m_x,this->m_y);
tem.m_x -= rhs.m_x;
tem.m_y -= rhs.m_y;
return tem;
}
PointF operator+(const PointF& rhs) {
PointF tem(this->m_x,this->m_y);
tem.m_x += rhs.m_x;
tem.m_y += rhs.m_y;
return tem;
}
double mod() const {
return std::sqrt(m_x * m_x + m_y * m_y); }
double x() const {
return m_x; }
double y() const {
return m_y; }
public:
double m_x = 0;
double m_y = 0;
};
/**
* @brief tcircle 三点确定一个圆
* @param radius 半径
* @param len 圆弧长度
* @param rad 圆心角(弧度)
* @param clockwise 顺时针
* @param center 圆心
* @param pt1 圆弧起点
* @param pt2 圆弧中间点
* @param pt3 圆弧终点
*/
static void Tcircle(double &radius,do