In this webinar, Rodrigo will be drawing a well-known fractal, the Mandelbrot set. We will start with an interesting, but naive, one-liner, and identify some of its inconveniences. We then fix these inconveniences by writing a more optimised tradfn and we use that implementation to generate a proper rendering of the Mandelbrot set that we then save as an image.
Useful links from the webinar:
Jupyter notebook on the Mandelbrot set – https://github.com/Dyalog/dyalog-jupy...
Brian Becker’s post on Mandelbrot + isolates – https://www.dyalog.com/blog/2014/08/i...
Nicolas Delcros’s “Making images and videos of the Buddhabrot” article in Vector (with Png namespace) – https://vector.org.uk/making-images-a...
Webinar’s code as a namespace – https://github.com/RojerGS/fractals/t...
Start: (0:00)
Intro: (0:53)
The complex plane: (2:10)
The Mandelbrot set: (3:54)
Determining if a number is in the set: (5:17)
Taking a sip of water: (8:28)
Sampling the complex plane: (9:28)
Sample an axis: (10:20)
Create a grid of complex numbers: (11:08)
Rescale and translate the grid: (13:00)
Iterative function applied to the grid: (15:40)
Boolean mask approximating the Mandelbrot set: (17:14)
First pictorial representation of the set: (18:40)
Improving the pictorial representation: (21:04)
Computing the escape time: (23:10)
Nicer character-based Mandelbrot set: (24:10)
Refine the approximation: (24:58)
Ignore numbers that already escaped: (25:51)
Really nice character-based Mandelbrot set: (27:29)
Implement function to create generic grid: (30:10)
Implement the Mandelbrot function: (35:37)
Creating greyscale gradient to colour the set: (41:02)
How to create PNG images: (44:50)
Greyscale Mandelbrot set: (46:56)
Colour palette: (48:15)
Coloured Mandelbrot set: (50:10)
Remarks & zooming-in: (51:20)
Code recap: (53:20)
Useful links: (55:50)
Awkward wait for questions: (57:50)
--------------------
GET STARTED
Download the latest version of Dyalog:
https://www.dyalog.com/downloads
TAKE PART IN OUR APL COMPETITIONS
THE APL CHALLENGE
Learn APL and compete for one of three $100 prizes. Open to all experience levels.
https://challenge.dyalog.com
THE APL FORGE
Got a problem to solve or a library to share?
Use Dyalog APL to build something great — and win £2,500 + an expenses-paid trip to present at a Dyalog user meeting.
https://forge.dyalog.com
--------------------