|
From: Daniel K. O. <dan...@ya...> - 2003-03-30 00:15:31
|
> I'm really sorry for the mailing list, i promise not to post about this
> topic again, it's for Dev-C++ isn't it ? :)
Yeah, plz you guys can exchange private mail about this.
But just to get a little on-topic here...
/*
peace.c
Usage: compile it and run
peace > p.xbm
then open the image p.xbm
*/
#include <stdio.h>
int __,p,e,a,c,E,_;
main()
{
puts("#define p_width 256");
puts("#define p_height 256");
puts("static unsigned char p_bits[] = {");
do {
p =(_&255)-128;
e =(_>>8)-128;
a =e*e+p*p;
c |=(a<16383&&(a>9409||(abs(p)<16||abs(abs(p)-e)<20)))<<E++;
E -8||(printf("0x%02x,%c",c,10+22*!!(++__&7)),c=E=0);
} while(++_ < 65536);
puts("};");
}
Daniel K. O.
|