MandelImage: Mandelbrot Set Generator in a Square Domain

View source: R/MandelImage.R

MandelImageR Documentation

Mandelbrot Set Generator in a Square Domain

Description

'MandelImage' returns two dimensional array representing escape values from on the square region in complex plane. Escape values (which measures the number of iteration before the lenght of the complex value reaches to 2.)

Usage

MandelImage(imageN, centre, L)

Arguments

imageN

Number of pixels to equally space division of one side if the square region.

centre

A complex number that determines the centre of the square region.

L

A side length of the square region on the complex plane.

Details

Mandelbrot set is defined as the set of initial complex values where the z = z^2 +z_0 does not diverge to infinity. Initial value for the map is taken to be zero and z_0 is the complex coordinate.

Value

Returns a matrix.

Note

Returns a matrix

Author(s)

Mehmet Suzen <mehmet.suzen@physics.org>

References

The Fractal Geometry of Nature, Benoit B. Mandelbrot, W.H.Freeman & Co Ltd (18 Nov 1982)

See Also

JuliaImage

Examples

# png image 
  imageN <- 5; # increase this to see image
  centre <- 0.0
  L <- 4.0
  image<-MandelImage(imageN,centre,L);
  #file <- "mandelbrot1.png"
  # writePNG(image,file); # possible visualisation
# Closer lookup to set
  imageN <- 5;
  centre <- -0.5
  L <- 2.0
  image<-MandelImage(imageN,centre,L);
  # file <- "mandelbrot.png"
  #writePNG(image,file); # possible visualisation

Julia documentation built on Aug. 27, 2023, 5:07 p.m.