shape_doc 0.1
algebraic_curve3d_test.cpp
# include <iostream>
# include <shape/viewer_axel.hpp>
# include <shape/mesher3d_curve_algebraic.hpp>

using namespace std ;
using namespace mmx ;
using namespace shape ;

# define BoundingBox bounding_box<double>
# define Axel  viewer<axel>
# define AlgebraicCurve algebraic_curve<double>
# define Cell3dAlgebraicCurve cell3d_algebraic_curve<double>
# define Topology3d mesher3d_curve_algebraic<double>

int main(int argc, char ** argv)
{
  BoundingBox bx(-2,2,-2,2,-2,2);
  //AlgebraicCurve*  cv= new AlgebraicCurve("x^2+y^2+z^2-2","x-y-z");
  AlgebraicCurve*  cv= new AlgebraicCurve("x^2+y^2+z^2-1","2*x*y-z-1");

  std::cout<<"Equation:  "<<cv->equation(0)<<" "<<cv->equation(1)<<std::endl;
    
  Topology3d tp(bx);
  tp.push_back(cv);
  tp.set_smoothness(0.07);
  tp.set_precision(0.01);
  tp.run();
    
  Axel os((char*)"AlgebraicCurve.axl");
  os << *as_graphic(tp);
  os << *cv;
  os.view();
  
  return EXIT_SUCCESS ;
}