41 template <
typename TPo
int>
47 template <
typename TPo
int>
53 template <
typename TPo
int>
57 const Point& aFirstPoint,
58 const Point& aSecondPoint,
59 const Point& aThirdPoint)
67 template <
typename TPo
int>
70 const Point& aFirstPoint,
71 const Point& aSecondPoint,
72 const Point& aThirdPoint):
80 template <
typename TPo
int>
91 template <
typename TPo
int>
105 template <
typename TPo
int>
110 Vector u( (myP[0]-aP[0])*(myR[1]-aP[1])-(myR[0]-aP[0])*(myP[1]-aP[1]),
111 (myR[0]-aP[0])*(myR[0]-myP[0])+(myR[1]-aP[1])*(myR[1]-myP[1]) );
112 Vector v( (myP[0]-aP[0])*(myQ[1]-aP[1])-(myQ[0]-aP[0])*(myP[1]-aP[1]),
113 (myQ[0]-aP[0])*(myQ[0]-myP[0])+(myQ[1]-aP[1])*(myQ[1]-myP[1]) );
115 return -( (u[0] * v[1]) - (u[1] * v[0]) );
118 template <
typename TPo
int>
126 Coordinate area = (u[0] * v[1]) - (u[1] * v[0]);
129 std::cerr <<
"Infinite radius detected in method getParameters() of CircleFrom3Points" << std::endl;
159 rr = ( ( std::sqrt(a)/
std::abs(areaD) )*std::sqrt(b)*std::sqrt(c) );
164 template <
typename TPo
int>
173 Coordinate area = (u[0] * v[1]) - (u[1] * v[0]);
186 return -( areaD/ (std::sqrt(a)*std::sqrt(b)*std::sqrt(c)) );
193 template <
typename TPo
int>
198 return "CircleFrom3Points";
201 template <
typename TPo
int>
206 out <<
"[CircleFrom3Points] passing through:\n";
207 out << myP << myQ << myR;
210 template <
typename TPo
int>