Annotation of QuadraticMandel/fractal.c, revision 1.1

1.1     ! cvsmgr      1: /*******************************************************************************
        !             2: +* Mandel del Alberto.
        !             3: +*
        !             4: +* 7.07.2005
        !             5: +*
        !             6: +* $Id: fractal.c,v 1.12 2009/04/30 15:15:42 rduran Exp $
        !             7: +* $Name:  $
        !             8: *******************************************************************************/
        !             9: # include <stdlib.h>
        !            10: # include <stdio.h>
        !            11: # include <string.h>
        !            12: # include <math.h>
        !            13: # include <time.h>
        !            14: # include "genfractal.h"
        !            15: 
        !            16: int main(int argc, char *argv[])
        !            17: {
        !            18: char   img_name[512];
        !            19: int    img_number = 0;
        !            20: time_t hora = time(NULL);
        !            21: struct tm  *t_hora = localtime(&hora);
        !            22: 
        !            23:    if (argc != 8)
        !            24:    {
        !            25:       fprintf(stderr, "Usage: %s <output base filename> <itermax> "
        !            26:                       "<xi> <eta> <side_length> <offset x> <offset y>\n", argv[0]);
        !            27:       return 1;
        !            28:    }
        !            29: 
        !            30:    printf("Fractal Generator\n");
        !            31:    printf("Generating fractal with the following parameters:\n\n");
        !            32:    printf("Iterations:  %d\n",  atoi(argv[2]));
        !            33:    printf("Xi:          %lf\n", atof(argv[3]));
        !            34:    printf("Eta:         %lf\n", atof(argv[4]));
        !            35:    printf("Side length: %lf\n", atof(argv[5]));
        !            36:    printf("Offset X:    %lf\n", atof(argv[6]));
        !            37:    printf("Offset Y:    %lf\n", atof(argv[7]));
        !            38:    printf("Date:        %2d.%02d.%d %2d:%02d\n",
        !            39:                                 t_hora->tm_mday,
        !            40:                                 t_hora->tm_mon  + 1,
        !            41:                                 t_hora->tm_year + 1900,
        !            42:                                 t_hora->tm_hour,
        !            43:                                 t_hora->tm_min);
        !            44: 
        !            45:    sprintf(img_name, "%s_%02d.png", argv[1], img_number++);
        !            46: 
        !            47:    return GenFractal(img_name, atof(argv[3]), atof(argv[4]),
        !            48:                                atoi(argv[2]), atof(argv[5]),
        !            49:                                atof(argv[6]), atof(argv[7]));
        !            50: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>