{"id":15779402,"url":"https://github.com/southendmusic/-numbashader","last_synced_at":"2025-03-31T15:53:08.558Z","repository":{"id":206864752,"uuid":"584902741","full_name":"SouthEndMusic/-NumbaShader","owner":"SouthEndMusic","description":"An implementation of shaders using Numba for CUDA GPUs.","archived":false,"fork":false,"pushed_at":"2023-01-04T18:45:19.000Z","size":5095,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-05T18:05:16.706Z","etag":null,"topics":["gameoflife","mandelbrot-set","mandelbulb","numba","opencv-python","raymarching","shaders"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/SouthEndMusic.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,"governance":null}},"created_at":"2023-01-03T20:14:54.000Z","updated_at":"2024-09-10T15:28:49.000Z","dependencies_parsed_at":"2023-11-12T21:44:15.557Z","dependency_job_id":null,"html_url":"https://github.com/SouthEndMusic/-NumbaShader","commit_stats":null,"previous_names":["southendmusic/-numbashader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SouthEndMusic%2F-NumbaShader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SouthEndMusic%2F-NumbaShader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SouthEndMusic%2F-NumbaShader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SouthEndMusic%2F-NumbaShader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SouthEndMusic","download_url":"https://codeload.github.com/SouthEndMusic/-NumbaShader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246491971,"owners_count":20786290,"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":["gameoflife","mandelbrot-set","mandelbulb","numba","opencv-python","raymarching","shaders"],"created_at":"2024-10-04T18:05:31.068Z","updated_at":"2025-03-31T15:53:08.528Z","avatar_url":"https://github.com/SouthEndMusic.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NumbaShader\n\n## About\n\nThis repository contains an implementation of [shaders](https://en.wikipedia.org/wiki/Shader) using [Numba for CUDA GPUs](https://numba.pydata.org/numba-doc/latest/cuda/index.html). The 3D shaders use the concept of [ray marching](https://en.wikipedia.org/wiki/Ray_marching).\n\nThis is simply a hobby project, I make no claims about the robustness or efficiency of this code.\n\n\n## Examples\n\n__Examples of animations__\n- [Reflecting and refracting sphere in Menger sponge](https://www.instagram.com/p/Cjvhu3dAv3z/)\n- [Game of life in 3D with depth of field](https://www.instagram.com/p/CkBEltjgbAo/)\n- [Mandelbrot bulb](https://www.instagram.com/p/CjcqTozMmcz/)\n- [N body chaos](https://www.instagram.com/p/CknVHILAUXi/)\n\n__Example stills__\n\n\u003cimg src=\"https://user-images.githubusercontent.com/74617371/210435306-26c36c2c-5fda-46df-89d1-1922246bc1ac.png\" width=250 height=250\u003e \u003cimg src=\"https://user-images.githubusercontent.com/74617371/210582221-d73e9965-9d0b-4ab6-8126-d92937bf4100.png\" width=250 height=250\u003e \u003cimg src=\"https://user-images.githubusercontent.com/74617371/210626449-43c7d56f-5477-4b9a-91b5-0b5a72ce8435.png\" width=250 height=250\u003e\n\n\n## Contents\n\nThe folder `NumbaShader3D` contains:\n- The script `shader_example_general.py` which gives a short introduction on how a shader could be constructed using `numba.cuda`,\n- The script `Shader_setupy.py` which contains classes for a 3D camera model and viewing the shader output interactively with OpenCV,\n- The script `Shader_tools.py` which contains functions for computing the path of a ray trough a scene, based on intersections, reflections and refractions, as well as a simple method for creating depth of field.\n\nthe folder `Fractals_on_text` contains:\n- The script `Poisson_2D.py` for numerically solving the Poisson equation with either homogeneous Neumann or homogeneous Dirichlet boundary conditions,\n- several attempts at wrapping sections of the Mandelbrot set around letters in the notebooks `Text_to_fractal.ipynb` and `Text_to_fractal_2.ipynb`.\n\nThe main folder contains some more examples of 3D shaders:\n- The script `Cube_grid.py` contains an implementation for intersecting rays with a grid of cubes defined by 3D boolean array. Furthermore there are functions to define the Menger sponge or some text in the form of such a cube grid,\n- The script `Game_of_life_3D.py` also uses the cube grid implementation, but applies to the cube grid a 3D version of the [Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) algorithm to create animations as seen in the second animation linked to below,\n- The script `Menger_sponge.py` implements the first animation linked to below with a sphere in the Menger sponge,\n- The script `Menger_sponge.py` uses the 3D shader to visualize the [Mandelbulb](https://en.wikipedia.org/wiki/Mandelbulb), see the third animation linked to below,\n- The script `N_body_fractal.py` implements a shader to visualise the chaos arising from the [N body problem](https://en.wikipedia.org/wiki/N-body_problem), see the last animation linked to below.\n\n\nLastly the script `Makevid.py` contains a simple function to show and save animations as video files using OpenCV.\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsouthendmusic%2F-numbashader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsouthendmusic%2F-numbashader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsouthendmusic%2F-numbashader/lists"}