POV Ray 3.7 code //========================================================= // Quaternion 3D Julia-Mandelbrot-Mandelbrot fractal set // (\$C = -0.7454294\$) generated sequentially // (POV-Ray point by point generation) //========================================================= #include "colors.inc" // Standard Color definitions #include "glass.inc" // Glass pigment effect #include "metals.inc" // Metal pigment effect global_settings {assumed_gamma 1.0} background { color rgb <00,0.0,0.0> } camera { // set view point (camera) location location <-20, 20, -300> look_at <-5, 0, 0> } light_source { // set point light sources location < -20, 20, -10> rgb <1.000000, 1.000000, 1.000000> * 2.0 } light_source { < 30, 20, -10> rgb <1.000000, 1.000000, 1.000000> * 3.0 } #declare R = .1; // set radius value #declare L = 2; // set square area side #declare n = 200; // set number of pixels per area side #declare st1 = 1; // set increment steps #declare st2 = 1; #declare st3 = 1; #declare N = 20; // set number of cycles #declare Th = -45; // set rotation angles #declare Ph = 30; #declare Cx = -0.7454294; // JuliaX parameter union{ // replace n by n*clock for animation #for (p, -n, n, st1) #declare IncX = p*L/n; // Julia X increment #for (q, -n, n, st2) #declare IncY = q*L/n; // Mand Y increment #for (r, -n, n, st3) #declare IncZ = r*L/n; // Julia Y increment #declare X = IncX; // start JuliaX #declare Y = 0; // start MandY #declare Z = 0; // start MandZ #for (k,1,N) #declare XX = X*X - Y*Y - Z*Z + Cx; // cycle JuliaX #declare YY = 2*X*Y + IncY; // cycle MandY #declare ZZ = 2*X*Z + IncZ; // cycle JuliaZ #declare X = XX; #declare Y = YY; #declare Z = ZZ; #declare W = X*X +Y*Y + Z*Z; #if ( W > R) // escape if #if (W < R + 0.01) // escape if sphere { < p, q, r >, 1 // adding 3d axis texture { pigment { color Col_Glass_Yellow } } finish { ambient rgb <0.3,0.1,0.1> diffuse .3 reflection .3 specular 1 } // plot sphere } #end // end if #end // end if #end // end for k #end // end for q #end // end for p #end // end for r translate < 30, 15, 10 > rotate < Th, Th, Ph > }