Julia Set (Complex)

The Julia Set is the collection of points that satisfies the following feedback process:

zn+1=z2+c

where z and c are complex numbers: z=x+iy, c=a+ib. Images can be generating by iterating this recurrence and associating the real component of z (x) with the horizontal dimension of an image, and associating the imaginary component of z (y) with the vertical dimension of an image.

One method to test if a particular point P is in the set is as follows:

Set z0 to P, c to a constant for the particular style of Julia set to generate, and iterate the recurrence for M, a specified maximum number of iterations. If the magnitude of z remains finite even after M iterations are performed, consider P to be in the set. If the magnitude of z "escapes to infinity" (practically, |z|>2) before M iterations are reached, consider P not to be in the set, and call the iteration where z escaped E.

Images can be colored many different ways, and different aspects of the image are shown by different coloring schemes. Four types of coloring are shown here:

Black & White If P is in the set, color it white. If P is not in the set, color it black. This coloration shows exactly what is in the set and what isn't.
Gray If P is in the set, color it white. If P is not in the set, color it on a scale from white to black relative to E: E=[1..M-1] → color=[white..black]. This coloration accentuates the set by outlining it in black, surrounded by gray.
Fire If P is in the set, color it white. If P is not in the set, color it on a scale from red to yellow relative to E: E=[1..M-1] → color[red..yellow]. This coloration makes it appear that the set is glowing white hot, with a cooler "temperature" as the distance from the set increases.
Rainbow If P is in the set, color it white. If P is not in the set, select a color from a rainbow palette based on E. This coloration uses a color of maximum intensity for every pixel, so all detail is made visible.

Black & White Gray Fire Rainbow
Re ∈ [-1.5,1.5]
Im ∈ [-1.5,1.5]
c=0.11031-0.67037i
Re ∈ [-1.5,1.5]
Im ∈ [-1.5,1.5]
c=-0.194-0.6557i
Re ∈ [-1.7,1.7]
Im ∈ [-1.7,1.7]
c=-0.15652+1.03225i
Re ∈ [-1.8,1.8]
Im ∈ [-1.8,1.8]
c=-0.74543+0.11301i