#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
static unsigned char data[100 * 800];
inline void SetAtXY(int x, int y){
data[(x/8)+(y*100)] |= 1<<(7-(x%8));
}
#define CONV_RAD (3.1415926f/180.0f)
int main(void){
float i;
float dist = 360.0f;
#define LOOPS 8
for (i=0;i<LOOPS*360.0f;i+=0.001f){
dist-=0.001f*(1.0f/LOOPS);
SetAtXY( dist*sin((float)i*CONV_RAD) + 400 , dist*cos((float)i*CONV_RAD) + 400 );
}
FILE *fp = fopen("result.pbm","wb");
fprintf(fp, "P4\n800 800\n");
fwrite(data, 1, 80000, fp);
fclose(fp);
}