test-sphere.cc

Go to the documentation of this file.
00001 /**
00002  *\file         test-sphere.cc
00003  *
00004  *\brief        construct a sphere by rotational sweep of a half circle. 
00005  *
00006  *\example      test-sphere.cc
00007  *
00008  *              Shown  are two images with different resoultion used for arc and rotation construction.
00009  *
00010  *\image        html sphere-low-resolution.gif
00011  *\image        html sphere.gif
00012  *
00013  *\author       Xianming Chen\n
00014  *              Computer Science Department\n
00015  *              University of Utah
00016  *
00017  *\date         19 Aug 2006\n
00018  *              Copyright (c) 2006, University of Utah
00019  */
00020 
00021 
00022 
00023 
00024 #include "euler.h"
00025 #include "print.h"
00026 #include <fstream>
00027 
00028 using namespace euler;
00029 
00030 int main()
00031 {
00032   solid_t *s = solid_t :: mvfs( point_t(1.0f, 0.0f, 0.0f) );
00033   edge_t *e = s->f->arc( s->f->l->e, point_t(), 1.0, 0, pi, 15) ;
00034   s->f->l->set_loop_head( e );
00035   cout << s << endl << endl;
00036 
00037 
00038   s->rsweep_wire(s->f->l, 30);
00039 
00040   cout << s << endl << endl;
00041 
00042   ofstream os("test-sphere.off", ios::out);
00043   s->print_off_file(os);
00044   
00045   return 0;
00046 }
00047 
00048 
00049 

Generated on Wed Aug 30 16:27:58 2006 for euler by  doxygen 1.4.6