Example for using bresenham drawing circle and line
,BresenhamCircle,Scanline
- Author
- MIP
#include "Base/Image/ImageIO.hh"
#include "Base/ImageUtils/Bresenham.hh"
#include "Base/ImageUtils/BresenhamCircle.hh"
#include "Base/ImageUtils/BresenhamCircleEighth.hh"
#include "Base/ImageUtils/Scanline.hh"
#include "Base/Image/Image.hh"
using namespace BIAS;
using namespace std;
int main (int argc, char *argv[])
{
int next[]={0,0}, start[]={10,30}, end[]={120,90}, center[]={100, 150};
int epsilon=4, radius=30;
if (argc==5){
start[0]=atoi(argv[1]);
start[1]=atoi(argv[2]);
end[0]=atoi(argv[3]);
end[1]=atoi(argv[4]);
} else if (argc!=1){
cerr << endl << argv[0] << " [ startx starty endx endy ]" << endl << endl;
}
ida[next[1]][next[0]]=255;
}
center[0]-=5;
center[1]-=5;
ida[next[1]][next[0]]=255;
}
ida[next[1]][next[0]]=255;
}
ida[next[1]][next[0]]=0;
}
return 0;
}