How is the Mandelbrot set plotted and how are the color values determined?

Click For Summary

Discussion Overview

The discussion focuses on the plotting of the Mandelbrot set, including the determination of color values and the definition of axes in the complex plane. It encompasses technical explanations, programming approaches, and conceptual clarifications related to the visualization of this mathematical set.

Discussion Character

  • Technical explanation
  • Exploratory
  • Mathematical reasoning

Main Points Raised

  • One participant questions how the Mandelbrot set is plotted and how color values are determined, mentioning uncertainty about the coloring scheme for points in the set.
  • Another participant shares a Java program they created to generate images of the Mandelbrot set, providing a link to the source code.
  • A participant explains that each point on the screen corresponds to a point in the complex plane, with the Mandelbrot set defined by a specific iterative process involving complex numbers.
  • It is noted that points that take longer to diverge are colored brighter, suggesting a gradient based on the number of iterations before divergence.
  • One participant outlines the essential components of a Mandelbrot set program, detailing the iterative arithmetic process and how points are classified based on their behavior during iteration.
  • The discussion includes the idea that points not in the Mandelbrot set can be colored using gradations based on the number of iterations, with specific color assignments proposed for different iteration counts.

Areas of Agreement / Disagreement

Participants present various methods and interpretations regarding the plotting and coloring of the Mandelbrot set, indicating that multiple competing views remain on how to implement these concepts effectively.

Contextual Notes

Some participants express uncertainty about the initial coloring scheme and the definitions of axes in the complex plane, which may depend on specific implementations or interpretations.

Who May Find This Useful

This discussion may be useful for individuals interested in computer programming, mathematical visualization, and the properties of fractals, particularly those looking to understand or create representations of the Mandelbrot set.

rohanprabhu
Messages
410
Reaction score
2
I found this image on wikipedia: http://en.wikipedia.org/wiki/Image:Mandel_zoom_00_mandelbrot_set.jpg

and i have seen this image like many times, but i have never understood as to how it is plotted. How is the value of the color decided? Plus, if it is a complex plane, how are the axes defined? I remember reading that if a point lies in the complex set which is being plotted, it is given the color white, otherwise it is plotted as black [or vice versa, not sure]. Either ways, how are the other color values decided?
 
Physics news on Phys.org
I made a little java program that generates pictures like that one so I could make them for my desktop. The source code is bundled with it. Here is the link:

http://dl.getdropbox.com/u/120094/Chaos%20Program%20and%20Source.jar
 
Last edited by a moderator:
You interpret each point on the plane (your monitor screen) as a point (x,y) in the complex plane: x+ iy. The Mandelbrot set is defined as the set of points (x,y) such that the sequence z0= 0, zm+1= z2+ x+ iy. You run that iteration long enough to see if it converges or not (if |zn|> 2, it diverges). Color the point (x,y) black if it converges, white if not. Most "Mandelbrot" set pictures look at how many iterations it take to make |zn|> 2 and color according to that. Those points are NOT in the Mandelbrot set but close to it and it makes a prettier picture!
 
the longer it takes for a point to diverge the brighter it's colored
 
A Mandelbrot set program needs just a few essential pieces. The main engine is a loop of instructions that takes its starting complex number and applies the arithmetical rule to it. For the Mandelbrot set, the rule is this: zz2+ c, where z begins at zero and c is the complex number corresponding to the point being tested. So, take 0, multiply it by itself, and add the starting number; take the result—the starting number—multiply it by itself, and add the starting number; take the new result, multiply it by itself, and add the starting number. Arithmetic with complex numbers is straightforward. A complex number is written with two parts: for example, 2 + 3i (the address for the point at 2 east and 3 north on the complex plane). To add a pair of complex numbers, you just add the real parts to get a new real part and the imaginary parts to get a new imaginary part: 2 + 4i
+ 9 – 2i
11 + 2i
To multiply two complex numbers, you multiply each part of one number by each part of the other and add the four results together. Because i multiplied by itself equals –1, by the original definition of imaginary numbers, one term of the result collapses into another. 2 + 3i
 2 + 3i
6i + 9i2
4 + 6i
4 + 12i + 9i2
= 4 + 12i – 9
= – 5 + 12i
To break out of this loop, the program needs to watch the running total. If the total heads off to infinity, moving farther and farther from the center of the plane, the original point does not belong to the set, and if the running total becomes greater than 2 or smaller than –2 in either its real or imaginary part, it is surely heading off to infinity—the program can move on. But if the program repeats the calculation many times without becoming greater than 2, then the point is part of the set. How many times depends on the amount of magnification. For the scales accessible to a personal computer, 100 or 200 is often plenty, and 1000 is safe.

The program must repeat this process for each of thousands of points on a grid, with a scale that can be adjusted for greater magnification. And the program must display its result. Points in the set can be coloured black, other points white. Or for a more vividly appealing picture, the white points can be replaced by coloured gradations. If the iteration breaks off after ten repetitions, for example, a program might plot a red dot; for twenty repetitions an orange dot; for forty repetitions a yellow dot, and so on. The choice of colours and cutoff points can be adjusted to suit the programmer’s taste. The colours reveal the contours of the terrain just outside the set proper.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
8
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
7
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K