/******************************************************************************* +* Fractal set generation for quadratic maps. +* Copyright (C) 2011, Raúl Durán Díaz, raul.duran@uah.es +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . *******************************************************************************/ /******************************************************************************* +* Mandel del Alberto. +* +* 12.12.2005 +* +* $Id: fractal_l.c,v 1.2 2011/10/18 09:02:34 cvsmgr Exp $ +* $Name: $ *******************************************************************************/ # include # include # include # include # include # 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 " " \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 GenFractalLinear(img_name, atof(argv[3]), atof(argv[4]), atoi(argv[2]), atof(argv[5]), atof(argv[6]), atof(argv[7])); }