更改

跳到导航 跳到搜索
无编辑摘要
第301行: 第301行:  
:<math> z \mapsto (|\Re \left(z\right)|+i|\Im \left(z\right)|)^2 + c.</math>
 
:<math> z \mapsto (|\Re \left(z\right)|+i|\Im \left(z\right)|)^2 + c.</math>
   −
==Computer drawings==
  −
{{Main|Plotting algorithms for the Mandelbrot set}}
  −
[[File:Fractal-zoom-1-03-Mandelbrot Buzzsaw.png|right|thumbnail|Still image of [//upload.wikimedia.org/wikipedia/commons/0/07/Fractal-zoom-1-03-Mandelbrot_Buzzsaw.ogv a movie of increasing magnification] on 0.001643721971153 − 0.822467633298876''i'']]
  −
[[File:Mandelbrot sequence new still.png|right|thumbnail|Still image of [//upload.wikimedia.org/wikipedia/commons/5/51/Mandelbrot_sequence_new.webm an animation of increasing magnification]]]
  −
<!-- There are many programs and algorithms used to generate the Mandelbrot set and other fractals, some of which are described in [[fractal-generating software]]. These programs use a variety of algorithms to determine the color of individual pixels and achieve efficient computation. -->
  −
There exist a multitude of various algorithms for plotting the Mandelbrot set via a computing device. Here, the most widely used and simplest algorithm will be demonstrated, namely, the naïve "escape time algorithm".<!-- One of the simplest algorithms used to plot the Mandelbrot set on a computer is called the "escape time algorithm". --><!--[[Spatial anti-aliasing]] links directly here.-->
  −
In the escape time algorithm, a repeating calculation is performed for each ''x'', ''y'' point in the plot area and based on the behavior of that calculation, a color is chosen for that pixel.
  −
  −
The ''x'' and ''y'' locations of each point are used as starting values in a repeating, or iterating calculation (described in detail below). The result of each iteration is used as the starting values for the next. The values are checked during each iteration to see whether they have reached a critical "escape" condition, or "bailout". If that condition is reached, the calculation is stopped, the pixel is drawn, and the next ''x'', ''y'' point is examined.
  −
  −
The color of each point represents how quickly the values reached the escape point. Often black is used to show values that fail to escape before the iteration limit, and gradually brighter colors are used for points that escape. This gives a visual representation of how many cycles were required before reaching the escape condition.
  −
  −
To render such an image, the region of the complex plane we are considering is subdivided into a certain number of [[pixel]]s. To color any such pixel, let <math>c</math> be the midpoint of that pixel. We now iterate the critical point 0 under <math>P_c</math>, checking at each step whether the orbit point has modulus larger than 2. When this is the case, we know that <math>c</math> does not belong to the Mandelbrot set, and we color our pixel according to the number of iterations used to find out. Otherwise, we keep iterating up to a fixed number of steps, after which we decide that our parameter is "probably" in the Mandelbrot set, or at least very close to it, and color the pixel black.
  −
  −
In [[pseudocode]], this algorithm would look as follows. The algorithm does not use complex numbers and manually simulates complex-number operations using two real numbers, for those who do not have a [[complex data type]]. The program may be simplified if the programming language includes complex-data-type operations.
  −
  −
<!-- NOTE that xtemp is necessary, otherwise y would be calculated with the new x, which would be wrong. Also note that one must plot (''x''<sub>0</sub>,&nbsp;''y''<sub>0</sub>), not (''x'',''y''). -->
  −
'''for each''' pixel (Px, Py) on the screen '''do'''
  −
    x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1))
  −
    y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1))
  −
    x := 0.0
  −
    y := 0.0
  −
    iteration := 0
  −
    max_iteration := 1000
  −
    '''while''' (x×x + y×y ≤ 2×2 AND iteration < max_iteration) '''do'''
  −
        xtemp := x×x - y×y + x0
  −
        y := 2×x×y + y0
  −
        x := xtemp
  −
        iteration := iteration + 1
  −
 
  −
    color := palette[iteration]
  −
    plot(Px, Py, color)
  −
  −
Here, relating the pseudocode to <math>c</math>, <math>z</math> and <math>P_c</math>:
  −
* <math>z = x + iy\ </math>
  −
* <math>z^2 = x^2 +i2xy - y^2\ </math>
  −
* <math>c = x_0 + i y_0\ </math>
  −
and so, as can be seen in the pseudocode in the computation of ''x'' and ''y'':
  −
* <math>x = \mathop{\mathrm{Re}}(z^2+c) = x^2-y^2 + x_0</math> and <math>y = \mathop{\mathrm{Im}}(z^2+c) = 2xy + y_0.\ </math>
  −
  −
To get colorful images of the set, the assignment of a color to each value of the number of executed iterations can be made using one of a variety of functions (linear, exponential, etc.).
  −
  −
==References in popular culture==
  −
The Mandelbrot set is considered by many the most popular fractal,<ref>Mandelbaum, Ryan F. (2018). [https://gizmodo.com/this-trippy-music-video-is-made-of-3d-fractals-1822168809 "This Trippy Music Video Is Made of 3D Fractals."] Retrieved 17 January 2019</ref><ref>Moeller, Olga de. (2018).[https://thewest.com.au/lifestyle/kids/what-are-fractals-ng-b88838072z "what are Fratals?"] Retrieved 17 January 2019.</ref> and has been referenced several times in popular culture.
  −
* The [[Jonathan Coulton]] song "Mandelbrot Set" is a tribute to both the fractal itself and to its discoverer Benoit Mandelbrot.<ref name="JoCopedia">{{cite web|title=Mandelbrot Set|url=http://www.jonathancoulton.com/wiki/Mandelbrot_Set|website=JoCopeda|accessdate=15 January 2015}}</ref>
  −
* The second book of the ''[[Mode series]]'' by [[Piers Anthony]], ''Fractal Mode'', describes a world that is a perfect 3D model of the set.<ref name="Anthony1992">{{cite book|author=Piers Anthony|title=Fractal Mode|url=https://books.google.com/books?id=XdUyAAAACAAJ|year=1992|publisher=HarperCollins|isbn=978-0-246-13902-3}}</ref>
  −
* The [[Arthur C. Clarke]] novel ''[[The Ghost from the Grand Banks]]'' features an artificial lake made to replicate the shape of the Mandelbrot set.<ref name="Clarke2011">{{cite book|author=Arthur C. Clarke|title=The Ghost From The Grand Banks|url=https://books.google.com/books?id=6ELsYigmXNoC|date=29 September 2011|publisher=Orion|isbn=978-0-575-12179-9}}</ref>
  −
  −
==See also==
  −
  −
* [[Buddhabrot]]
  −
* [[Collatz fractal]]
  −
* [[Fractint]]
  −
* [[Gilbreath permutation]]
  −
* [[Mandelbox]]
  −
* [[Mandelbulb]]
  −
* [[Menger Sponge]]
  −
* [[Newton fractal]]
  −
* [[Orbit portrait]]
  −
* [[Orbit trap]]
  −
* [[Pickover stalk]]
  −
  −
==References==
  −
{{Reflist|30em}}
  −
  −
==Further reading==
  −
* [[John W. Milnor]], ''Dynamics in One Complex Variable'' (Third Edition), Annals of Mathematics Studies 160, (Princeton University Press, 2006), {{isbn|0-691-12488-4}} <br />(First appeared in 1990 as a [https://web.archive.org/web/20060424085751/http://www.math.sunysb.edu/preprints.html Stony Brook IMS Preprint], available as [http://www.arxiv.org/abs/math.DS/9201272 arXiV:math.DS/9201272] )
  −
* Nigel Lesmoir-Gordon, ''The Colours of Infinity: The Beauty, The Power and the Sense of Fractals'', {{isbn|1-904555-05-5}} <br />(includes a DVD featuring [[Arthur C. Clarke]] and [[David Gilmour]])
  −
* [[Heinz-Otto Peitgen]], [[Hartmut Jürgens]], [[Dietmar Saupe]], ''Chaos and Fractals: New Frontiers of Science'' (Springer, New York, 1992, 2004), {{isbn|0-387-20229-3}}
  −
  −
==External links==
  −
{{Wikibooks|Fractals }}
  −
{{commons}}
  −
<!--===========================({{NoMoreLinks}})===============================-->
  −
<!--| DO NOT ADD MORE LINKS TO THIS ARTICLE. WIKIPEDIA IS NOT A COLLECTION OF |-->
  −
<!--| LINKS. If you think that your link might be useful, do not add it here, |-->
  −
<!--| but put it on this article's discussion page first or submit your link  |-->
  −
<!--| to the appropriate category at the Open Directory Project (www.dmoz.org)|-->
  −
<!--| and link back to that category using the {{dmoz}} template.            |-->
  −
<!--|                                                                        |-->
  −
<!--|          Links that have not been verified WILL BE DELETED.            |-->
  −
<!--|  See [[Wikipedia:External links]] and [[Wikipedia:Spam]] for details    |-->
  −
<!--===========================({{NoMoreLinks}})===============================-->
  −
* {{Curlie|Science/Math/Chaos_and_Fractals|Chaos and Fractals}}
  −
* [http://classes.yale.edu/Fractals/MandelSet/welcome.html The Mandelbrot Set and Julia Sets by Michael Frame, Benoit Mandelbrot, and Nial Neger]
  −
* [http://vimeo.com/12185093 Video: Mandelbrot fractal zoom to 6.066 e228]
  −
* [https://www.youtube.com/watch?v=NGMRB4O922I Relatively simple explanation of the mathematical process, by [[Holly Krieger|Dr Holly Krieger]], MIT]
  −
* [https://mandelbrot-svelte.netlify.com Mandelbrot set images online rendering]
  −
* [https://www.rosettacode.org/wiki/Mandelbrot_set Various algorithms for calculating the Mandelbrot set] (on [[Rosetta Code]])
  −
* [https://github.com/pkulchenko/ZeroBraneEduPack/blob/master/fractal-samples/zplane.lua Fractal calculator written in Lua by Deyan Dobromiroiv, Sofia, Bulgaria]
      
{{Fractal software}}
 
{{Fractal software}}
311

个编辑

导航菜单