Change default values and behaviour of color shift
authorLukas Jiriste <ljiriste@student.42prague.com>
Fri, 26 Apr 2024 09:46:55 +0000 (11:46 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Fri, 26 Apr 2024 09:46:55 +0000 (11:46 +0200)
src/event_handling.c
src/main.c
src/trans_view.c

index b51097e50f28d730d53313934119ea83cb393bc9..cc1e1148111c5a351fbe9591d60fd9da65642f85 100644 (file)
@@ -6,7 +6,7 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2023/12/05 19:35:01 by ljiriste          #+#    #+#             */
-/*   Updated: 2024/04/26 11:24:51 by ljiriste         ###   ########.fr       */
+/*   Updated: 2024/04/26 11:42:29 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
@@ -21,8 +21,8 @@
 #define ZOOM_OUT 0.5
 #define ZOOM_IN 2
 #define DETAIL_MULT 10
-#define SHIFT_MULT 1.2
-#define SHIFT_THRESH 0.0001
+#define SHIFT_MULT 1.5
+#define SHIFT_THRESH 0.000001
 
 static void    set_for_redraw(t_session *s)
 {
index 75d7e31b9bcf5389f325b2af77d68d1602ae3bfb..a156bf10238f4ea64f8012771bd394d43ea2ef40 100644 (file)
@@ -6,7 +6,7 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2023/10/27 14:29:26 by ljiriste          #+#    #+#             */
-/*   Updated: 2024/04/26 11:08:47 by ljiriste         ###   ########.fr       */
+/*   Updated: 2024/04/26 11:36:37 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
@@ -22,15 +22,15 @@ void        set_default(t_session *s)
 {
        s->img.width = 1920;
        s->img.height = 1011;
-       s->img.undersample_max = 5;
+       s->img.undersample_max = 10;
        s->set.detail = 1000;
        s->view.fractal = NULL;
        s->view.palette = tri_color;
        s->view.color_shift_speed = -0.001;
-       s->set.color_stability = 100;
+       s->set.color_stability = 50;
        s->set.input.cpx = (t_complex){.r = -0.4, .i = 0.6};
-       s->view.pixel_size.x = 0.01;
-       s->view.pixel_size.y = 0.01;
+       s->view.pixel_size.x = 0.003;
+       s->view.pixel_size.y = 0.003;
        s->view.color_shift = 0;
        return ;
 }
index 7d4d97a3f57e0639a08c79b05425373a90f9a440..f6c320eaf9e012a4148c7aaa437704048f07de29 100644 (file)
@@ -6,7 +6,7 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2024/04/26 10:40:31 by ljiriste          #+#    #+#             */
-/*   Updated: 2024/04/26 11:29:08 by ljiriste         ###   ########.fr       */
+/*   Updated: 2024/04/26 11:41:29 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
@@ -88,9 +88,9 @@ void  change_shift_speed(double *speed, double mult, double thresh)
        if (-thresh < *speed && *speed < thresh)
        {
                if (mult > 0)
-                       *speed = thresh;
+                       *speed = 10 * thresh;
                else
-                       *speed = -thresh;
+                       *speed = -10 * thresh;
                return ;
        }
        if (*speed > 0 && mult >= 0)