{"id":23690800,"url":"https://github.com/dispatchcode/mandelbrot-explorer","last_synced_at":"2026-01-16T10:30:31.627Z","repository":{"id":229352666,"uuid":"479879642","full_name":"DispatchCode/mandelbrot-explorer","owner":"DispatchCode","description":"A Mandelbrot Fractal explorer written in Rust using SDL2","archived":false,"fork":false,"pushed_at":"2022-04-23T23:51:40.000Z","size":154,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T02:52:08.857Z","etag":null,"topics":["fractals","rust","sdl2"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DispatchCode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-04-10T00:57:57.000Z","updated_at":"2022-04-24T09:41:37.000Z","dependencies_parsed_at":"2024-03-23T19:22:29.464Z","dependency_job_id":"25ed6eed-839e-42e0-a442-8d98aeaf1050","html_url":"https://github.com/DispatchCode/mandelbrot-explorer","commit_stats":null,"previous_names":["dispatchcode/mandelbrot-explorer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DispatchCode%2Fmandelbrot-explorer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DispatchCode%2Fmandelbrot-explorer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DispatchCode%2Fmandelbrot-explorer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DispatchCode%2Fmandelbrot-explorer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DispatchCode","download_url":"https://codeload.github.com/DispatchCode/mandelbrot-explorer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239755984,"owners_count":19691571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["fractals","rust","sdl2"],"created_at":"2024-12-30T02:52:10.677Z","updated_at":"2026-01-16T10:30:31.531Z","avatar_url":"https://github.com/DispatchCode.png","language":"Rust","readme":"# Mandelbrot Fractal explorer\n\nInspired by my own [fraCtal](https://github.com/DispatchCode/fraCtal) project; code \u0026 formulas explanations are there too.\nInformation about the mandelbrot set can also be found on [Wikipedia](https://en.wikipedia.org/wiki/Mandelbrot_set).\n\nFor better performance build \u0026 run with release flag 😎:\n\n```\ncargo run --release\n```\nThe code produced by Rust heavily makes use of the MMX set, as you can see down below (`mandelbrot_fractal()` function):\n\n![2022-04-24_011503](https://user-images.githubusercontent.com/4256708/164949367-02cce677-968e-4012-b3b0-ad4f4360bd83.png)\n\nIf your CPU support AVX2 or AVX512 - or other - consider using the appropriate `rustc` flag or change the configuration of Cargo to makes use of such sets.\n\n### Features:\n✅ Mandelbrot Fractal \u003cbr\u003e\n✅ SDL2 (you need SDL2 to run the project) \u003cbr\u003e\n✅ save the generated fractal as image (PNG) \u003cbr\u003e\n✅ size, zoom, colors can bhe changed \u003cbr\u003e\n❌ ImGui support (or a GUI menu where options can be changed) \u003cbr\u003e\n❌ multithreading support\n\n### Future plans:\n🎯 ImGui support \u003cbr\u003e\n\n---\n## Generated images\n\n```Rust\nlet (val_in, val_out) = (32, 0);\nlet g = if i \u003e= 32 {\n    (255.0\n        - (((i + val_in) as f32 / (max_iterations + val_in) as f32)\n            * (255 - val_out) as f32)) as u8\n} else {\n    0 as u8\n};\n```\n\n![mandelbrot0](https://user-images.githubusercontent.com/4256708/164943526-16890613-b342-43c4-9453-102be268403b.png)\n\n---\n\n```Rust\nlet attenuation = false; // disable attenuation\n// ...\nlet (val_in, val_out) = (32, 150);\nlet g = if i \u003e= 32 {\n    (255.0\n        - (((i + val_in) as f32 / (max_iterations + val_in) as f32)\n            * (255 - val_out) as f32)) as u8\n} else {\n    0 as u8\n};\n```\n![mandelbrot](https://user-images.githubusercontent.com/4256708/164946372-5da42f27-840b-4196-8d3f-8d4e501fcd8c.png)\n\n---\n\n```Rust\nlet attenuation = false;\n\n// ...\n\nlet (val_in, val_out) = (32, 0);\nlet g = if i \u003e= 32 {\n    (255.0\n        - (((i + val_in) as f32 / (max_iterations + val_in) as f32)\n            * (255 - val_out) as f32)) as u8\n} else {\n    0 as u8\n};\n```\n![mandelbrot](https://user-images.githubusercontent.com/4256708/164946435-5a032e9c-258c-49fe-9269-cf138484aeec.png)\n\n---\n\n```Rust\nlet attenuation = false;\n\n// ...\n\nlet (val_in, val_out) = (32, 0);\nlet g = if i \u003e= 0 {\n    (255.0\n        - (((i + val_in) as f32 / (max_iterations + val_in) as f32)\n            * (255 - val_out) as f32)) as u8\n} else {\n    0 as u8\n};\n```\n\n![mandelbrot](https://user-images.githubusercontent.com/4256708/164946477-f2c95510-e42e-4755-8caa-b10c4554b613.png)\n\n---\n```Rust\nlet attenuation = true;\n\nlet (blu_a, blu_b) = (255.0, 255.0);\nlet (red_a, red_b) = (0.0, 255.0);\n\nlet (val_in, val_out) = (128, 0);\nlet g = if i \u003e= 32 {\n    (255.0\n        - (((i + val_in) as f32 / (max_iterations + val_in) as f32)\n            * (255 - val_out) as f32)) as u8\n} else {\n    0 as u8\n};\n```\n\n![mandelbrot](https://user-images.githubusercontent.com/4256708/164946619-e0fe9141-23ee-4b8c-bf0c-7d3e85248396.png)\n\n---\n```Rust\nlet attenuation = true;\nlet (x_min, x_max, y_min, y_max) = (0.40, 0.37, 0.26, 0.21);\n\n// The colors around the lake\nlet (blu_a, blu_b) = (32.0, 255.0);\nlet (red_a, red_b) = (32.0, 255.0);\n\nlet (val_in, val_out) = (180,0);\nlet g = if i \u003e= 128 {\n    (255.0\n        - (((i + val_in) as f32 / (max_iterations + val_in) as f32)\n          * (255 - val_out) as f32)) as u8\n    } else {\n        32 as u8\n};\n```\n\n![mandelbrot](https://user-images.githubusercontent.com/4256708/164948369-3117a0e7-f6c3-4789-8064-c29917ec3b3c.png)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdispatchcode%2Fmandelbrot-explorer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdispatchcode%2Fmandelbrot-explorer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdispatchcode%2Fmandelbrot-explorer/lists"}