mandelbrot: Mandelbrot convergence counts

View source: R/mandelbrot.R

mandelbrotR Documentation

Mandelbrot convergence counts

Description

Mandelbrot convergence counts

Usage

mandelbrot(...)

## S3 method for class 'matrix'
mandelbrot(Z, maxIter = 200L, tau = 2, ...)

## S3 method for class 'numeric'
mandelbrot(
  xmid = -0.75,
  ymid = 0,
  side = 3,
  resolution = 400L,
  maxIter = 200L,
  tau = 2,
  ...
)

Arguments

Z

A complex matrix for which convergence counts should be calculated.

maxIter

Maximum number of iterations per bin.

tau

A threshold; the radius when calling divergence (Mod(z) > tau).

xmid, ymid, side, resolution

Alternative specification of the complex plane Z, where mean(Re(Z)) == xmid, mean(Im(Z)) == ymid, diff(range(Re(Z))) == side, diff(range(Im(Z))) == side, and dim(Z) == c(resolution, resolution).

Value

Returns an integer matrix (of class Mandelbrot) with non-negative counts.

Author(s)

The internal Mandelbrot algorithm was inspired by and adopted from similar GPL code of Martin Maechler available from ftp://stat.ethz.ch/U/maechler/R/ on 2005-02-18 (sic!).

Examples

counts <- mandelbrot(xmid = -0.75, ymid = 0, side = 3)
str(counts)
## Not run: 
plot(counts)

## End(Not run)

## Not run: 
demo("mandelbrot", package = "future", ask = FALSE)

## End(Not run)


HenrikBengtsson/future documentation built on Nov. 20, 2024, 10:53 a.m.