/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/05 19:57:50 by ljiriste #+# #+# */
-/* Updated: 2024/01/19 11:30:08 by ljiriste ### ########.fr */
+/* Updated: 2024/01/19 13:43:01 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
c.r = x;
c.i = y;
- count = 0;
- z.r = 0;
- z.i = 0;
+ count = 1;
+ z.r = x;
+ z.i = y;
if (complex_norm(c) > 4)
return (0);
- while (complex_norm(z) < settings->threshold && count < settings->detail)
+ while (complex_norm(z) < 256 && count < settings->detail)
{
z = complex_add(complex_mul(z, z), c);
++count;
z.i = 0;
if (complex_norm(c) > 4)
return (0);
- while (complex_norm(z) < settings->threshold && count < settings->detail)
+ while (complex_norm(z) < 256 && count < settings->detail)
{
z = complex_add(complex_mul(complex_conj(z), complex_conj(z)), c);
++count;
/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/11 18:51:29 by ljiriste #+# #+# */
-/* Updated: 2024/01/18 17:12:40 by ljiriste ### ########.fr */
+/* Updated: 2024/01/19 13:43:18 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
struct s_set_man
{
int detail;
- int threshold;
int color_stability;
};
typedef struct s_set_man t_set_man;
/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/27 14:29:26 by ljiriste #+# #+# */
-/* Updated: 2024/01/19 11:21:04 by ljiriste ### ########.fr */
+/* Updated: 2024/01/19 13:44:02 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
if (argc == 0)
free(argv);
s->set.man.detail = 1000;
- s->set.man.threshold = 1000;
- s->set.man.color_stability = 100;
+ s->set.man.color_stability = 1000;
s->img.width = 1000;
s->img.height = 1000;
s->img.undersample_max = 5;