{"id":13460169,"url":"https://github.com/librity/ft_fractol","last_synced_at":"2026-01-26T20:15:20.224Z","repository":{"id":46590203,"uuid":"442542947","full_name":"librity/ft_fractol","owner":"librity","description":"42 São Paulo - fract-ol","archived":false,"fork":false,"pushed_at":"2022-08-06T19:20:09.000Z","size":21266,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-25T16:46:06.779Z","etag":null,"topics":["42","42-school","42born2code","42projects","42saopaulo","42school","fract-ol","fractal","fractal-geometry","fractal-rendering","fractals","julia-fractal","julia-set","mandelbrot-set","mandlebrot-fractal","newton-fractals","newton-raphson"],"latest_commit_sha":null,"homepage":"https://www.42sp.org.br/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/librity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-28T17:56:19.000Z","updated_at":"2024-05-21T14:52:38.000Z","dependencies_parsed_at":"2022-09-17T16:20:11.394Z","dependency_job_id":null,"html_url":"https://github.com/librity/ft_fractol","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/librity/ft_fractol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_fractol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_fractol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_fractol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_fractol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/librity","download_url":"https://codeload.github.com/librity/ft_fractol/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_fractol/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28787221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42","42-school","42born2code","42projects","42saopaulo","42school","fract-ol","fractal","fractal-geometry","fractal-rendering","fractals","julia-fractal","julia-set","mandelbrot-set","mandlebrot-fractal","newton-fractals","newton-raphson"],"created_at":"2024-07-31T10:00:36.721Z","updated_at":"2026-01-26T20:15:20.200Z","avatar_url":"https://github.com/librity.png","language":"C","funding_links":[],"categories":["WELCOME"],"sub_categories":["**Fract-ol**"],"readme":"\u003ch3 align=\"center\"\u003e42 São Paulo - fract-ol\u003c/h3\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Norminette v3](https://github.com/librity/ft_fractol/actions/workflows/norminette_v3.yml/badge.svg)](https://github.com/librity/ft_fractol/actions/workflows/norminette_v3.yml)\n![42 São Paulo](https://img.shields.io/badge/42-SP-1E2952)\n![License](https://img.shields.io/github/license/librity/ft_fractol?color=yellow)\n![Code size in bytes](https://img.shields.io/github/languages/code-size/librity/ft_fractol?color=blue)\n![Lines of code](https://img.shields.io/tokei/lines/github/librity/ft_fractol?color=blueviolet)\n![Top language](https://img.shields.io/github/languages/top/librity/ft_fractol?color=ff69b4)\n![Last commit](https://img.shields.io/github/last-commit/librity/ft_fractol?color=orange)\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e A fractal navigator in pure C.\n  \u003cbr\u003e\n\u003c/p\u003e\n\n---\n\n## 📜 Table of Contents\n\n- [About](#about)\n- [Checklist](#checklist)\n- [Getting Started](#getting_started)\n- [Controls](#controls)\n- [Gallery](#gallery)\n- [Notes](#notes)\n- [42 São Paulo](#ft_sp)\n- [Resources](#resources)\n\n## 🧐 About \u003ca name = \"about\"\u003e\u003c/a\u003e\n\nThis is an interactive program\nthat lets you explore the three fractals:\nThe Mandelbrot and Julia sets,\nand the Newton fractal of the polynomial `z^3 - 1`.\nAll three produce beautiful geometric structures\nthat repeat themselves over increasing levels of detail.\n\nIt also lets you switch between three different color modes (algorithms):\nEscape-Time, Linear Interpolation and Bernstein polynomials.\nThe first one is the quickest while the last two are the prettiest.\n\nThis is my favorite project from the 42 curriculum:\nI not only learned a lot,\nI now have a folder full of sick desktop background I can show off.\nIt taught me how to translate mathematical objects and operations\ninto structures and functions.\nI also learned many different C optimizations,\nfrom compiler flags to changes in workflow and logic.\n\n## ✅ Checklist \u003ca name = \"checklist\"\u003e\u003c/a\u003e\n\n### Mandatory\n\n- [x] Compiles with `-Wall -Wextra -Werror`\n- [x] `.linux` file (42 Workspaces)\n- [x] Makefile rules: `$(NAME)` `all` `clean` `fclean` `re`\n- [x] Follows `norminette 3.3.51`\n- [x] Should not quit unexpectedly (segmentation fault, bus error, double\n      free, etc.)\n- [x] All allocated heap memory properly freed, no memory leaks.\n  - [x] Check memory leaks with `valgrind`\n- [x] Program name `fractol`\n- [x] Test in workspaces\n- [x] Turn in `Makefile`, `*.h`, `*.c` , `.linux` , `.gitignore`\n- [x] DON’T turn in libs as submodules.\n- [x] Receives the fractal type as arguments\n  - [x] Bad arguments: exits properly with a help message\n- [x] Allowed functions:\n  - [x] `open`, `close`, `read`, `write`, `malloc`, `free`, `perror`, `strerror`, `exit`\n  - [x] All `math.h`\n  - [x] All `mlx.h`\n  - [x] All `libft.h`\n  - [x] Your `ft_printf` (may be modified)\n    - [x] No `printf` from `stdio.h`\n- [x] Must use `MiniLibX`\n- [x] Make must compile without relinking\n- [x] No global variables\n- [x] Renders Mandelbrot\n- [x] Renders Julia\n  - [x] Receives Julia factor as arguments\n- [x] Handles zoom with mouse wheel\n- [x] Renders fractals with colors gradients proportional to iterations\n- [x] Smooth window management (minimizing, focus switch, etc.)\n- [x] ESC closes the program cleanly\n- [x] Clicking the window's `x` button closes the program cleanly\n- [x] Must use MiniLibX’s `images` (no `mlx_pixel_put`)\n\n### Bonus\n\n- [x] Render another fractal of your choice\n- [x] Zoom follows mouse position\n- [x] Arrow keys move the view\n- [x] Changes color on keypress\n\n### Extra Features\n\n- [x] Add LERP color mode\n- [x] Add Bernstein polynomials color mode\n- [x] Save to .bmp on keypress\n- [x] Change `max_iterations` on keypress\n- [x] Change `infinity` on keypress\n- [x] Add tests with `minunit.h`\n- [ ] Render with threads (optimization).\n- [ ] Change julia parameters on keypress\n- [ ] Fullscreen mode on keypress\n  - [ ] Awaiting Pull Request https://github.com/42Paris/minilibx-linux/pull/45\n- [ ] Switch fractal on keypress\n- [ ] Random colors on keypress\n- [ ] Add anti-aliasing\n\n## 🏁 Getting Started \u003ca name = \"getting_started\"\u003e\u003c/a\u003e\n\n### ⚙️ Prerequisites\n\nThis will only compile on Linux and FreeBSD.\n\nYou will need a C compiler (`gcc` or `clang`)\nand [minilibx](https://github.com/42Paris/minilibx-linux),\nan X-Window API in C made by 42 Paris:\n\n```bash\n# Clone the repo\ngit clone https://github.com/42Paris/minilibx-linux.git\ncd minilibx-linux\n\n# Install dependencies and build\nsudo apt install libxext-dev libxrandr-dev libx11-dev libbsd-dev libssl-dev\nmake\n\n# Copy archive and headers to system path\nsudo cp libmlx.a /usr/local/lib/\nsudo cp mlx.h /usr/local/include/\n\n# Add pages to man (optional)\nsudo mkdir /usr/local/man/man1\nsudo cp man/man1/* /usr/local/man/man1/\nman mlx\n```\n\n### 🖥️ Installing\n\nClone the repo and build with `make`:\n\n```bash\n$ git clone --recurse-submodules https://github.com/librity/ft_fractol.git\n$ cd ft_fractol\n$ make\n$ fractol mandelbrot\n```\n\nThis should open a new window rendering the mandelbrot fractal.\nYou can also render the julia set (that requires a complex factor),\nand the Newton fractal of the polynomial `z^3 - 1`:\n\n```bash\n$ fractol julia -0.391 -0.587\n$ fractol newton\n```\n\n## 🕹️ Controls \u003ca name=\"controls\"\u003e\u003c/a\u003e\n\n- `Esc` or `q`: Exit program\n- `=` and `-`: Zoom in and out\n- `Mouse Wheel`: Zoom in and out\n- `Arrow Keys`: Move fractal position\n- `Mouse Left Click`: Warp to clicked pixel\n- `c`: Switch color mode\n- `l` and `.`: Shift color bases up and down\n- `i` and `k`: Increase and decrease iterations\n- `t` and `g`: Increase and decrease infinity\n- `s`: Save viewport to bitmap\n\n## 🎨 Gallery \u003ca name=\"gallery\"\u003e\u003c/a\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"gallery/mbt_x_0.000000_y_0.000000_zoom_414.719999_iter_451_inf_4.000000_cmode_2_.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"gallery/mbt_x_-0.105700_y_-0.925569_zoom_352745.176312_iter_551_inf_54.000000_cmode_2_.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"gallery/mbt_x_-0.105700_y_-0.925569_zoom_352745.176312_iter_151_inf_54.000000_cmode_2_.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"gallery/julia_lerp_hotline_miami_1.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"gallery/julia_lerp_hotline_miami_2.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"gallery/mandelbrot_lerp_malayan_coral_5.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"gallery/mandelbrot_lerp_malayan_coral_16.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"gallery/mandelbrot_lerp_malayan_coral_24.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"gallery/julia_x_-0.382581_y_-0.643019_zoom_914412203648.733276_iter_1751_inf_314.000000_cmode_1_lerpfr_-139024413_lerpto_-125743310_.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"gallery/newton_x_0.100000_y_0.100000_zoom_200.000000_iter_51_inf_4.000000_cmode_0_dye_16225338_.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"gallery/newton_x_0.000000_y_0.000000_zoom_200.000000_iter_51_inf_4.000000_cmode_1_lerpfr_2533347_lerpto_15814450_.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"gallery/newton_x_-0.404436_y_0.003761_zoom_414.719999_iter_251_inf_4.000000_cmode_2_.png\" /\u003e\n\u003c/p\u003e\n\n[and much, much more...](https://github.com/librity/ft_fractol/tree/main/gallery)\n\n## 📝 Notes \u003ca name = \"notes\"\u003e\u003c/a\u003e\n\nWe can understand the basic workflow of the program from its `main.c`:\nall its function behave on the program's highest levels of abstraction.\n\nWe have a control structure `ctl` of type `t_fractol`\nwhere we inject anything that might change during runtime:\nwe have the window size,\nthe mlx instance, window and buffer,\nrendering params like the maximum number of iterations,\nand function pointers that allow us to dynamically change\nwhich fractal and how color is rendered.\nWe set all its default settings with `initialize_params`:\nthis ensures that the program won't crash if you forgot to set a param.\n\nThe window buffer is mostly handled by `minilibx`:\nwe just create it in `initialize_mlx`,\nthen set the color of its pixels and draw it to the window\nwhenever we render a fractal.\n\nIn `handle_arguments` we verify and parse the strings\nwe received from the shell.\nIf the arguments don't match any of the options\nwe exit the program with a help message.\n\nWe then `initialize_mlx`, which safely creates an `mlx` instance,\nwindow and image (a.k.a. the frame buffer).\nWe always check and exit the program if any of the pointers are `NULL`:\n**Not doing this WILL CRASH YOUR COMPUTER AND IT'S REALLY NOT FUNNY**\n(mine crashed three times during this project).\nWe also set the event handlers with `mlx_hooks`:\nthis will let us interact with the program\nwith our mouse and keyboard (zoom in/out, move, etc.)\nWe finally render the first frame of the fractal and draw it to the window.\n\nWhen we run the function `mlx_loop` we initialize the internal workflow\nof `mlx`.\nIt basically listens for events and runs the handlers functions we set.\nAll our handlers do basically the same thing:\nthey change a `ctl` parameter, then render another frame\nand draw it to the window.\n\nThe renderers is where the magic happens:\n\n1. Iterate through every pixel in the buffer\n2. Transform it to a complex number (`pixel(x, y) = x + y*i`)\n3. Run the fractal algorithm on that number\n4. Run the color algorithm on the number of iterations\n5. Draw that color to the buffer's pixel.\n\nThe Mandelbrot algorithm iterates the complex number `c`\ninside the function `Fn(z) = z^2 + c`,\nwhere `F0(z) = 0`.\n\nThe Julia algorithm is very similar to Mandelbrot's:\nwe iterate the complex number `c` and factor `f`\ninside the function `Fn(z) = z^2 + f`,\nwhere `F0(z) = c`.\n\nThe Newton fractal iterates the\n[Newton–Raphson method](https://en.wikipedia.org/wiki/Newton's_method)\nover an arbitrary differentiable function (`z^3 - 1` in this case)\nfor every pixel on the screen.\n\n## 🛸 42 São Paulo \u003ca name = \"ft_sp\"\u003e\u003c/a\u003e\n\nPart of the larger [42 Network](https://www.42.fr/42-network/),\n[42 São Paulo](https://www.42sp.org.br/) is a software engineering school\nthat offers a healthy alternative to traditional education:\n\n- It doesn't have any teachers and classes.\n- Students learn by cooperating\n  and correcting each other's work (peer-to-peer learning).\n- Its focus is as much on social skills as it is on technical skills.\n- It's completely free to anyone that passes its selection process -\n  [**The Piscine**](https://42.fr/en/admissions/42-piscine/)\n\nIt's an amazing school, and I'm grateful for the opportunity.\n\n## 📚 Resources \u003ca name = \"resources\"\u003e\u003c/a\u003e\n\n### minilibx\n\n- https://harm-smits.github.io/42docs/libs/minilibx\n- https://gontjarow.github.io/MiniLibX/\n- https://aurelienbrabant.fr/blog/managing-events-with-the-minilibx\n- https://aurelienbrabant.fr/blog/pixel-drawing-with-the-minilibx\n- https://aurelienbrabant.fr/blog/getting-started-with-the-minilibx\n- https://github.com/42sp/minilibx-linux\n- https://github.com/42Paris/minilibx-linux/issues/24\n- http://cyber.dabamos.de/unix/x11/\n- https://qst0.github.io/ft_libgfx/man_mlx.html\n- https://gontjarow.github.io/MiniLibX/mlx-tutorial-create-image.html\n- https://elearning.intra.42.fr/notions/minilibx/subnotions\n- https://elearning.intra.42.fr/tags/716/notions\n\n### minilibx functions\n\n```c\nvoid\t*mlx_init();\nvoid\t*mlx_new_window(void *mlx_ptr, int size_x, int size_y, char *title);\nint\tmlx_clear_window(void *mlx_ptr, void *win_ptr);\nint\tmlx_pixel_put(void *mlx_ptr, void *win_ptr, int x, int y, int color);\nvoid\t*mlx_new_image(void *mlx_ptr,int width,int height);\nchar\t*mlx_get_data_addr(void *img_ptr, int *bits_per_pixel,\n\t\t\t   int *size_line, int *endian);\nint\tmlx_put_image_to_window(void *mlx_ptr, void *win_ptr, void *img_ptr,\n\t\t\t\tint x, int y);\nint\tmlx_get_color_value(void *mlx_ptr, int color);\nint\tmlx_mouse_hook (void *win_ptr, int (*funct_ptr)(), void *param);\nint\tmlx_key_hook (void *win_ptr, int (*funct_ptr)(), void *param);\nint\tmlx_expose_hook (void *win_ptr, int (*funct_ptr)(), void *param);\nint\tmlx_loop_hook (void *mlx_ptr, int (*funct_ptr)(), void *param);\nint\tmlx_loop (void *mlx_ptr);\nint mlx_loop_end (void *mlx_ptr);\nint\tmlx_string_put(void *mlx_ptr, void *win_ptr, int x, int y, int color,\n\t\t       char *string);\nvoid\tmlx_set_font(void *mlx_ptr, void *win_ptr, char *name);\nvoid\t*mlx_xpm_to_image(void *mlx_ptr, char **xpm_data,\n\t\t\t  int *width, int *height);\nvoid\t*mlx_xpm_file_to_image(void *mlx_ptr, char *filename,\n\t\t\t       int *width, int *height);\nint\tmlx_destroy_window(void *mlx_ptr, void *win_ptr);\nint\tmlx_destroy_image(void *mlx_ptr, void *img_ptr);\nint\tmlx_destroy_display(void *mlx_ptr);\nint\tmlx_hook(void *win_ptr, int x_event, int x_mask,\n                 int (*funct)(), void *param);\nint\tmlx_do_key_autorepeatoff(void *mlx_ptr);\nint\tmlx_do_key_autorepeaton(void *mlx_ptr);\nint\tmlx_do_sync(void *mlx_ptr);\nint\tmlx_mouse_get_pos(void *mlx_ptr, void *win_ptr, int *x, int *y);\nint\tmlx_mouse_move(void *mlx_ptr, void *win_ptr, int x, int y);\nint\tmlx_mouse_hide(void *mlx_ptr, void *win_ptr);\nint\tmlx_mouse_show(void *mlx_ptr, void *win_ptr);\nint\tmlx_get_screen_size(void *mlx_ptr, int *sizex, int *sizey);\n```\n\n### Fractals\n\n- https://en.wikipedia.org/wiki/Fractal\n- https://en.wikipedia.org/wiki/List_of_fractals_by_Hausdorff_dimension\n- https://elearning.intra.42.fr/notions/fract-ol/subnotions\n- https://en.wikipedia.org/wiki/Mandelbrot_set\n- https://pt.mathigon.org/course/fractals/mandelbrot\n- https://repositorio.bc.ufg.br/tede/bitstream/tede/6343/5/Dissertação - Márcio Vaiz dos Reis - 2016.pdf\n- https://www.youtube.com/watch?v=eN8e6CJwdZU\n- https://docs.ufpr.br/~ewkaras/ensino/fractais/Julia_Mandelbrot.pdf\n- https://www.codingame.com/playgrounds/2358/how-to-plot-the-mandelbrot-set/mandelbrot-set\n- https://theses.liacs.nl/pdf/2018-2019-JonckheereLSde.pdf\n- https://fractalfoundation.org/fractivities/FractalPacks-EducatorsGuide.pdf\n- https://discord.com/channels/706206701598277681/854438469614174228/940281570332405760\n- https://www.wikihow.com/Plot-the-Mandelbrot-Set-By-Hand\n- https://www.geogebra.org/m/jcpvtkhz\n\n### Mandelbrot set\n\n- https://en.wikipedia.org/wiki/Mandelbrot_set\n- https://en.wikipedia.org/wiki/Plotting_algorithms_for_the_Mandelbrot_set\n- https://github.com/giyeo/giyeo/wiki/O-Conjunto-de-Mandelbrot\n\n### Julia set\n\n- https://en.wikipedia.org/wiki/Julia_set\n- https://mathworld.wolfram.com/JuliaSet.html\n\n### Tricorn\n\n- https://en.wikipedia.org/wiki/Tricorn_(mathematics)\n\n### **Burning Ship**\n\n- https://en.wikipedia.org/wiki/Burning_Ship_fractal\n\n### Newton Fractal\n\n- https://en.wikipedia.org/wiki/Newton_fractal\n- https://en.wikipedia.org/wiki/Newton's_method\n\n### https://github.com/jcponce\n\n- https://github.com/jcponce/jcponce.github.io\n- https://www.dynamicmath.xyz/mandelbrot-julia/\n- https://github.com/jcponce/complex\n\n### OneLoneCoder\n\n- https://www.youtube.com/watch?v=PBvLs88hvJ8\n- https://github.com/OneLoneCoder/olcPixelGameEngine/blob/master/Videos/OneLoneCoder_PGE_Mandelbrot.cpp\n\n### Window Viewport\n\n- https://www.geeksforgeeks.org/window-to-viewport-transformation-in-computer-graphics-with-implementation/\n\n### Videos\n\n- https://www.youtube.com/watch?v=9gk_8mQuerg\n- https://www.youtube.com/watch?v=LqbZpur38nw\n- https://www.youtube.com/watch?v=FFftmWSzgmk\n- https://www.youtube.com/watch?v=9U0XVdvQwAI\n- https://www.youtube.com/watch?v=ovJcsL7vyrk\n- https://www.youtube.com/watch?v=N8WWodGk9-g\n- https://www.youtube.com/watch?v=GiAj9WW1OfQ\n\n### Math\n\n- https://fractalfoundation.org/fractivities/FractalPacks-EducatorsGuide.pdf\n- http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/\n\n### Luc de Jonckheere’s Thesis\n\n- https://theses.liacs.nl/pdf/2018-2019-JonckheereLSde.pdf\n- https://gmplib.org/manual/Floating_002dpoint-Functions\n- https://ieeexplore.ieee.org/document/4610935\n- https://www.math.univ-angers.fr/~tanlei/papers/similarityMJ.pdf\n- https://users.math.yale.edu/~bbm3/web_pdfs/encyclopediaBritannica.pdf\n\n### Fractal Software\n\n- https://github.com/search?o=desc\u0026q=fractal\u0026s=stars\u0026type=Repositories\n- https://github.com/fract4d/gnofract4d\n- https://fractint.org/\n- https://fractalwiki.org/wiki/SuperFractalThing\n- https://mathr.co.uk/\n- https://github.com/cveld/blazor-mandelbrot-deepzoom\n- https://github.com/munrocket/deep-mandelbrot\n- https://github.com/JMaio/deep-fractal\n- https://jmaio.dev/deep-fractal/\n- https://xaos-project.github.io/\n- https://github.com/michele-summo/ms-xaos\n- https://github.com/xaos-project\n- https://github.com/xaos-project/XaoS\n- https://github.com/xaos-project/XaoSjs\n- https://xaos-project.github.io/XaoSjs/\n- https://github.com/HackerPoet/MarbleMarcher\n- https://github.com/jonnyhyman/Chaos\n- https://github.com/HackerPoet/PySpace\n- https://github.com/HackerPoet/FractalSoundExplorer\n\n### Map\n\n- https://github.com/processing/p5.js/blob/main/src/math/calculation.js#L451\n\n### `valgrind`\n\n- https://valgrind.org/\n- https://github.com/pmem/valgrind\n- https://www.cprogramming.com/debugging/valgrind.html\n- https://stackoverflow.com/questions/67040349/valgrind-gives-error-memory-still-reachable\n- https://www.handlebar-online.com/usefull-tips/what-does-valgrind-still-reachable-mean/\n\n### GCC `-fsanitize=address` `-fsanitize=leak`\n\n- Faster than `valgrind` , but detects less leaks.\n- Incompatible with valgrind\n- Probably slows down runtime\n- https://stackoverflow.com/questions/11524960/memory-leaks-not-detected-by-crt-memory-leak-detection\n- https://stackoverflow.com/questions/31210053/gcc-and-fsanitize-leak\n- https://stackoverflow.com/questions/65572114/how-does-fsanitize-leak-affect-runtime-performance\n\n```c\n// Won't detect this leak\nint\tmain(void)\n{\n\tvoid\t*ptr;\n\tptr = malloc(8);\n\treturn (0);\n}\n```\n\n### Debug Flag `-g`\n\n- https://stackoverflow.com/questions/24117063/is-a-program-compiled-with-g-gcc-flag-slower-than-the-same-program-compiled-wit\n\n### Optimization Flags\n\n- `-O3` and `-O2`\n- https://www.rapidtables.com/code/linux/gcc/gcc-o.html\n\n### Minilibx close window on red cross click\n\n- https://harm-smits.github.io/42docs/libs/minilibx/events.html#test-your-skills\n- https://tronche.com/gui/x/xlib/events/\n\n### X Server/**X11/X Window System**\n\n- https://en.wikipedia.org/wiki/X_Window_System\n- https://duckduckgo.com/?q=x11+fullscreen+window\u0026t=brave\u0026atb=v1-1\u0026ia=web\n- https://stackoverflow.com/questions/1829706/how-to-query-x11-display-resolution\n- https://stackoverflow.com/questions/9083273/x11-fullscreen-window-opengl\n- https://www.tonyobryan.com/index.php?article=9\n\n### Wayland\n\n- https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)#Differences_between_Wayland_and_X\n\n### Zoom\n\n- https://www.youtube.com/watch?v=ixFCsST2pF4\n- https://iq.opengenus.org/power-exponential-math-h-c/\n\n### \\***\\*GNU Multiple Precision Arithmetic Library\\*\\***\n\n- https://en.wikipedia.org/wiki/GNU_Multiple_Precision_Arithmetic_Library\n- https://github.com/HowJnB/gmp\n- https://gmplib.org/\n\n### Nvidia **Compute Unified Device Architecture**\n\n- https://en.wikipedia.org/wiki/CUDA\n- https://www.youtube.com/watch?v=RaCPrXYOiRE\n\n### C Optimizations\n\n- https://stackoverflow.com/questions/54297525/fast-way-to-get-a-close-power-of-2-number-floating-point\n\n### Coloring Algorithms\n\n- https://www.mi.sanu.ac.rs/vismath/javier/b1.htm\n- https://math.stackexchange.com/questions/4035/continuous-coloring-of-a-mandelbrot-fractal\n- https://www.uvm.edu/~msargent/fractals/\n- https://www.fractalus.com/fractint/dmj-pub.htm\n- https://www.researchgate.net/publication/266018231_Fractals_and_multi_layer_coloring_algorithms\n- https://www.ultrafractal.com/help/index.html?/help/coloring/coloring.html\n\n### Escape-Time Algorithm\n\n- https://en.wikipedia.org/wiki/Plotting_algorithms_for_the_Mandelbrot_set#Escape_time_algorithm\n- https://www.mi.sanu.ac.rs/vismath/javier/b2.htm\n\n### Linear Interpolation (lerp)\n\n- https://en.wikipedia.org/wiki/Linear_interpolation\n- https://github.com/processing/p5.js/blob/main/src/math/calculation.js#L311\n- https://p5js.org/reference/#/p5/lerp\n- https://github.com/processing/p5.js/blob/aa47d5025162edb66abeb70e9912a50bcb63edaa/src/color/creating_reading.js#L401\n\n### Color Gradients\n\n- https://learncplusplus.org/learn-to-generate-beautiful-color-gradients-in-c-builder/\n- https://www.py4u.net/discuss/2538256\n- https://www.color-hex.com/\n\n### Bernstein polynomials Color\n\n- https://theses.liacs.nl/pdf/2018-2019-JonckheereLSde.pdf\n- https://en.wikipedia.org/wiki/Bernstein_polynomial\n\n```c\nr(t) = 9 ∗ (1 − t) ∗ t^3 ∗ 255\ng(t) = 15 ∗ (1 − t)^2 ∗ t^2 ∗ 255\nb(t) = 8.5 ∗ (1 − t)^3 ∗ t ∗ 255\n```\n\n### Graphic Effects\n\n- https://en.wikipedia.org/wiki/Computer_graphics\n- https://en.wikipedia.org/wiki/2D_computer_graphics\n- https://en.wikipedia.org/wiki/Pixel-art_scaling_algorithms\n\n### Anti-Aliasing (NOT A FILTER)\n\n- Rendering fractals inevitably causes aliasing (undesirable artifacts)\n- We remove aliasing by getting more samples (rendering at a higher resolution), then taking their average to get the final color value for the pixel.\n- https://www.fractalus.com/info/antialias.htm\n- https://en.wikipedia.org/wiki/Aliasing\n- https://en.wikipedia.org/wiki/Anti-aliasing_filter\n- https://en.wikipedia.org/wiki/Temporal_anti-aliasing\n- https://en.wikipedia.org/wiki/Fast_approximate_anti-aliasing\n- https://en.wikipedia.org/wiki/Multisample_anti-aliasing\n- https://en.wikipedia.org/wiki/Spatial_anti-aliasing\n- https://en.wikipedia.org/wiki/Supersampling\n- https://stackoverflow.com/questions/3011274/antialiasing-algorithm\n- https://en.wikipedia.org/wiki/Nyquist–Shannon_sampling_theorem\n\n### Blur Filters\n\n- They don’t improve the image, they just make it blury.\n- https://www.geeksforgeeks.org/box-blur-algorithm-with-python-implementation/\n- https://en.wikipedia.org/wiki/Box_blur\n- https://en.wikipedia.org/wiki/Gaussian_blur\n- https://github.com/liamfotheringham/Mandelbrot-Gaussian-Blur\n\n### **Anisotropic filters**\n\n- Enhances texture quality seen at oblique angles.\n- https://en.wikipedia.org/wiki/Mipmap\n- https://en.wikipedia.org/wiki/Anisotropic_filtering\n- https://en.wikipedia.org/wiki/Bilinear_interpolation\n- https://en.wikipedia.org/wiki/Trilinear_filtering\n\n### Bitwise Operations\n\n- https://en.wikipedia.org/wiki/Bitwise_operations_in_C\n\n### `pthread.h`\n\n- https://www.man7.org/linux/man-pages/man0/pthread.h.0p.html\n- https://iq.opengenus.org/multithreading-and-pthread-in-c/\n- https://www.geeksforgeeks.org/multithreading-c-2/\n- https://www.tutorialspoint.com/multithreading-in-c\n- https://github.com/samuelpio01/multithreading-in-c/blob/master/pthread_multithreading.c\n\n### `ft_ftoa`, `ft_dtoa`, `ft_ldtoa`\n\n- https://www.geeksforgeeks.org/convert-floating-point-number-string/\n- https://stackoverflow.com/questions/32659336/getting-the-exponent-from-a-floating-point-in-c\n- https://stackoverflow.com/questions/5589383/extract-fractional-part-of-double-efficiently-in-c\n- https://www.cplusplus.com/reference/cmath/modf/\n- https://www.cplusplus.com/reference/cmath/remainder/\n- https://stackoverflow.com/questions/4264127/correct-format-specifier-for-double-in-printf\n\n```c\nsizeof(int): 4\nsizeof(long): 8\nsizeof(long long): 8\nsizeof(float): 4\nsizeof(double): 8\nsizeof(long double): 16\n```\n\n### `ft_atof`, `ft_atold`\n\n- https://www.geeksforgeeks.org/atol-atoll-and-atof-functions-in-c-c/\n- https://stackoverflow.com/questions/52391330/create-a-precise-atof-implementation-in-c\n- https://www.tutorialspoint.com/c_standard_library/c_function_atof.htm\n- https://www.cplusplus.com/reference/cstdlib/atof/\n- https://www.programiz.com/cpp-programming/library-function/cstdlib/atof\n\n### Norminette-compliant C formatter\n\n- https://github.com/dawnbeen/c_formatter_42\n- https://marketplace.visualstudio.com/items?itemName=keyhr.42-c-format\n\n### Automatically add functions to C header\n\n- https://stackoverflow.com/questions/34288513/how-to-automatically-generate-function-headers-for-h-file-in-clion\n- https://stackoverflow.com/questions/17961648/fast-way-to-generate-code-functions-from-header-functions-in-visual-studio\n- https://robotpy-build.readthedocs.io/en/latest/autowrap.html\n\n### C Multiline String Literal\n\n- https://jameshfisher.com/2016/11/30/c-multiline-literal/\n\n### C Documenting Functions\n\n- https://stackoverflow.com/questions/3568052/where-to-document-functions-in-c-or-c\n\n### C Testing\n\n- https://github.com/siu/minunit\n- https://github.com/AdrianWR/minishell/blob/main/test/src/test.c\n\n### C Function Pointers\n\n- https://stackoverflow.com/questions/2438539/does-function-pointer-make-the-program-slow\n- https://www.geeksforgeeks.org/function-pointer-in-c/\n- https://www.tutorialspoint.com/function-pointer-in-c\n- https://www.educba.com/function-pointer-in-c/\n- https://www.cprogramming.com/tutorial/function-pointers.html\n- https://www.learncpp.com/cpp-tutorial/function-pointers/\n- https://riptutorial.com/c/example/31818/typedef-for-function-pointers\n\n### Makefile `wildcard` `foreach` `patsubst` `addprefix` `filter-out`\n\n- https://www.gnu.org/software/make/manual/html_node/Wildcard-Function.html\n- https://github.com/LuigiEnzoFerrari/42School_Libft/blob/164a400929/Makefile\n- https://github.com/LuigiEnzoFerrari/EasyAsHell/blob/main/Makefile\n- https://stackoverflow.com/questions/28919583/create-directories-when-generating-object-files-in-gcc\n- https://stackoverflow.com/questions/1814270/gcc-g-option-to-place-all-object-files-into-separate-directory\n- https://stackoverflow.com/questions/16144115/makefile-remove-duplicate-words-without-sorting\n\n### Relinking\n\n- https://stackoverflow.com/questions/29659569/what-is-relinking-warning\n\n### Git\n\n- https://www.gitkraken.com/learn/git/problems/revert-git-commit\n\n### Git `submodule`\n\n- `git clone --recurse-submodule REMOTE_REPO`\n- `git submodule add REMOTE_REPO`\n- `git submodule foreach git pull`\n- `git submodule update --init --recursive`\n- https://stackoverflow.com/questions/33714063/how-to-update-submodules-in-git\n- https://stackoverflow.com/questions/59271919/how-to-clone-public-submodule-in-github-actions\n- https://stackoverflow.com/questions/50254184/git-submodule-and-fetch\n- https://www.w3docs.com/snippets/git/how-to-add-a-submodule-in-git.html\n- https://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule#1260982\n\n### Color Inspirations\n\n- https://en.wikipedia.org/wiki/Calliophis_bivirgatus\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrity%2Fft_fractol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibrity%2Fft_fractol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrity%2Fft_fractol/lists"}