/*******************************************************************************
+* Mandel del Alberto.
+*
+* 7.07.2005
+*
+* $Id: fractal.c,v 1.1 2011/10/18 08:42:34 cvsmgr Exp $
+* $Name: $
*******************************************************************************/
# include <stdlib.h>
# include <stdio.h>
# include <string.h>
# include <math.h>
# include <time.h>
# include "genfractal.h"
int main(int argc, char *argv[])
{
char img_name[512];
int img_number = 0;
time_t hora = time(NULL);
struct tm *t_hora = localtime(&hora);
if (argc != 8)
{
fprintf(stderr, "Usage: %s <output base filename> <itermax> "
"<xi> <eta> <side_length> <offset x> <offset y>\n", argv[0]);
return 1;
}
printf("Fractal Generator\n");
printf("Generating fractal with the following parameters:\n\n");
printf("Iterations: %d\n", atoi(argv[2]));
printf("Xi: %lf\n", atof(argv[3]));
printf("Eta: %lf\n", atof(argv[4]));
printf("Side length: %lf\n", atof(argv[5]));
printf("Offset X: %lf\n", atof(argv[6]));
printf("Offset Y: %lf\n", atof(argv[7]));
printf("Date: %2d.%02d.%d %2d:%02d\n",
t_hora->tm_mday,
t_hora->tm_mon + 1,
t_hora->tm_year + 1900,
t_hora->tm_hour,
t_hora->tm_min);
sprintf(img_name, "%s_%02d.png", argv[1], img_number++);
return GenFractal(img_name, atof(argv[3]), atof(argv[4]),
atoi(argv[2]), atof(argv[5]),
atof(argv[6]), atof(argv[7]));
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>