mandelbrot {mandelbrot} | R Documentation |
Calculate the Mandelbrot set
Description
Generates a view on the Mandelbrot set using an underlying C function.
Usage
mandelbrot(xlim = c(-2, 2), ylim = c(-2, 2), resolution = 600,
iterations = 50)
mandelbrot0(xlim = c(-2, 2), ylim = c(-2, 2), resolution = 600,
iterations = 50)
Arguments
xlim |
limits of x axis (real part) |
ylim |
limits of y axis (imaginary part) |
resolution |
either an integer |
iterations |
maximum number of iterations to evaluate each case |
Details
mandelbrot0
is an experimental interface
for generating tidy data.frames faster than
as.data.frame(mandelbrot())
.
Value
a mandelbrot
structure with components: x
a vector
of the real parts of the x-axis; y
the imaginary parts of each
number (the y-axis); z
a matrix of the number of iterations that
|z|<2
Mandelbrot set
In brief, the Mandelbrot set contains the complex numbers
where the 0 orbit of the following function remains
bounded (<2
):
f_{z+1} = z^2 + c
For information and discussion on the Mandelbrot and related sets, one great resource is plus.maths.org. There's also a popular YouTube video by Numberphile.
Credits
Wraps original C code by Mario dos Reis, September 2003.
References
https://stat.ethz.ch/pipermail/r-help/2003-October/039773.html http://people.cryst.bbk.ac.uk/~fdosr01/Rfractals/index.html