Generates a view on the Mandelbrot set using an underlying C function.
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)
xlim | limits of x axis (real part) |
---|---|
ylim | limits of y axis (imaginary part) |
resolution | either an integer \(n\) for \(n^2\) pixels
or a list with x and y components specifying the resolution
in each direction (e.g. |
iterations | maximum number of iterations to evaluate each case |
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\)
mandelbrot0
is an experimental interface
for generating tidy data.frames faster than
as.data.frame(mandelbrot())
.
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.
Wraps original C code by Mario dos Reis, September 2003.
https://stat.ethz.ch/pipermail/r-help/2003-October/039773.html http://people.cryst.bbk.ac.uk/~fdosr01/Rfractals/index.html