Annotation of QuadraticMandel/fractal.c, revision 1.2

1.1       cvsmgr      1: /*******************************************************************************
1.2     ! cvsmgr      2: +*  Fractal set generation for quadratic maps.
        !             3: +*  Copyright (C) 2011, Raúl Durán Díaz, raul.duran@uah.es
        !             4: +*
        !             5: +*  This program is free software: you can redistribute it and/or modify
        !             6: +*  it under the terms of the GNU General Public License as published by
        !             7: +*  the Free Software Foundation, either version 3 of the License, or
        !             8: +*  (at your option) any later version.
        !             9: +*
        !            10: +*  This program is distributed in the hope that it will be useful,
        !            11: +*  but WITHOUT ANY WARRANTY; without even the implied warranty of
        !            12: +*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        !            13: +*  GNU General Public License for more details.
        !            14: +*
        !            15: +*  You should have received a copy of the GNU General Public License
        !            16: +*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
        !            17: *******************************************************************************/
        !            18: /*******************************************************************************
1.1       cvsmgr     19: +* Mandel del Alberto.
                     20: +*
                     21: +* 7.07.2005
                     22: +*
                     23: +* $Id: fractal.c,v 1.12 2009/04/30 15:15:42 rduran Exp $
                     24: +* $Name:  $
                     25: *******************************************************************************/
                     26: # include <stdlib.h>
                     27: # include <stdio.h>
                     28: # include <string.h>
                     29: # include <math.h>
                     30: # include <time.h>
                     31: # include "genfractal.h"
                     32: 
                     33: int main(int argc, char *argv[])
                     34: {
                     35: char   img_name[512];
                     36: int    img_number = 0;
                     37: time_t hora = time(NULL);
                     38: struct tm  *t_hora = localtime(&hora);
                     39: 
                     40:    if (argc != 8)
                     41:    {
                     42:       fprintf(stderr, "Usage: %s <output base filename> <itermax> "
                     43:                       "<xi> <eta> <side_length> <offset x> <offset y>\n", argv[0]);
                     44:       return 1;
                     45:    }
                     46: 
                     47:    printf("Fractal Generator\n");
                     48:    printf("Generating fractal with the following parameters:\n\n");
                     49:    printf("Iterations:  %d\n",  atoi(argv[2]));
                     50:    printf("Xi:          %lf\n", atof(argv[3]));
                     51:    printf("Eta:         %lf\n", atof(argv[4]));
                     52:    printf("Side length: %lf\n", atof(argv[5]));
                     53:    printf("Offset X:    %lf\n", atof(argv[6]));
                     54:    printf("Offset Y:    %lf\n", atof(argv[7]));
                     55:    printf("Date:        %2d.%02d.%d %2d:%02d\n",
                     56:                                 t_hora->tm_mday,
                     57:                                 t_hora->tm_mon  + 1,
                     58:                                 t_hora->tm_year + 1900,
                     59:                                 t_hora->tm_hour,
                     60:                                 t_hora->tm_min);
                     61: 
                     62:    sprintf(img_name, "%s_%02d.png", argv[1], img_number++);
                     63: 
                     64:    return GenFractal(img_name, atof(argv[3]), atof(argv[4]),
                     65:                                atoi(argv[2]), atof(argv[5]),
                     66:                                atof(argv[6]), atof(argv[7]));
                     67: }

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