Drawing the Mandelbrot Set

Download Report

Transcript Drawing the Mandelbrot Set

Drawing the
Mandelbrot Set
Sep. 19
Dae-Eun Hyun
3D MAP Lab.
1
What is the Mandelbrot Set?
Def. The Mandelbrot Set M is the set
of all complex numbers c that produces
a finite orbit of 0.
Zn  Z
2
n 1
 C , Z 0  0  0i
2
What is the Mandelbrot Set?

The points of the complex plane in two
categories


Points inside the Mandelbrot Set
Points outside the Mandelbrot Set
3
Computing the Mandelbrot Set

How we can decide the convergency?
Set the maximum magnitude of | Zk |
Typically 2
 How many we have to iterate?
Set some upper limit Number on the
maximum number of iterations
Typically 100 ~ 400
4
Computing the Mandelbrot Set
C inside the set
C outside the set
5
Drawing the Mandelbrot Set

Display M on the raster graphics
Set up a correpondence between each pixel on
the display and a value of C, and the iteration
number for that C-value is found.
 Example
Bright yellow to C near outside the set
Dimmer yellow to C farther away from the set
Deep Blue to C have the small iteration Num

6
Drawing the Mandelbrot Set
Color Intensity
Red
Blue
Num
Float v = d/ float Num;
glColor3f(v*v, v*v, v, 0.2);
7
Drawing the Mandelbrot Set

How to associate a pixel with a specific
complex value of C

Image : the Number of Rows
the Number of Columns
8
Drawing the Mandelbrot Set

Pseudocode for Drawing
for( j = 0; j < rows; j++)
for( i = 0; i < cols; I++)
{
find the correspondence c-value for Pixel (i,j);
estimate the iteration Number of the orbit;
find Color determined the iteration Number;
setPixel(j, i, Color);
}
9