/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/27 14:29:26 by ljiriste #+# #+# */
-/* Updated: 2024/04/25 15:45:14 by ljiriste ### ########.fr */
+/* Updated: 2024/04/26 08:52:24 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
s->img.height = 1011;
s->img.undersample_max = 5;
s->set.detail = 1000;
- s->view.fractal = mandelbrot;
+ s->view.fractal = NULL;
s->view.palette = tri_color;
s->view.color_shift_speed = -0.001;
s->set.color_stability = 100;
return (1);
++i;
}
+ if (!s->view.fractal)
+ return (1);
init_view(s);
return (0);
}
static const char *help_str =
"This is the help for fractol by Lukáš Jiřiště\n"
"You can call the program as follows:\n\n"
- "fractol [option value]\n"
+ "fractol -f <fractal name> [<option> <value>]\n"
"\nOptions:\n"
- "\t-w\n\t\tWidth of window in pixels\n"
- "\t-h\n\t\tHeight of window in pixels\n"
- "\t-u\n\t\tMaximum undersample in pixels\n"
- "\t-d\n\t\tDetail in maximum iterations\n"
- "\t-f\n\t\tOne of these fractals:\n"
+ "\t-f\tOne of these fractals:\n"
"\t\t\tman[delbrot]\n"
"\t\t\ttri[corn]\n"
"\t\t\tju[lia]\n"
- "\t-i\n\t\tInput for selected fractal. Has to be after -f option.\n"
+ "\t-w\tWidth of window in pixels\n"
+ "\t-h\tHeight of window in pixels\n"
+ "\t-u\tMaximum undersample in pixels\n"
+ "\t-d\tDetail in maximum iterations\n"
+ "\t-i\tInput for selected fractal.\n"
"\t\t\tmandelbrot\t- no input\n"
"\t\t\ttricorn\t\t- no input\n"
"\t\t\tjulia\t\t- a complex number in the form real,complex\n"
"\t\t\t\t\t- the complex number will be divided by 1000 after input\n"
- "\t-s\n\t\tSpeed of color change (negative values reverse the direction)\n"
- "\t-c\n\t\tColorfulness\n"
+ "\t-s\tSpeed of color change (negative values reverse the direction)\n"
+ "\t-c\tColorfulness\n"
"\nControls:\n"
"\tArrow keys and wasd can be used for movement.\n"
- "\tOne can zoom in with + and zoom out with - keypad."
- "Zoom can also be controlled with scrollwheel on the mouse.\n"
+ "\tOne can zoom in with + and zoom out with - keypad.\n"
+ "\tZoom can also be controlled with scrollwheel on the mouse.\n"
"\tThe detail is controlled by * (increase) and / (decrease) keys.\n"
"\tThe color change can be sped up and down with 8 and 2 keys.\n";