POV Ray 3.7 code //========================================== // Sequential Mandelbrot 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 = -40; // set rotation angles #declare Ph = 10; background { color red 0.2 green 0.6 blue 0.8 } plane { < 0.0, 1, 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, 100, -220> look_at <20, 10, 0> } 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.5; // set radius value #declare L = 2; // set square area side #declare X = 0; // set co-ordinate x initial value #declare Y = 0; // set co-ordinate y initial value #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, 1) // partial values 0, n/4, n/2 // #for (q, -n, n, 1) #declare X = 0; #declare Y = 0; #for (k,0,N) #declare XX = X*X - Y*Y + p*L/n - 1; #declare YY = 2*X*Y + q*L/n; #declare X = XX; #declare Y = YY; #if (X*X+Y*Y < R+.01) sphere { < p, k, q >, 1 hollow radiosity { importance 1.0 } texture { pigment { color rgb < abs(sin(.5*pi*k/N)), 0.3, abs(cos(.5*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