POV Ray 3.7 code //===================================== // Newton's method 3D set as a whole // (POV-Ray cylindrical symmetry) //===================================== #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 <0.0,0.0,0.0> } // set black background camera { // set view point (camera) location location <-20, 20, -400> look_at <-35, 1, 0> angle 100 } light_source // set area light sources location { 0*x // light's position (translated below) color Silver // light's color // nLightsWide mLightsHigh area_light <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z) 4, 4 // total number of lights in grid (4x*4z = 16 lights) adaptive 0 // 0,1,2,3... jitter // adds random softening of light translate <40, 80, -40> // position of light } #declare R = 0.9; // set radius value #declare L = 1.10; // set square area side #declare X = 0.01; // set co-ordinate x initial value #declare Y = 0.01; // set co-ordinate y initial value #declare n = 200; // set number of pixels per area side #declare N = 10; // set number of cycles #declare Nr = 100; // alternative Nr = 25; // set number of sections #declare Th = -45; #declare Ph = 30; #for (p, -n, n, 1) #declare IncX = p*L/n; #for (q, -n, n, 1) #declare IncY = q*L/n; #declare X = IncX; #declare Y = IncY; #for (i,1,N) #declare XX = 3*X/4 - X*(X*X - 3*Y*Y)/(X*X + Y*Y)/(X*X + Y*Y)/ (X*X + Y*Y)/4; #declare YY = 3*Y/4 - Y*(Y*Y - 3*X*X)/(X*X + Y*Y)/(X*X + Y*Y)/ (X*X + Y*Y)/4; #declare X = XX; #declare Y = YY; #if (X*X+Y*Y > R) #if (X*X+Y*Y < R+.05) #for (k,0,Nr) // replace Nr by Nr*clock for animation sphere { < p, q*cos(3.14*k/Nr), q*sin(3.14*k/Nr) >, 1 hollow radiosity { importance 1.0 } texture { pigment { color Col_Glass_Yellow } } finish { ambient rgb <0.3,0.1,0.1> diffuse .3 reflection .3 specular 1 } } #end // end if #end // end if #end // end for k #end // end for i #end // end for q #end // end for p rotate < 0, Th, Ph > translate <50,20,0> }