NathanPaceydev / Mandelbrot_and_Julia_sets

Solving the complex recursive algorithms for a Mandelbrot and Julia Set and plotting them.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Solving and Analyzing Mandelbrot and Julia sets

Solving the complex recursive algorithms for a Mandelbrot and Julia Set and plotting them.

image

image

This code experiment involves creating and visualizing a modified version of the Mandelbrot set, a well-known mathematical object in the field of complex dynamics. The set is generated using a recursive algorithm of the form $$z = e^z + c$$, where c is a complex number and z starts at 0. The code defines a function, modified_mandelbrot_set(), which takes in a complex number c and returns 1 if the value of z exceeds a threshold A after a certain number of iterations (set to 100 by default). The code also defines a function, modified_mandelbrot_call(), which generates a set of random complex numbers c and calls the modified_mandelbrot_set() function on each of them. The function then plots either a scatter plot or a density plot of the complex numbers for which modified_mandelbrot_set() returns 1. The code also includes a function, using_mpl_scatter_density(), which adds a color gradient to the density plot using the mpl_scatter_density library and the LinearSegmentedColormap class from matplotlib. The code uses the numpy and matplotlib libraries to perform calculations and create the plots.

About

Solving the complex recursive algorithms for a Mandelbrot and Julia Set and plotting them.


Languages

Language:Jupyter Notebook 100.0%