17# include "MLX42/MLX42.h"
149double ft_atod(
const char *str);
154int ft_strcmp(
const char *s1,
const char *s2);
180void handle_key(mlx_key_data_t keydata,
void *param);
185void handle_scroll(
double xdelta,
double ydelta,
void *param);
192# define FRACTAL_LIMIT 4.0
193# define MAX_ITERATIONS 75
194# define RESET "\033[0m"
195# define LIGHT_RED "\033[38;5;203m"
196# define LIGHT_GOLD "\033[38;5;220m"
197# define LIGHT_GREEN "\033[38;5;120m"
e_number_flags
Flags for validating numbers.
int ft_strcmp(const char *s1, const char *s2)
Compares two strings.
struct s_data t_data
Data structure for fractal rendering.
enum e_offset_index t_offset_index
Indices for offsets in the x and y directions.
enum e_number_flags t_number_flags
Flags for validating numbers.
int fr_putstr_fd(char *s, int fd)
Writes a string to a file descriptor.
struct s_color t_color
Represents an RGB color.
e_scale_index
Indices for scaling factors in the x and y directions.
e_err_msg
Error messages used for input validation.
void render_fractal(t_data *data)
Render the specified fractal.
struct s_render_vars t_render_vars
Variables used for fractal rendering calculations.
e_offset_index
Indices for offsets in the x and y directions.
enum e_fractal_type t_fractal_type
e_complex_index
Indices for complex numbers (real and imaginary)
int precompute_coords(double **c_re, double **c_im, t_render_vars *vars)
Precomputes coordinates for fractal rendering.
void handle_key(mlx_key_data_t keydata, void *param)
Handles key inputs.
enum e_complex_index t_complex_index
Indices for complex numbers (real and imaginary)
struct s_atod_data t_atod_data
Helper structure for string-to-double conversion.
double ft_atod(const char *str)
Converts a string to a double.
void render_mandelbrot(t_data *data)
Render the Mandelbrot fractal.
void render_julia(t_data *data)
Renders the Julia fractal.
enum e_scale_index t_scale_index
Indices for scaling factors in the x and y directions.
void handle_scroll(double xdelta, double ydelta, void *param)
Handles scroll inputs.
void calculate_scales_and_limits(t_render_vars *vars, t_data *data)
Calculates scales and limits for rendering fractals.
int calculate_color(int iterations)
Calculates the color based on the number of iterations.
Helper structure for string-to-double conversion.
Data structure for fractal rendering.
t_fractal_type fractal_type
Variables used for fractal rendering calculations.