Marinka Zitnik

Fusing bits and DNA

  • Increase font size
  • Default font size
  • Decrease font size

Mandelbrot Set & R Language

I've been following a course on Statistical Aspects of Data Mining lately, which is not what I will write about, but this article got inspiration from it. The software environment being used in this course is the R programming language, which is used for statistical computing and graphics (it is available for Windows, Linux and Mac as part of the GNU project). If you download it from R's website, you get it with the command line interpreter, of course there are some IDEs as well, such as Rcmdr or Tinn-R. The capabilities of R are extended with numerous user-submitted packages - for the animation of the Mandelbrot Set at least the following libraries are needed: spam, fields, bitops, caTools - all are freely available at R's website. The R is influenced by S and Scheme, but I'wont go into details, as there is plenty information about it on the web.

I tried to draw the classic Mandelbrot Set (the basic code for it is available here), which is just iterating through the formula, z=z^2+c, where c is a complex parameter, starting at z=0 . The Mandelbrot Set is defined as set of all points, such that the sequence, got by iteration, does not escape to infinity. Some of the set's properties are: local connectivity, self-similarity, correspondence with the structure of Julia Set etc. Very simple formula, which gives fascinating results. In the R language animation you can observe the main cardioid, period bulbs, hyperbolic components.

Classic Mandelbrot Set