POV Ray 3.7 code //========================================================= // Quaternion 3D Mand-Mand-Mand set 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} // set display gamma background { color rgb <00,0.0,0.0> } // set black background 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 { < 20, 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 ns = 200; // partial values ns = 50, 75, 100 #declare st = 1; #declare N = 40; // N = 40 #declare Th = -45; #declare Ph = 30; // replace ns by ns*clock for animation union{ #for (p, -ns, ns, st) #declare IncX = p*L/n; // Mand1 X increment #for (q, -ns, ns, st) #declare IncY = q*L/n; // Mand1 Y1 increment #for (r, -ns, ns, st) // alternative #for (r, 0, ns, st) [open sets] #declare IncZ = r*L/n; // Mand2 Y2 increment #declare X = 0; // start MandX #declare Y = 0; // start MandY #declare Z = 0; // start MandZ #for (k,1,N) #declare XX = X*X - Y*Y - Z*Z + IncX; // cycle MandX #declare YY = 2*X*Y + IncY; // cycle MandY #declare ZZ = 2*X*Z + IncZ; // cycle MandZ #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.0015) // 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, 0 > rotate < 0, Th, Ph > }