POV Ray 3.7 code //==================================================== // Sequential Newton's method set mountain landscape // generation (POV-Ray 3.7 small spheres) //=================================================== #include "colors.inc" // Standard Color definitions #include "glass.inc" // Glass pigments #include "metals.inc" // Metal pigments global_settings {assumed_gamma 1.0} // set display gamma #declare Th = -60; // set rotation angles #declare Ph = 0; background { color red 0.2 green 0.6 blue 0.8 } plane { < 0.0, 10, 0.0 >, 1 // normal vector to palne | -1 is the height of the floor pigment { color .3*Green } normal { bumps 0.5 scale 0.6} // grass effect rotate < 0, Th, Ph >} camera {{ // set view point (camera) location location < 0, 120, -180> look_at < 0, -20, 0> angle 90} light_source // create a regular point light source { 0*x // light's position (translated below) color Gold // light's color translate <1000, 1000, -100> } light_source // Area light source (creates soft shadows) { 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.0; // 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 Cx = 0.0; // set x shift #declare Cy = 0.0; // set y shtift #declare n = 200; // set number of pixels per area side #declare N = 20; // set number of cycles // replace -n, n by -n*clock, n*clock for animation #for (p, -n, n/4, 1) // partial values -n/4, 0, n/4 #declare IncX = p*L/n; #for (q, -n, n, 1) #declare IncY = q*L/n; #declare X = IncX; #declare Y = IncY; #for (k,0,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 - Cx)*(X-Cx) + (Y - Cy)*(Y - Cy) < R) sphere { < p, k, q >, 1 hollow radiosity { importance 1.0 } texture { pigment { color rgb < abs(sin(.5*pi*k/N)), 0.3, abs(cos(pi*(k/N))) > } } finish { ambient rgb <0.3,0.1,0.2> diffuse .3 reflection .3 specular 1 } rotate < 0, Th, Ph > translate < 0, 0, 0 > } #end // end if #end // end for k #end // end for q #end // end for p