Tuesday, September 4, 2007

Romance

Such a cute pie (from http://www-ti.informatik.uni-tuebingen.de/~thiele/):

sh
C="/tmp/c.c"&&E="/tmp/e"&&echo -e "#include <X11/Xlib.h>\n#inclu\
de <unistd.h>\n#define l (int)t\n#define B(v,c) p[(2+l)%8][c]*200*v*v/2\
+p[(1+l)%8][c]*200*(v-v*v+0.5)+p[l%8][c]*200*(v*v/2-v+0.5)\nint s[2]={0\
};main(){Display *d;float t=0,v;float p[8][2]={{1.5,1},{2,0},{3,1},{2,3\
},{1,3},{0,1},{1,0},{1.5,1}};d=XOpenDisplay(0);while(t<100){v=t-l;XWarp\
Pointer(d,0,DefaultRootWindow(d),0,0,0,0,B(v,0),B(v,1));XFlush(d);s[1]=\
100;select(0,0,0,0,&s);t+=0.02;}}\n"> $C&&cc -o $E -L/usr/X11R6/lib -lX\
11 -I/usr/X11R6/include $C&&exec $E

No comments:

Post a Comment