oke heres the code that defines the circle
Code:
int circle(int color,int centerx,int centery,int r)
{
int x,y;
float a;
float pi=3.1415927;
for(a=0;a<2*pi;a=a+pi/180){
x=cos(a)*r+centerx;
y=sin(a)*r+centery;
setpix(color,x,y);
}
return 0;
}
and this is the code that draws 100 circles in different colours
Code:
time_t t;
srand((unsigned) time_t(&t));
for(i=0;i<100;i++){
color=rand()%15;
circle(color,160,100,100-i);
}
now my problem is that this is going very ...and i mean very slow
i dont think my comp is the problem but rather the code that eats memory....
Any suggestions on how to make this go faster???