Page 24 - DCAP504_Computer Graphics
P. 24

Unit 2: Colors in Computer Graphics



               for some real number ν(z), and this is
                                                             log z n  
                                             v (z )  = n − log  p    
                                                            
                                                             log(N ) 

               and as n is the first iteration number such that |z n| > N, the number subtracted from n is in the interval
               [0, 1].
               For the purpose of coloring, a cyclic scale of colors and containing H colors numbered from 0 to H − 1
               (for instance H = 500) is a must. The real number ν(z) is multiplied by a fixed real number, determining
               the density of the colors in the picture, and integral part of this number modulo H is taken.
               The following figure 2.4 depicts the Mandelbrot bug.


                                               Figure 2.4:  Mandelbrot Set
























               The figure 2.4 visualizes an area where -2 < z, real < 0.5 -1.25 < z, imag < 1.25 with N = 64. Most of the z
               values, which are outside the area lead x to diverge quickly, whereas the z values in the black region
               belong to the Mandelbrot set. As illustrated in Figure 2.4, the area is similar to the shape of a bug. You
               can  see the most dynamic alterations between divergence and non-divergence along  with the most
               significant variations in the number of iterations used in the divergence test. The brighter the picture,
               the longer it will take to conclude divergence for the equivalent z. In principle, the rectangular area can
               be decreased indefinitely to zoom in on any active region to illustrate more intricate details.
               2.4   Julia Set

               The Julia set is similar to the Mandelbrot set. If z is set to a fixed non-zero value and varies x 0 across the
               complex plane, a set of non-divergence numbers (values  of  x 0  that do not diverge under the given
               transformation) is obtained to form a Julia set.



                Did you know?   Julia sets are named after the famous French mathematician Gaston Julia. He was a
                             French mathematician, who discovered Julia sets and was the first mathematician to
                             explore their properties.  His masterpiece on Julia set was published in 1918.

               It is important to know that different z values lead to different Julia sets. The following image 1.8 is
               produced by making slight modifications to the pseudo code for the Mandelbrot set. The  figure  2.5
               shows the Julia set defined by z = -0.74543 + 0.11301 i with -1.2 < x0 , real < 1.2, -1.2 < x0 , imag < 1.2,
               and N = 128.






                                        LOVELY PROFESSIONAL UNIVERSITY                           17
   19   20   21   22   23   24   25   26   27   28   29