// fractal pattern typ Magnet Mandel /* MAGNET MANDEL: magnet MAGNET_TYPE mandel ITERATIONS [, BUMP_SIZE] [exterior EXTERIOR_TYPE, FACTOR] [interior INTERIOR_TYPE, FACTOR] MAGNET_TYPE = 1 or 2 ITERATIONS = number of iterations (up to 2^32-1). COMPLEX is a 2D vector denoting a complex number. EXPONENT is an integer between 2 and 33. Default = 2. interior and exterior specify special coloring algorithms. We can specify one of them or both at the same time. They only work with the fractal patterns. EXTERIOR_TYPE and INTERIOR_TYPE are integer values between 0 and 6 (inclusive). When not specified. Defaults: INTERIOR_TYPE = 0 and EXTERIOR_TYPE = 1. FACTOR is a float. The return value of the pattern is multiplied by FACTOR before returning it. It can be used to scale the value range of the pattern when using interior and exterior coloring (often needed to get the desired effect). Default FACTOR = 1. */ //-------------------------------------------------------------------------- #declare Pigment_1 = pigment{ magnet 1 // magnet type 1 or 2 mandel 50 interior 3, 7 // exterior 2,1 scale 0.50 translate<-0.40,0,0> color_map{[0.0 color rgb <1,0.5,0>] [0.1 color rgb <1,0,0.2>] [0.4 color rgb <1,1,0>] [0.5 color rgb <1,1,1>] [1.0 color rgb <0,0,0>]} } // end of pigment ------------------- sphere{ <0,0,0>, 1 pigment{ Pigment_1 } // end pigment normal { pigment_pattern { Pigment_1 } 3 // BUMP_SIZE } // end normal finish { phong 1 } scale<1,1,1> rotate<0,20,0> translate<0,0,0> } // end of sphere ----------------------- //-------------------------------------------------------------------------- //--------------------------------------------------------------------------