POV Ray 3.7 code //========================================================== // Heart 3D sequential vertical/horizontal sections // (POV-Ray 3.7 rendering) //========================================================== #include "colors.inc" global_settings {assumed_gamma 1.0} background { color rgb <00,0.0,0.0> } camera { location <-20, 20, -250> look_at < 0, 0, 0>} light_source { < 20, 40, -120> rgb <1.000000, 1.000000, 1.000000> * 4.0 } #declare R = 60; #declare n = 300; #declare st = 1; #declare S = 1; // scale factor #declare Theta = -110; #declare Phi = 0; #declare Psi = -2; // replace n by n*clock for vertical sections animation union{ #for (p, 0, n, st) // vertical section steps 2*n/3-n,n/3-n, 0-n #declare th = -p*2*pi/n; // replace n by n*clock for horizontal sections animation #for (q, 0, n, st) // horizontal section steps 2*n/3-n,n/3-n, 0-n #declare ph = pi - q*pi/n; #declare XX = S*R*cos(th)*sin(ph); #declare YY = S*R*sin(th)*sin(ph); #declare ZZ = R*cos(ph); #declare X = XX + 0.0008*YY*YY; #declare Y = 0.7*YY; #declare Z = 2*ZZ*exp(-.3*(pi-ph)); sphere { < X, Y, Z >, 1 // adding 3d axis texture { pigment { color < 1.0, 0.5, 0.4 > } } finish { ambient rgb <0.3,0.1,0.1> diffuse .3 reflection 0.0 specular 0.0 } // plot sphere } #end // end for q #end // end for p translate < 0, 30, 20 > rotate < Theta, Phi, Psi > }