#include "stdio.h" #include "stdlib.h" #include "string.h" #include "math.h" #include "paulslib.h" void GiveUsage(char *); /* Create the burning ship fractal Whole ship -w 1.7 -c 0.45 0.5 First small ship -w 0.04 -c 1.755 0.03 Second small ship -w .04 -c 1.625 0.035 Tiny ship in tail -w 0.005 -c 1.941 0.004 Another small one -w 0.008 -c 1.861 0.005 */ int N = 4000; XY midpoint = {0,0}; double range = 3; int iteratemax = 255; float *image = NULL; int main(int argc,char **argv) { int i,j,k; unsigned short iv; float v; char fname[256] = "ship.raw"; FILE *fptr; XY c,p0,p; if (argc < 1) GiveUsage(argv[0]); // Parse command line options for (i=1;i 10) break; } //if (k == iteratemax) // image[j*N+i] = 0; //else image[j*N+i] = k; } } // Write the file sprintf(fname,"ship_%d.raw",iteratemax); if ((fptr = fopen(fname,"w")) != NULL) { for (j=N-1;j>=0;j--) { for (i=0;i