00001 #ifndef bdgl_peano_curve_h_ 00002 #define bdgl_peano_curve_h_ 00003 //----------------------------------------------------------------------------- 00004 //: 00005 // \file 00006 // \author Vishal Jain 00007 // \brief construction of Peano curve on a square grid. 00008 // 00009 // \verbatim 00010 // Modifications 00011 // Initial version July 6th, 2009 00012 // \endverbatim 00013 // 00014 //----------------------------------------------------------------------------- 00015 #include <vgl/vgl_point_2d.h> 00016 #include <vgl/vgl_point_3d.h> 00017 #include <vcl_algorithm.h> 00018 00019 vcl_vector<vgl_point_2d<double> > rotate_2d(vcl_vector<vgl_point_2d<double> > in, double angle); 00020 vcl_vector<vgl_point_2d<double> > trans_2d(vcl_vector<vgl_point_2d<double> > in, double tx, double ty); 00021 vcl_vector<vgl_point_2d<double> > scale_2d(vcl_vector<vgl_point_2d<double> > in, double s); 00022 00023 //: Peano curve inscribed in a square of length 4 centered at the origin. 00024 vcl_vector<vgl_point_2d<double> > recurse_peano_curve(unsigned level); 00025 00026 //: peano_curve on cube 00027 vcl_vector<vgl_point_3d<double> > peano_curve_on_cube(unsigned level); 00028 00029 #endif