Skip to content

stickykeys99/mandelbrot-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mandelbrot-py

python (3.10.8)
taichi (1.1.3)
numpy (1.23.4)

Made in Python using Taichi.

Uses your GPU unless it cannot find a suitable backend, then it will resort to using your CPU cores. The supported backends are CUDA, Vulkan, OpenGL, Metal, and DirectX 11.

Tested at 1920 x 1020 resolution. Please note that this resolution is not dynamic, so you would have to manually edit this yourself for different screen sizes. (It's just a value pair, the rest of the work is done for you.)

Running

First, install the necessary Python packages. You can do this by running the following command in your terminal:

py -m pip install -r requirements.txt

Then, run the following command in your terminal:

py main.py

If py does not work, try python or the directory link to your Python executable if the Python folder is not added to PATH.

Controls

z - zoom out, x - zoom in
c - decrease focus, v - increase
arrow keys to move
r to set back defaults (go back to default view)
e to toggle color interpolation
1, 2 - switch between the available palettes
s to take a screenshot

Note that zooming increases/decreases focus by a fixed small value. You would not normally have to increase/decrease focus yourself as this is automatically scaled in proportion.

After a certain max threshold, focus will no longer be automatically increased to conserve performance. You can override this using the corresponding button.

Screenshots

scrnshot.png

scrnshot2.png

scrnshot3.png

scrnshot4.png

scrnshot5.png

scrnshot6.png

Palettes

SLSO8 by Luis Miguel Maldonado
https://lospec.com/palette-list/slso8

Apollo by Adam C Younis
https://lospec.com/palette-list/apollo

Releases

No releases published

Packages

No packages published

Languages