项目作者: msuzen

项目描述 :
Julia: Fractal Image Data Generator
高级语言: R
项目地址: git://github.com/msuzen/Julia.git
创建时间: 2015-04-07T07:44:59Z
项目社区:https://github.com/msuzen/Julia

开源协议:

下载


CRAN Version
Total RStudio Cloud Downloads
RStudio Cloud Downloads
License

Julia

Julia: Fractal Image Data Generator

The package aim at generating Julia and Mandelbrot sets with given initial conditions and resolution using
an escape time algorithm. A resulting data matrix is represents escape times at each matrix entry.

Julia Set

Julia set data can be generated with the JuliaImage function.
An example case,

  1. imageN <- 2000
  2. centre <- 0.0
  3. L <- 4.0
  4. C <- -0.8 + 0.156i
  5. image_matrix <- JuliaImage(imageN, centre, L, C)

A sample visualisation with R’s hcl palette Roma as set values on
a grid given as a matrix.

  1. par(mar=c(0, 0, 0, 0))
  2. image(image_matrix[550:1450, 200:1800],
  3. col=hcl.colors(2000, palette="Roma"),
  4. axes=FALSE, useRaster=TRUE)

Mandelbrot set

Mandelbrot set data can be generated with MandelImage function.

An example to generate the data:

  1. imageN <- 2000;
  2. centre <- 0.0
  3. L <- 4.0
  4. image_matrix <- MandelImage(imageN, centre, L);

A sample visualisation with R’s hcl palette Roma as set values on
a grid given as a matrix.

  1. par(mar=c(0, 0, 0, 0))
  2. image(image_matrix[350:1600, 1:1250],
  3. col=hcl.colors(2000, palette="Roma"),
  4. axes=FALSE, useRaster=TRUE)

And an other zooming

  1. par(mar=c(0, 0, 0, 0))
  2. image(image_matrix[800:1200, 200:600],
  3. col=hcl.colors(2000, palette="Roma"),
  4. axes=FALSE, useRaster=TRUE)

Acknowledgements

Author is grateful to Ranjan Maitra for his suggestions on reviving the package.