Skip to content

Python/OpenCL program to render the mandelbrot set

Notifications You must be signed in to change notification settings

DylanJones/mandelbrot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mandelbrot Set Renderer

screenshot 1

Background

This is a Python program I wrote a while ago to render the Mandelbrot set. I started it in early 2017 and have improved it quite a bit since then, rewriting the code multiple times to make it a bit better.
The main feature of this is that it uses OpenCL to compute the pixel values, meaning that it is able to run on the GPU. This brings a huge speedup over the CPU, and also meant that I was able to learn how OpenCL works.

Usage

The current version of the program requires a working installation of OpenCL, pyopencl and OpenCV's Python 3 bindings. To run the program, run python mandelbrot.py and then use the keyboard to control the view.
Keybindings:\

  • w a s d to move the view up, left, down, and right respectively
  • Up/Down arrows to increase/decrease the number of iterations
  • f to switch between 32 bit and 64 bit arithmetic
  • Page Up/Page Down to zoom in/out

Screenshots

screenshot 2 screenshot 3 screenshot 4

About

Python/OpenCL program to render the mandelbrot set

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published