#include "stdio.h" #include "stdlib.h" #include "math.h" #include #include #include "paulslib.h" #include "bitmaplib.h" #define NX 500 #define NY 500 #define N 1000000 #define SCALE (NX / 6) int main(int argc,char **argv) { int i,n,ix,iy; int type,s; double x=0.5,y=0,x1,y1,xa,ya,r,w=0; BITMAP *image,white={255,255,255},black={0,0,0}; BITMAP colour; char fname[64]; FILE *fptr; if (argc < 2) { fprintf(stderr,"Usage: %s type\n",argv[0]); exit(-1); } type = atoi(argv[1]); if (type < 0 || type > 2) { fprintf(stderr,"Type shold be 0, 1, or 2\n"); exit(-1); } /* Create the image */ image = CreateBitmap(NX,NY); EraseBitmap(image,NX,NY,white); srand(time(NULL)); for (n=0;n