shape_doc 0.1
|
# include <shape/viewer_axel.hpp> # include <shape/bounding_box.hpp> # include <shape/surface_algebraic.hpp> # include <shape/solver_implicit.hpp> # include <shape/mesher3d_dual.hpp> # include <shape/cell3d_surface_algebraic.hpp> # define BoundingBox bounding_box<double> # define AXEL viewer<axel> # define AlgebraicSurface surface_algebraic<double> # define Cell3dAlgebraicSurface cell3d_surface_algebraic<double> # define Topology3d mesher<double> int main(int argc, char** argv) { using namespace mmx; using namespace mmx::shape; BoundingBox bx(-1,3,-3,3.1,-3,3); // BoundingBox bx(-2,2,-2,2,-2,2); // AlgebraicSurface* s= new AlgebraicSurface((char *)"x^3+y^5-z^2"); // AlgebraicSurface* s=new AlgebraicSurface((char *)"x*y^2-z^2"); AlgebraicSurface* s=new AlgebraicSurface((char *)"x^2+y^2+z^2-2"); Cell3dAlgebraicSurface* cl= new Cell3dAlgebraicSurface(*s,bx); std::cout<<"Cell: "<<cl->boundingBox()<<std::endl; typedef mesher3d<double,default_env,AlgebraicSurface,Cell3dAlgebraicSurface> Mesher; //typedef mesher3d<double,default_env> Mesher; Mesher* a1 = new Mesher; a1->set_precision(0.05); a1->set_smoothness(0.1); a1->set_input(cl); a1->run(); AXEL axl((char *)"surface.axl"); axl<<*a1->output(); axl.view(); }