Friday, July 17, 2009

XOR - Sierpinski gasket

# include ;
# include ;
# include ;

int x,y;int gd,gm;

void main(void)
{
clrscr();

initgraph(&gd,&gm,"c:\\bc\\bgi");

for(x=0;x < getmaxx();x++)
for(y=0;y < getmaxy();y++)
{
putpixel(x,y,((x+y)-(x^y))%15+4);
}

getche();
closegraph();
}

No comments:

Post a Comment