Question: Use python to code the following problem: The Mandelbrot set is an example of a fractal: an object that contains a structure within a structure,

Use python to code the following problem:

Use python to code the following problem: The Mandelbrot set is an

The Mandelbrot set is an example of a fractal: an object that contains a structure within a structure, iteratively as far as we care to look. Consider the following iterative equation (all variables represent complex numbers): The Mandelbrot set considers a complex number c and sets zo-0. The above equation is applied iteratively until is above 2 or until z has been updated many times (to,00 , say). If is not found to ever exceed 2, then the point c is in the Mandelbrot set; if it does exceed 2, it is not in the Mandelbrot set. 1. Consider a complex number in the form c-x+iy. Consider a100x100 grid of points on the complex plane constrained by -2sxs2 and-2sys2 2. For each value of c on this grid, determine the number of iterations required for ll to exceed 2. If does not exceed 2, record the maximum number of iterations considered instead. Record these values on a 100x100 NumPy array 3. Save the array formed in step 2 to file. Then comment out the analysis code and instead load your results from file. (This speeds things up as you play around in the following step!) Plot the array constructed in step 2 using: 4. plt.imshow( , cmap-). Try different color maps until you find one The Mandelbrot set is an example of a fractal: an object that contains a structure within a structure, iteratively as far as we care to look. Consider the following iterative equation (all variables represent complex numbers): The Mandelbrot set considers a complex number c and sets zo-0. The above equation is applied iteratively until is above 2 or until z has been updated many times (to,00 , say). If is not found to ever exceed 2, then the point c is in the Mandelbrot set; if it does exceed 2, it is not in the Mandelbrot set. 1. Consider a complex number in the form c-x+iy. Consider a100x100 grid of points on the complex plane constrained by -2sxs2 and-2sys2 2. For each value of c on this grid, determine the number of iterations required for ll to exceed 2. If does not exceed 2, record the maximum number of iterations considered instead. Record these values on a 100x100 NumPy array 3. Save the array formed in step 2 to file. Then comment out the analysis code and instead load your results from file. (This speeds things up as you play around in the following step!) Plot the array constructed in step 2 using: 4. plt.imshow( , cmap-). Try different color maps until you find one

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!