Also change detection of XK_KP keys to also include the numbered
variants. I'm not sure why numlock has no effect on the keycode
but I think this way it is more portable.
This is to prevent repeating the new strip from repeating on rapid
movement. This functionality was probably lost in commit f5c9e75
when the calculation was moved from draw_fractal to calculate_base.
As per the subject fractol should should behave as follows:
"If no parameter is provided, or if the parameter is invalid, the
program displays a list of available parameters and exits properly."
These had different structures because of the anticipation of
differences between input for these fractals. This however makes
parsing more difficult. Having a single structure with fields that
may not be utilized by every fractal seems to be the more reasonable
option.
This halo is caused by returning 0 instead of using the proper formula
for points too far from origin. Setting the return value for such
points to the value of on the inner border of the halo fixes this.
For this I had to create new matrix that holds the same info as did
the image. The image is then constructed from this matrix by adding
a value that changes in time.
Centering was calculated based on default values hence it was wrong for
different sizes of window. Solved by moving the calculation after
argument parsing.
Movement was impossible for small windows, as the calculated movement
was smaller than a pixel which got rounded to 0. Solved by assigning
signum of movement when 0 is calculated.
When height and width were not the same, the program would crash
because the access to a matrix had rows and columns switched.
(image x axis corresponds with column number of matrix)
Add 4 options for argument parsing:
height
width
(level of) detail
(maximum) undersample
Update minilibx so that it works properly on close
When closing the window using the close button, valgrind makes a fuss
because minilibx checks the memory location it just cleared.
In this update this is rectified and closing using the window
button does not raise any problem.
Lukas Jiriste [Thu, 18 Jan 2024 16:18:46 +0000 (17:18 +0100)]
Refactor mandelbrot const vars to setting variable
Add settings (t_set set) as a member to t_session.
It is constructed as a union of settings type of each fractal, which may
prove useless if the settings for mandelbrot (t_set_man)
cover all the needs of other fractals. This seems unlikely however.
Add t_set_jul as a placeholder for the concept to be illustrative.
Lukas Jiriste [Thu, 18 Jan 2024 10:01:54 +0000 (11:01 +0100)]
Make it so move only calculates the new area
Only the area that has not been displayed before the move needs to be
calculated. The area of the window that does not move outside the window
need not be recalculated. Implement this functionality.
Lukas Jiriste [Wed, 17 Jan 2024 14:02:12 +0000 (15:02 +0100)]
Change the code without much to show for it
Change the code so that adding partial picture construction is easier in
the future. Changes also support drawing in worse resolution.
Needs refactoring of main.c and possible checking the header files.
Lukas Jiriste [Tue, 16 Jan 2024 09:38:15 +0000 (10:38 +0100)]
Change Makefile to download submodules
Add target %/Makefile to Makefile and add Makefiles of subprojects as
prerequisites for compilation. This ammends the situation when after git
clone, the submodule folders are empty nad compilation fails because
header files are missing.
Lukas Jiriste [Tue, 16 Jan 2024 09:22:22 +0000 (10:22 +0100)]
Update Libft
Update Libft (not needed?).
Change Makefile to reflect changes in Libft structure.
Add debug target to Makefile which compiles with -g and propagates to
Libft.
Lukas Jiriste [Sat, 11 Nov 2023 17:44:45 +0000 (18:44 +0100)]
Generalize palette construction
Add general approach to constructing palletes with "equidistant
partitioning" of colors. Change mandelbrot in main accordingly, but it
should probably be separated to another file (fractals.c?)
Remove (comment out) enhancement of computed fractal when no event
happens, because it causes valgrind to report issues. Further
investigation needed.
Lukas [Wed, 8 Nov 2023 09:14:55 +0000 (10:14 +0100)]
Finish the foundation, provide basic functionality
Make structural changes to project for easier handling and addition of
palettes and fractals.
Introduce the executable actually working. It draws mandelbrot set.
Add zoom in/out functionality.
Introduce some color issues (needs investigation).
Lukas Jiriste [Wed, 1 Nov 2023 12:41:04 +0000 (13:41 +0100)]
Add .gitignore
Add .gitingore to this project and update Libft to also include
.gitignore file in order not to disturb the git status command's results
when run on built project.