{"id":15047884,"url":"https://github.com/questiowo/buddhabrot","last_synced_at":"2026-02-01T02:03:07.018Z","repository":{"id":47616082,"uuid":"319165479","full_name":"QuestioWo/buddhabrot","owner":"QuestioWo","description":"C++ buddhabrot fractal rendering program that uses the OpenGL and OpenCL libraries","archived":false,"fork":false,"pushed_at":"2022-01-09T21:36:15.000Z","size":15600,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T10:49:03.450Z","etag":null,"topics":["buddhabrot","c","c99","cplusplus","cplusplus-11","cpp","cpp11","fractal","fractal-algorithms","fractal-rendering","fractals","gpu","gpu-acceleration","opencl","opencl-kernels","opengl"],"latest_commit_sha":null,"homepage":"https://questiowo.github.io/buddhabrot","language":"C++","has_issues":false,"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/QuestioWo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["QuestioWo"]}},"created_at":"2020-12-07T00:51:42.000Z","updated_at":"2023-02-06T21:04:44.000Z","dependencies_parsed_at":"2022-08-20T13:20:19.984Z","dependency_job_id":null,"html_url":"https://github.com/QuestioWo/buddhabrot","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/QuestioWo/buddhabrot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuestioWo%2Fbuddhabrot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuestioWo%2Fbuddhabrot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuestioWo%2Fbuddhabrot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuestioWo%2Fbuddhabrot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuestioWo","download_url":"https://codeload.github.com/QuestioWo/buddhabrot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuestioWo%2Fbuddhabrot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28964430,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T01:25:30.373Z","status":"online","status_checked_at":"2026-02-01T02:00:08.102Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["buddhabrot","c","c99","cplusplus","cplusplus-11","cpp","cpp11","fractal","fractal-algorithms","fractal-rendering","fractals","gpu","gpu-acceleration","opencl","opencl-kernels","opengl"],"created_at":"2024-09-24T21:05:37.106Z","updated_at":"2026-02-01T02:03:07.002Z","avatar_url":"https://github.com/QuestioWo.png","language":"C++","funding_links":["https://github.com/sponsors/QuestioWo"],"categories":[],"sub_categories":[],"readme":"[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/QuestioWo/buddhabrot.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/QuestioWo/buddhabrot/context:cpp)\n\n## Renders\nRender produced for 2001 x 2001 pixels at 2500 iterations :\n\n![Buddhabrot](https://github.com/QuestioWo/buddhabrot/blob/main/assets/2001x2500.png?raw=true)\n\nThe command that can be used for getting this result is `./build/buddhabrot -o -w 2001 -i 2500 -s 2001x2500 -c 128,0,255`. Computation takes around 3 seconds using the `-o` flag to run the command on the GPU, and around 53 seconds for the command without the flag, so running on the CPU.\n\nThis program also supports [anti-buddhabrot](https://en.wikipedia.org/wiki/Buddhabrot#Nuances) rendering. The below image is using the same 2001x2500 pixels and iterations :\n\n![Anti-buddhabrot](https://github.com/QuestioWo/buddhabrot/blob/main/assets/2001x2500anti.png?raw=true)\n\nThe command that can be used for getting this result is `./build/buddhabrot -o -w 2001 -i 2500 -s 2001x2500anti -a -c 128,0,255`. Computation takes around 6 seconds using the `-o` flag to run the command on the GPU, and around 53 seconds for the command without the flag, so running on the CPU.\n\n## Running\n\n### Prerequisites\n* OpenGL (optional with `-DUSE_OPENGL=OFF` argument for `cmake`)\n* GLUT (optional with `-DUSE_OPENGL=OFF` argument for `cmake`)\n* OpenCV\n* OpenCL\n\n### Building \u0026 Usage\n\n```bash\ngit clone https://github.com/QuestioWo/buddhabrot.git\nmkdir -p buddhabrot/build \u0026\u0026 cd buddhabrot/build\ncmake ..\nmake\ncd ../\n./build/buddhabrot\n```\n\nA OpenGL window titled `Buddhabrot` will appear after the [buddhabrot](https://en.wikipedia.org/wiki/Buddhabrot) has been calculated. Examples of the program running can be found above\n\nExiting the program can be done by pressing `Ctrl + C` in the same terminal window\n\nIf the GPU connected supports double precision, either through the `cl_khr_fp64` or `cl_amd_fp64` additions to the OpenCL install, then using `cmake` with the `-DOPENCL_DOUBLE_PRECISION=ON` argument will enable the use of double precision floating point numbers when running the program with the `-o` argument. If you are unsure of if your GPU supports double precision, use the `clinfo` command, which should detail whether your GPU does or not.\n\n### Iteration Groups\n\nFor running with the `-o` argument, on the GPU, to avoid the GPU hanging, the program runs groups of iterations across all the cells. This is because with larger numbers of pixels and iterations, the computation time to run all iterations maybe too great to not hang the GPU\n\nTo find the maximum value, and thus the most effiecient method of grouping, an equation is employed that was calculated from maximum values obtained from experimentation\n\n![Graph of maximum values](https://github.com/QuestioWo/buddhabrot/blob/main/assets/batch_calculation.png?raw=true)\n\nTo override the value calculated with this equation, namely to run without or with far more lax groupings, the `-m ITERATION_MAX` argument can be used when running the program\n\n### Google Colab\n\nThis project also successfully build and runs on Google Colab, Google's free cloud computing service. An example of this can be found [here](https://colab.research.google.com/drive/1cejpU7ADF30m_PSY2Mdh1M0MBTgHYzyT?usp=sharing) and its results can be found [here](https://drive.google.com/drive/folders/1q31810a88D1tNCGpoFf338rNu6K4gIFS?usp=sharing)\n\n## Gallery\n\nA collection of results of the program that were not quite buddhabrots, but still interesting can be found [here](https://drive.google.com/drive/folders/1y0yev1y6pWNXeVT7l7yXxJzKpcF0Bow-?usp=sharing)\n\n## Author\n\nThis buddhabrot rendering program has been and is being written by [Jim Carty](https://questiowo.github.io). Email: cartyjim1@gmail.com\n\n## License\n\nThis project is licensed under the terms of the MIT license. See `LICENSE.txt` file for the full license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquestiowo%2Fbuddhabrot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquestiowo%2Fbuddhabrot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquestiowo%2Fbuddhabrot/lists"}