Project: Mandelbrot Set Dr. David Koslicki Math 399 Fall 2014 September 29, 2014 1 Introduction For this project, I used Matlab [1] to create code that would draw Mandelbrot sets. 1.1 Part 1: Code The Mandelbrot set is defined as the set of complex numbers {z 0 } such that the sequence {z k } k≥0 stays bounded for k =0, 1,... for z k+1 = z 2 k + z 0 . To implement this, I defined a Matlab function Mandelbrot(xlim,ylim, maxIterations, gridSize) that will return a square matrix A with dimensions gridSize where the entry A i,j gives the number of iterations of the recursion z k+1 = z 2 k + z 0 required before |z k | > 1. The code for this function is copied below in its entirety: 1
7
Embed
Project: Mandelbrot Set - Oregon State Universitymath.oregonstate.edu/~koslickd/MandelbrotExampleSolution.pdf · Project: Mandelbrot Set Dr. David Koslicki Math 399 Fall 2014 September
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Project: Mandelbrot Set
Dr. David KoslickiMath 399Fall 2014
September 29, 2014
1 Introduction
For this project, I used Matlab [1] to create code that would draw Mandelbrotsets.
1.1 Part 1: Code
The Mandelbrot set is defined as the set of complex numbers {z0} such thatthe sequence {zk}k≥0 stays bounded for k = 0, 1, . . . for zk+1 = z2k + z0. Toimplement this, I defined a Matlab function
Mandelbrot(xlim,ylim, maxIterations, gridSize)
that will return a square matrix A with dimensions gridSize where the entryAi,j gives the number of iterations of the recursion zk+1 = z2k + z0 requiredbefore |zk| > 1. The code for this function is copied below in its entirety: