POV Ray 3.7 code //============================================== // Random 3D surface generation (Sphere) // by POV-Ray 3.7 //============================================== #include "glass.inc" // include pigment files #include "colors.inc" #include "metals.inc" global_settings {assumed_gamma 1.0} // set gamma value background { color rgb <00,0.0,0.0> } // set black background color camera { // set view point (camera) location location <-10, 10, -30> look_at <0, 0, 0> } light_source { // set point light sources location < -50, 20, -10> rgb <1.000000, 1.000000, 1.000000> * 2.0 // set white light color and intensity } light_source { < 20, 20, -10> rgb <1.000000, 1.000000, 1.000000> * 2.0 } light_source { <-3, 10, -3> color White } #declare R = 9; // set spere radius value #declare n = 100; // set number of cycles #declare X = array[n+1][n+1]; // define x co-rdinate array #declare Y = array[n+1][n+1]; // define y co-rdinate array #declare Z = array[n+1][n+1]; // define z co-rdinate array #for (p, 0, n) // polar co-ordinate theta cycle #declare Th = p*2*pi/n; #for (q, 0, n) // polar co-ordinate phi cycle #declare Ph = q*pi/n; #declare X[p][q] = R*cos(Th)*sin(Ph); // polar to Cartesian co-ordinates #declare Y[p][q] = R*sin(Th)*sin(Ph); #declare Z[p][q] = R*cos(Ph); #end // end for q // for cycles end #end // end for p #declare Rnd_1 = seed (1153); // declare random indices #declare Rnd_2 = seed (553) ; #declare j = (n+5)*clock; // animation clock #declare i = (n+5)*clock; #for(r,0,i) // individual cell plotting random cycles #for(s,0,j) #declare p = int(n*rand(Rnd_1)); // set random variables #declare q = int(n*rand(Rnd_2)); sphere { < X[p][q], Y[p][q], Z[p][q] >, .4 // spherical cell location and radius texture { // pigment and finishing choices pigment{ P_Copper3 }} finish { ambient .1 specular .5 metallic }} #end // for cycles end #end