BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h
Go to the documentation of this file.
00001 // Copyright (c) 2005-2006  INRIA Sophia-Antipolis (France).
00002 // All rights reserved.
00003 //
00004 // This file is part of CGAL (www.cgal.org); you may redistribute it under
00005 // the terms of the Q Public License version 1.0.
00006 // See the file LICENSE.QPL distributed with CGAL.
00007 //
00008 // Licensees holding a valid commercial license may use this file in
00009 // accordance with the commercial license agreement provided with the software.
00010 //
00011 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 //
00014 // Partially supported by the IST Programme of the EU as a Shared-cost
00015 // RTD (FET Open) Project under Contract No  IST-2000-26473 
00016 // (ECG - Effective Computational Geometry for Curves and Surfaces) 
00017 // and a STREP (FET Open) Project under Contract No  IST-006413 
00018 // (ACS -- Algorithms for Complex Shapes)
00019 //
00020 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h $
00021 // $Id: internal_functions_on_roots_and_polynomials_2_3.h 50465 2009-07-08 13:26:57Z sloriot $
00022 //
00023 // Author(s) : Monique Teillaud <Monique.Teillaud@sophia.inria.fr>
00024 //             Sylvain Pion
00025 //             Pedro Machado
00026 
00027 #ifndef CGAL_ALGEBRAIC_KERNEL_FUNCTIONS_ON_ROOTS_AND_POLYNOMIALS_2_3_H
00028 #define CGAL_ALGEBRAIC_KERNEL_FUNCTIONS_ON_ROOTS_AND_POLYNOMIALS_2_3_H
00029 
00030 #include <CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h>
00031 
00032 namespace CGAL {
00033   namespace AlgebraicSphereFunctors {
00034 
00035   template < class AK, class OutputIterator >
00036   inline 
00037   OutputIterator
00038     solve( const typename AK::Polynomial_for_spheres_2_3 &e1,
00039            const typename AK::Polynomial_for_spheres_2_3 &e2,
00040            const typename AK::Polynomial_for_spheres_2_3 &e3,
00041            OutputIterator res )
00042   {
00043     CGAL_kernel_precondition(!((e1 == e2) && (e2 == e3)));
00044     // we put as a precondition that the polynomial for spheres represents
00045     // a sphere and not an isolated point or an empty_space
00046     CGAL_kernel_precondition(!(e1.empty_space() || e1.isolated_point())); 
00047     CGAL_kernel_precondition(!(e2.empty_space() || e2.isolated_point())); 
00048     CGAL_kernel_precondition(!(e3.empty_space() || e3.isolated_point())); 
00049     typedef typename AK::Polynomial_1_3 Polynomial_1_3;
00050     // The degenerated cases are 2 tangent spheres
00051     // os 2 non-intersecting spheres
00052     // beacause we cannot have infinitely many solutions
00053     if(e1 == e2) {
00054       if(tangent<AK>(e1,e3)) {
00055         Polynomial_1_3 p = plane_from_2_spheres<AK>(e1,e3);
00056         return CGALi::solve_tangent<AK>(p,e1,res);
00057       }
00058       CGAL_kernel_precondition(!(intersect<AK>(e1,e3)));
00059       return res;
00060     }
00061     if((e1 == e3) || (e2 == e3)) {
00062       if(tangent<AK>(e1,e2)) {
00063         Polynomial_1_3 p = plane_from_2_spheres<AK>(e1,e2);
00064         return CGALi::solve_tangent<AK>(p,e1,res);
00065       }
00066       CGAL_kernel_precondition(!(intersect<AK>(e1,e2)));
00067       return res;
00068     }
00069     
00070     // non degenerated case
00071     if(intersect<AK>(e1,e2)) {
00072       Polynomial_1_3 p1 = plane_from_2_spheres<AK>(e1,e2);
00073       if(intersect<AK>(e2,e3)) {
00074         Polynomial_1_3 p2 = plane_from_2_spheres<AK>(e2,e3); 
00075         return solve<AK>(p1,p2,e2,res);
00076       } return res;
00077     } return res;
00078   }
00079 
00080   template <class AK>
00081   typename AK::Root_for_spheres_2_3
00082   x_critical_point(const typename AK::Polynomial_for_spheres_2_3 & s, bool i)
00083   {
00084     typedef typename AK::Root_of_2 Root_of_2;
00085     typedef typename AK::Root_for_spheres_2_3 Root_for_spheres_2_3; 
00086 
00087     return Root_for_spheres_2_3(
00088             make_root_of_2(s.a(),typename AK::FT(i?-1:1),s.r_sq()),
00089             Root_of_2(s.b()),
00090             Root_of_2(s.c()));
00091   }
00092 
00093   template <class AK, class OutputIterator>
00094   OutputIterator
00095   x_critical_points(const typename AK::Polynomial_for_spheres_2_3 & s, OutputIterator res)
00096   {
00097     typedef typename AK::Root_of_2 Root_of_2;
00098     typedef typename AK::Root_for_spheres_2_3 Root_for_spheres_2_3; 
00099     typedef typename AK::FT FT;
00100     
00101     *res++ =  Root_for_spheres_2_3(make_root_of_2(s.a(),FT(-1),s.r_sq()),
00102                                 Root_of_2(s.b()),
00103                                 Root_of_2(s.c()));
00104     *res++ =  Root_for_spheres_2_3(make_root_of_2(s.a(),FT(1),s.r_sq()),
00105                                 Root_of_2(s.b()),
00106                                 Root_of_2(s.c()));
00107     return res;
00108   }
00109 
00110   template <class AK>
00111   typename AK::Root_for_spheres_2_3
00112   y_critical_point(const typename AK::Polynomial_for_spheres_2_3 &s, bool i)
00113   {
00114     typedef typename AK::Root_of_2 Root_of_2;
00115     typedef typename AK::Root_for_spheres_2_3 Root_for_spheres_2_3; 
00116 
00117     return Root_for_spheres_2_3(
00118             Root_of_2(s.a()),
00119             make_root_of_2(s.b(),typename AK::FT(i?-1:1),s.r_sq()),
00120             Root_of_2(s.c()));
00121   }
00122   
00123   template <class AK, class OutputIterator>
00124   OutputIterator
00125   y_critical_points(const typename AK::Polynomial_for_spheres_2_3 & s, OutputIterator res)
00126   {
00127     typedef typename AK::Root_of_2 Root_of_2;
00128     typedef typename AK::Root_for_spheres_2_3 Root_for_spheres_2_3;
00129     typedef typename AK::FT FT;
00130 
00131     *res++ =  Root_for_spheres_2_3(Root_of_2(s.a()),
00132                                 make_root_of_2(s.b(),FT(-1),s.r_sq()),
00133                                 Root_of_2(s.c()));
00134     *res++ =  Root_for_spheres_2_3(Root_of_2(s.a()),
00135                                 make_root_of_2(s.b(),FT(1),s.r_sq()),
00136                                 Root_of_2(s.c()));
00137     return res;
00138   }
00139 
00140   template <class AK>
00141   typename AK::Root_for_spheres_2_3
00142   z_critical_point(const typename AK::Polynomial_for_spheres_2_3 &s, bool i)
00143   {
00144     typedef typename AK::Root_of_2 Root_of_2;
00145     typedef typename AK::Root_for_spheres_2_3 Root_for_spheres_2_3; 
00146 
00147     return Root_for_spheres_2_3(Root_of_2(s.a()),
00148                                 Root_of_2(s.b()),
00149             make_root_of_2(s.c(),typename AK::FT(i?-1:1),s.r_sq()));
00150   }
00151   
00152   template <class AK, class OutputIterator>
00153   OutputIterator
00154   z_critical_points(const typename AK::Polynomial_for_spheres_2_3 & s, OutputIterator res)
00155   {
00156     typedef typename AK::Root_of_2 Root_of_2;
00157     typedef typename AK::Root_for_spheres_2_3 Root_for_spheres_2_3;
00158     typedef typename AK::FT FT;
00159 
00160     *res++ =  Root_for_spheres_2_3(Root_of_2(s.a()),
00161                                 Root_of_2(s.b()),
00162                                 make_root_of_2(s.c(),FT(-1),s.r_sq()));
00163     *res++ =  Root_for_spheres_2_3(Root_of_2(s.a()),
00164                                 Root_of_2(s.b()),
00165                                 make_root_of_2(s.c(),FT(1),s.r_sq()));
00166     return res;
00167   }
00168 
00169   template <class AK>
00170   typename AK::Root_for_spheres_2_3
00171   x_critical_point( const std::pair<typename AK::Polynomial_for_spheres_2_3, 
00172                                      typename AK::Polynomial_1_3 > &c, bool i)
00173   {
00174     typedef typename AK::FT FT;
00175     typedef typename AK::Root_of_2 Root_of_2;
00176     typedef typename AK::Root_for_spheres_2_3 Root_for_spheres_2_3; 
00177     typedef typename AK::Polynomial_for_spheres_2_3 Polynomial_for_spheres_2_3;
00178     typedef typename AK::Polynomial_1_3 Polynomial_1_3;
00179 
00180     const Polynomial_for_spheres_2_3 &s = c.first;
00181     const Polynomial_1_3 &p = c.second;
00182 
00183     // It has to be the equation of a diametral circle
00184     CGAL_kernel_precondition((intersect<AK>(p,s)));
00185     CGAL_kernel_precondition(CGAL_NTS sign(p.a() * s.a() + p.b() * s.b() + 
00186                                       p.c() * s.c() + p.d()) == ZERO);
00187     CGAL_kernel_precondition(!(is_zero(p.b()) && is_zero(p.c())));
00188 
00189     const FT sqbc = CGAL::square(p.b()) + CGAL::square(p.c());
00190     const FT sq_sum = sqbc + CGAL::square(p.a());
00191     const FT delta = (sqbc * s.r_sq())/sq_sum;
00192 
00193     const FT cy = (p.a()*p.b())/sqbc;
00194     const FT cz = (p.a()*p.c())/sqbc;
00195 
00196     const Root_of_2 x = make_root_of_2(s.a(),FT(i?-1:1),delta);
00197     const Root_of_2 y = make_root_of_2(s.b(),FT(i?(cy):(-cy)),delta);
00198     const Root_of_2 z = make_root_of_2(s.c(),FT(i?(cz):(-cz)),delta);
00199 
00200     return Root_for_spheres_2_3(x,y,z);
00201   }
00202 
00203   template <class AK, class OutputIterator>
00204   OutputIterator
00205   x_critical_points( const std::pair<typename AK::Polynomial_for_spheres_2_3, 
00206                                      typename AK::Polynomial_1_3 > &c, 
00207                      OutputIterator res)
00208   {
00209     typedef typename AK::FT FT;
00210     typedef typename AK::Root_of_2 Root_of_2;
00211     typedef typename AK::Root_for_spheres_2_3 Root_for_spheres_2_3; 
00212     typedef typename AK::Polynomial_for_spheres_2_3 Polynomial_for_spheres_2_3;
00213     typedef typename AK::Polynomial_1_3 Polynomial_1_3;
00214 
00215     const Polynomial_for_spheres_2_3 &s = c.first;
00216     const Polynomial_1_3 &p = c.second;
00217 
00218     // It has to be the equation of a diametral circle
00219     CGAL_kernel_precondition((intersect<AK>(p,s)));
00220     CGAL_kernel_precondition(CGAL_NTS sign(p.a() * s.a() + p.b() * s.b() + 
00221                                            p.c() * s.c() + p.d()) == ZERO);
00222     CGAL_kernel_precondition(!(is_zero(p.b()) && is_zero(p.c())));
00223 
00224     const FT sqbc = CGAL::square(p.b()) + CGAL::square(p.c());
00225     const FT sq_sum = sqbc + CGAL::square(p.a());
00226     const FT delta = (sqbc * s.r_sq())/sq_sum;
00227 
00228     const FT cy = (p.a()*p.b())/sqbc;
00229     const FT cz = (p.a()*p.c())/sqbc;
00230 
00231     const Root_of_2 x1 = make_root_of_2(s.a(),-1,delta);
00232     const Root_of_2 y1 = make_root_of_2(s.b(),cy,delta);
00233     const Root_of_2 z1 = make_root_of_2(s.c(),cz,delta);
00234     const Root_of_2 x2 = make_root_of_2(s.a(),1,delta);
00235     const Root_of_2 y2 = make_root_of_2(s.b(),-cy,delta);
00236     const Root_of_2 z2 = make_root_of_2(s.c(),-cz,delta);
00237 
00238     *res++ =  Root_for_spheres_2_3(x1,y1,z1);
00239     *res++ =  Root_for_spheres_2_3(x2,y2,z2);
00240     return res;
00241   }
00242 
00243   template <class AK>
00244   typename AK::Root_for_spheres_2_3
00245   y_critical_point( const std::pair<typename AK::Polynomial_for_spheres_2_3, 
00246                                      typename AK::Polynomial_1_3 > &c, bool i)
00247   {
00248     typedef typename AK::FT FT;
00249     typedef typename AK::Root_of_2 Root_of_2;
00250     typedef typename AK::Root_for_spheres_2_3 Root_for_spheres_2_3; 
00251     typedef typename AK::Polynomial_for_spheres_2_3 Polynomial_for_spheres_2_3;
00252     typedef typename AK::Polynomial_1_3 Polynomial_1_3;
00253 
00254     const Polynomial_for_spheres_2_3 &s = c.first;
00255     const Polynomial_1_3 &p = c.second;
00256 
00257     // It has to be the equation of a diametral circle
00258     CGAL_kernel_precondition((intersect<AK>(p,s)));
00259     CGAL_kernel_precondition(CGAL_NTS sign(p.a() * s.a() + p.b() * s.b() + 
00260                                            p.c() * s.c() + p.d()) == ZERO);
00261     CGAL_kernel_precondition(!(is_zero(p.a()) && is_zero(p.c())));
00262 
00263     const FT sqac = CGAL::square(p.a()) + CGAL::square(p.c());
00264     const FT sq_sum = sqac + CGAL::square(p.b());
00265     const FT delta = (sqac * s.r_sq())/sq_sum;
00266 
00267     const FT cx = (p.a()*p.b())/sqac;
00268     const FT cz = (p.c()*p.b())/sqac;
00269 
00270     if(!is_positive(cx)) {
00271         const Root_of_2 x = make_root_of_2(s.a(),FT(i?(cx):(-cx)),delta);
00272         const Root_of_2 y = make_root_of_2(s.b(),FT(i?-1:1),delta);
00273         const Root_of_2 z = make_root_of_2(s.c(),FT(i?(cz):(-cz)),delta);
00274       return Root_for_spheres_2_3(x,y,z);
00275     } else {
00276         const Root_of_2 x = make_root_of_2(s.a(),FT(i?(-cx):(cx)),delta);
00277         const Root_of_2 y = make_root_of_2(s.b(),FT(i?1:-1),delta);
00278         const Root_of_2 z = make_root_of_2(s.c(),FT(i?(-cz):(cz)),delta);
00279       return Root_for_spheres_2_3(x,y,z);
00280     } 
00281   }
00282 
00283   template <class AK, class OutputIterator>
00284   OutputIterator
00285   y_critical_points( const std::pair<typename AK::Polynomial_for_spheres_2_3, 
00286                                      typename AK::Polynomial_1_3 > &c, 
00287                      OutputIterator res)
00288   {
00289     typedef typename AK::FT FT;
00290     typedef typename AK::Root_of_2 Root_of_2;
00291     typedef typename AK::Root_for_spheres_2_3 Root_for_spheres_2_3; 
00292     typedef typename AK::Polynomial_for_spheres_2_3 Polynomial_for_spheres_2_3;
00293     typedef typename AK::Polynomial_1_3 Polynomial_1_3;
00294 
00295     const Polynomial_for_spheres_2_3 &s = c.first;
00296     const Polynomial_1_3 &p = c.second;
00297 
00298     // It has to be the equation of a diametral circle
00299     CGAL_kernel_precondition((intersect<AK>(p,s)));
00300     CGAL_kernel_precondition(CGAL_NTS sign(p.a() * s.a() + p.b() * s.b() + 
00301                                            p.c() * s.c() + p.d()) == ZERO);
00302     CGAL_kernel_precondition(!(is_zero(p.a()) && is_zero(p.c())));
00303 
00304     const FT sqac = CGAL::square(p.a()) + CGAL::square(p.c());
00305     const FT sq_sum = sqac + CGAL::square(p.b());
00306     const FT delta = (sqac * s.r_sq())/sq_sum;
00307 
00308     const FT cx = (p.a()*p.b())/sqac;
00309     const FT cz = (p.c()*p.b())/sqac;
00310 
00311     const Root_of_2 x1 = make_root_of_2(s.a(),cx,delta);
00312     const Root_of_2 y1 = make_root_of_2(s.b(),FT(-1),delta);
00313     const Root_of_2 z1 = make_root_of_2(s.c(),cz,delta);
00314     const Root_of_2 x2 = make_root_of_2(s.a(),-cx,delta);
00315     const Root_of_2 y2 = make_root_of_2(s.b(),FT(1),delta);
00316     const Root_of_2 z2 = make_root_of_2(s.c(),-cz,delta);
00317 
00318     if(!is_positive(cx)) {
00319       *res++ =  Root_for_spheres_2_3(x1,y1,z1);
00320       *res++ =  Root_for_spheres_2_3(x2,y2,z2);
00321     } else {
00322       *res++ =  Root_for_spheres_2_3(x2,y2,z2);
00323       *res++ =  Root_for_spheres_2_3(x1,y1,z1);
00324     } 
00325     return res;
00326   }
00327 
00328   template <class AK>
00329   typename AK::Root_for_spheres_2_3
00330   z_critical_point( const std::pair<typename AK::Polynomial_for_spheres_2_3, 
00331                                      typename AK::Polynomial_1_3 > &c, bool i)
00332   {
00333     typedef typename AK::FT FT;
00334     typedef typename AK::Root_of_2 Root_of_2;
00335     typedef typename AK::Root_for_spheres_2_3 Root_for_spheres_2_3; 
00336     typedef typename AK::Polynomial_for_spheres_2_3 Polynomial_for_spheres_2_3;
00337     typedef typename AK::Polynomial_1_3 Polynomial_1_3;
00338 
00339     const Polynomial_for_spheres_2_3 &s = c.first;
00340     const Polynomial_1_3 &p = c.second;
00341 
00342     // It has to be the equation of a diametral circle
00343     CGAL_kernel_precondition((intersect<AK>(p,s)));
00344     CGAL_kernel_precondition(CGAL_NTS sign(p.a() * s.a() + p.b() * s.b() + 
00345                                            p.c() * s.c() + p.d()) == ZERO);
00346     CGAL_kernel_precondition(!(is_zero(p.a()) && is_zero(p.b())));
00347 
00348     const FT sqab = CGAL::square(p.a()) + CGAL::square(p.b());
00349     const FT sq_sum = sqab + CGAL::square(p.c());
00350     const FT delta = (sqab * s.r_sq())/sq_sum;
00351 
00352     const FT cx = (p.a()*p.c())/sqab;
00353     const FT cy = (p.c()*p.b())/sqab;
00354 
00355     if(is_negative(cx)) {
00356         const Root_of_2 x = make_root_of_2(s.a(),FT(i?(cx):(-cx)),delta);
00357         const Root_of_2 y = make_root_of_2(s.b(),FT(i?(cy):(-cy)),delta);
00358         const Root_of_2 z = make_root_of_2(s.c(),FT(i?-1:1),delta);
00359       return Root_for_spheres_2_3(x,y,z);
00360     } else if(is_zero(cx)) {
00361       if(!is_positive(cy)) {
00362         const Root_of_2 x = s.a();
00363         const Root_of_2 y = make_root_of_2(s.b(),FT(i?(cy):(-cy)),delta);
00364         const Root_of_2 z = make_root_of_2(s.c(),FT(i?-1:1),delta);
00365         return Root_for_spheres_2_3(x,y,z);
00366       } else {
00367         const Root_of_2 x = s.a();
00368         const Root_of_2 y = make_root_of_2(s.b(),FT(i?(-cy):(cy)),delta);
00369         const Root_of_2 z = make_root_of_2(s.c(),FT(i?1:-1),delta);
00370         return Root_for_spheres_2_3(x,y,z);
00371       }
00372     } else {
00373         const Root_of_2 x = make_root_of_2(s.a(),FT(i?(-cx):(cx)),delta);
00374         const Root_of_2 y = make_root_of_2(s.b(),FT(i?(-cy):(cy)),delta);
00375         const Root_of_2 z = make_root_of_2(s.c(),FT(i?1:-1),delta);
00376       return Root_for_spheres_2_3(x,y,z);
00377     } 
00378   }
00379 
00380   template <class AK, class OutputIterator>
00381   OutputIterator
00382   z_critical_points( const std::pair<typename AK::Polynomial_for_spheres_2_3, 
00383                                      typename AK::Polynomial_1_3 > &c, 
00384                      OutputIterator res)
00385   {
00386     typedef typename AK::FT FT;
00387     typedef typename AK::Root_of_2 Root_of_2;
00388     typedef typename AK::Root_for_spheres_2_3 Root_for_spheres_2_3; 
00389     typedef typename AK::Polynomial_for_spheres_2_3 Polynomial_for_spheres_2_3;
00390     typedef typename AK::Polynomial_1_3 Polynomial_1_3;
00391 
00392     const Polynomial_for_spheres_2_3 &s = c.first;
00393     const Polynomial_1_3 &p = c.second;
00394 
00395     // It has to be the equation of a diametral circle
00396     CGAL_kernel_precondition((intersect<AK>(p,s)));
00397     CGAL_kernel_precondition(CGAL_NTS sign(p.a() * s.a() + p.b() * s.b() + 
00398                                            p.c() * s.c() + p.d()) == ZERO);
00399     CGAL_kernel_precondition(!(is_zero(p.a()) && is_zero(p.b())));
00400 
00401     const FT sqab = CGAL::square(p.a()) + CGAL::square(p.b());
00402     const FT sq_sum = sqab + CGAL::square(p.c());
00403     const FT delta = (sqab * s.r_sq())/sq_sum;
00404 
00405     const FT cx = (p.a()*p.c())/sqab;
00406     const FT cy = (p.c()*p.b())/sqab;
00407 
00408     if(is_negative(cx)) {
00409       const Root_of_2 x1 = make_root_of_2(s.a(),(cx),delta);
00410       const Root_of_2 y1 = make_root_of_2(s.b(),(cy),delta);
00411       const Root_of_2 z1 = make_root_of_2(s.c(),-1,delta);
00412       const Root_of_2 x2 = make_root_of_2(s.a(),(-cx),delta);
00413       const Root_of_2 y2 = make_root_of_2(s.b(),(-cy),delta);
00414       const Root_of_2 z2 = make_root_of_2(s.c(),1,delta);
00415       *res++ = Root_for_spheres_2_3(x1,y1,z1);
00416       *res++ = Root_for_spheres_2_3(x2,y2,z2);
00417     } else if(is_zero(cx)) {
00418       if(!is_positive(cy)) {
00419         const Root_of_2 x1 = s.a();
00420         const Root_of_2 y1 = make_root_of_2(s.b(),(cy),delta);
00421         const Root_of_2 z1 = make_root_of_2(s.c(),FT(-1),delta);
00422         const Root_of_2 y2 = make_root_of_2(s.b(),(-cy),delta);
00423         const Root_of_2 z2 = make_root_of_2(s.c(),FT(1),delta);
00424         *res++ = Root_for_spheres_2_3(x1,y1,z1);
00425         *res++ = Root_for_spheres_2_3(x1,y2,z2);
00426       } else {
00427         const Root_of_2 x1 = s.a();
00428         const Root_of_2 y1 = make_root_of_2(s.b(),(-cy),delta);
00429         const Root_of_2 z1 = make_root_of_2(s.c(),FT(1),delta);
00430         const Root_of_2 y2 = make_root_of_2(s.b(),(cy),delta);
00431         const Root_of_2 z2 = make_root_of_2(s.c(),FT(-1),delta);
00432         *res++ = Root_for_spheres_2_3(x1,y1,z1);
00433         *res++ = Root_for_spheres_2_3(x1,y2,z2);
00434       }
00435     } else {
00436       const Root_of_2 x1 = make_root_of_2(s.a(),(-cx),delta);
00437       const Root_of_2 y1 = make_root_of_2(s.b(),(-cy),delta);
00438       const Root_of_2 z1 = make_root_of_2(s.c(),FT(1),delta);
00439       const Root_of_2 x2 = make_root_of_2(s.a(),(cx),delta);
00440       const Root_of_2 y2 = make_root_of_2(s.b(),(cy),delta);
00441       const Root_of_2 z2 = make_root_of_2(s.c(),FT(-1),delta);
00442       *res++ = Root_for_spheres_2_3(x1,y1,z1);
00443       *res++ = Root_for_spheres_2_3(x2,y2,z2);
00444     }
00445     return res;
00446   }
00447 
00448   } // namespace AlgebraicSphereFunctors
00449 } // namespace CGAL
00450 
00451 #endif //  CGAL_ALGEBRAIC_KERNEL_FUNCTIONS_ON_ROOTS_AND_POLYNOMIALS_2_3_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines