This function is designed as the basis for visualizing normal Julia sets with phasePortrait. In contrast to usual visualizations of Julia sets, this requires coloring the actual member points of the set and not the points outside. Therefore, for numbers that can be identified as not being parts of the Julia set, this function returns NaN+NaNi. All other numbers are mapped to the complex value obtained after a user-defined number of iterations. This function has been implemented in C++; therefore it is fairly fast.

juliaNormal(z, c, R_esc, itDepth = 500L)

Arguments

z

Complex number; the point in the complex plane to which the output of the function is mapped

c

Complex number; a parameter whose choice has an enormous effect on the shape of the Julia set. For obtaining useful results with phasePortrait, c must be an element of the Mandelbrot set.

R_esc

Real number; the espace radius. If the absolute value of a number obtained during iteration attains or excels the value of R_esc, juliaNormal will return NaN+NaNi. R_esc = 2 is a good choice for c being an element of the Mandelbrot set. See Details for more information.

itDepth

An integer which defines the depth of the iteration, i.e. the maximum number of iteration (default: itDepth = 500)

Value

Either NaN+NaNi or the complex number obtained after itDepth iterations

Details

Normal Julia sets are closely related to the Mandelbrot set. A normal Julia set comprises all complex numbers z for which the following sequence is bounded for all n > 0: a[n+1] = a[n]^2 + c, starting with a[0] = z. The parameter c is a complex number, and the sequence is certainly unbounded if abs(a[]) >= R with R being an escape Radius which matches the inequality R^2 - R >= abs(c). As the visualization with this package gives interesting pictures (i.e. other than a blank screen) only for c which are elements of the Mandelbrot set, R = 2 is a good choice. For the author's taste, the Julia visualizations become most interesting for c located in the border zone of the Mandelbrot set.

See also

Other fractals: mandelbrot()

Other maths: blaschkeProd(), jacobiTheta(), mandelbrot()

Examples

# This code visualizes a Julia set with some appeal (for the author's
# taste). Zoom in as you like by adjusting xlim and ylim.
# \donttest{
phasePortrait(juliaNormal,
  moreArgs = list(c = -0.09 - 0.649i, R_esc = 2),
  xlim = c(-2, 2),
  ylim = c(-1.3, 1.3),
  hsvNaN = c(0, 0, 0),
  nCores = 1)          # Max. two cores on CRAN, not a limit for your use
# }