// Autumn scene with lanterns and leaves // C.M.Moerman, October 2000 // Some fog added, Nov 2002 #include "colors.inc" // voeg hier eventueel de .inc #include "textures.inc" // file toe waarin jouw materiaal #include "shapes.inc" // (texture) staat. #include "skies.inc" #include "stones1.inc" #include "stones2.inc" #declare IMPORT_SPATCH=1; // allow inclusion of sPatch-generated shapes #declare DEBUG=0; // zet op 0 om pijltjes weg te halen #declare KAMERA=1; // zet op 0 om vanaf 'WAARVAN te bekijken #declare WAARVAN = -z; // y: van boven, x: van opzij, z: van achteren, -z van voren #declare MIST=0.3; // 0 is off, low value: dark fog, high value: light fog #declare ZOOM=0.6; // groter is verder weg (gewoon = 1) #declare GRAS= White_Wood ; // het pigment voor het gras #declare LUCHT=S_Cloud4; // het textuur voor de lucht // Het blad is een grillige vorm, niet een basisvorm van Povray. // Heb ik daarom met een hulp-programma sPatch gemaakt, staat in aparte file. #declare leaf = object { #include "leaf.inc" // sPatch-generated include file (leave shape) rotate x*-45 // default tilted to catch some light and show the shape texture { // give the leaf some autumn colors pigment { // gemaakt met mijn colormap utility (zie andere page) onion color_map { // from colormap.pl leaf [ 0.000 color rgbft < 0.7569 0.4039 0.2980 0.000 0.000> ] // 0 [ 0.089 color rgbft < 0.9961 0.5137 0.1059 0.000 0.000> ] // 1 [ 0.234 color rgbft < 0.8706 0.5843 0.2706 0.000 0.000> ] // 2 [ 0.342 color rgbft < 1.0000 0.7804 0.0000 0.000 0.000> ] // 3 [ 0.481 color rgbft < 0.9922 0.4824 0.0000 0.000 0.000> ] // 4 [ 0.665 color rgbft < 0.7216 0.5294 0.1765 0.000 0.000> ] // 5 [ 0.856 color rgbft < 0.6706 0.3922 0.1255 0.000 0.000> ] // 6 [ 1.000 color rgbft < 0.4392 0.6863 0.2392 0.000 0.000> ] // 7 } turbulence 1 // some turbulence scale 0.6 // transformations } finish { ambient 0.2 } } } #declare R1 = seed(0); // initialiseer random generator #macro rnd (dist) // gaussion distribution ( dist * (rand(R1-0.5)+rand(R1-0.5)+rand(R1-0.5)+rand(R1-0.5)+rand(R1-0.5))/2.5 ) #end #macro leafs (xpos, ypos, zpos, disp) // blad op ongeveer opgegeven positie object { leaf rotate x * rand(R1) * 360 rotate y * rand(R1) * 360 translate } #end #declare X1=-6; // enkele bladeren op de voorgrond #while (X1 <= 3) leafs(X1+1, X1*X1/15, 1, 0.3) #declare X1=X1+2; #end #if(1) // 0 voor sneller renderen #declare X1=-10; #while (X1 <= 0) leafs(X1+2, X1*X1/15, 10, 1) #declare X1=X1+1; #end #declare X1=-6; #while (X1 <= -3) leafs(X1, X1*X1/15, 10, 1) #declare X1=X1+1; #end #declare X1=-30; // bladeren: groep links #while (X1 <= 0) leafs(X1-25, X1*X1/50, 50, 1) leafs(X1-25, X1*X1/51, 52, 2) #declare X1=X1+1; #end #declare X1=-22; #while (X1 <= -8) leafs(X1-25, X1*X1/50, 50, 1) leafs(X1-25, X1*X1/51, 52, 2) #declare X1=X1+1; #end #declare X1=-40; // bladeren: groep rechtsachter #while (X1 <= 30) leafs(X1+20, X1*X1/50, 150, 2) leafs(X1+20, X1*X1/51, 152, 4) #declare X1=X1+1; #end #declare X1=-22; #while (X1 <= 10) leafs(X1+20, X1*X1/50, 150, 3) leafs(X1+20, X1*X1/51, 152, 6) #declare X1=X1+1; #end #end // if object { leaf translate <-6, 1, 2> } // nog een blad vooraan... // nu de lampion: #declare T_lampion = texture { // textuur van de lampion: pigment { cells // papieren lapjes van verschillende kleur color_map { // from colormap.pl lampion [ 0.000 color rgbft < 1.0000 0.0000 0.0000 0.500 0.000> ] // 0 [ 0.051 color rgbft < 1.0000 0.2157 0.0000 0.580 0.000> ] // 1 [ 0.196 color rgbft < 0.9961 0.5216 0.0000 0.710 0.000> ] // 2 [ 0.342 color rgbft < 1.0000 0.7804 0.0000 0.610 0.000> ] // 3 [ 0.481 color rgbft < 0.9961 0.7765 0.0000 0.600 0.000> ] // 4 [ 0.728 color rgbft < 0.9961 0.9961 0.0000 0.700 0.000> ] // 5 [ 0.856 color rgbft < 0.9961 0.9961 0.0000 0.800 0.000> ] // 6 [ 1.000 color rgbft < 0.2353 0.6353 0.9843 0.800 0.000> ] // 7 } turbulence 0.3 // some turbulence scale 0.6 // transformations } finish { // (---surface finish---) ambient 0.5 specular 0.6 // shiny } normal { crackle 0.3 scale 0.3 turbulence 0.1 } // met kreukjes } #declare T_flame = texture { // textuur van de vlam pigment { // (---surface color---) onion // some pattern color_map { // from colormap.pl flame [ 0.000 color rgbft < 1.0000 1.0000 0.9804 0.000 0.900> ] // 0 [ 0.215 color rgbft < 1.0000 0.2157 0.0000 0.800 0.000> ] // 1 [ 0.310 color rgbft < 1.0000 0.5255 0.0000 0.800 0.000> ] // 2 [ 0.399 color rgbft < 1.0000 0.7804 0.0000 0.800 0.000> ] // 3 [ 0.462 color rgbft < 1.0000 1.0000 0.0000 0.800 0.000> ] // 4 [ 0.570 color rgbft < 1.0000 1.0000 0.9804 0.780 0.000> ] // 5 [ 0.856 color rgbft < 1.0000 1.0000 0.9804 0.000 0.900> ] // 6 [ 1.000 color rgbft < 1.0000 1.0000 0.9804 0.000 0.900> ] // 7 } turbulence 1 // some turbulence scale 0.5 // een beetje kleiner } finish { ambient 4 specular 1 } } #declare lampion = // daar komt'ie dan union { sphere { <0, 0, 0>, 2 // gekleurd papieren bol texture { T_lampion } } object // met daarin de vlam { sphere { <0, 0, 0>, 0.5 texture { T_flame } } scale <0.8,3,0.8> // uitgerekt in de lengte } sphere { <0,0,0> 1.95 // het houten frame pigment { spiral1 1 // gebaseerd op de spiraal color_map { // grotendeels doorzichtig [ 0 color rgbft <1, 0.5, 0.5, 0, 0> ] [ 0.08 color rgbft <1, 0.5, 0.5, 0, 0> ] [ 0.1 color rgbft <1, 1, 1, 1, 0> ] [ 1 color rgbft <1, 1, 1, 1, 0> ] } turbulence 0.05 scale 0.7 } finish { ambient 0.5 } rotate x*90 } cylinder { <0, 2, 0> <0, 100, 0> 0.02 pigment { Gray } } light_source { // en een lichtbron van binnen < 0, 0, 0 > color White * 1.0 fade_distance 25 // die snel in helderheid afvalt fade_power 2 } // it gives light } object { lampion translate <0, 8.1, 0> } // daar zijn ze! object { lampion rotate 45 * y translate <9, 9.5, 10> } object { lampion rotate 90 * y translate <-9, 8, 15> } object { lampion rotate 145 * y translate <5, 3.5, 20> } object { lampion rotate 145 * y translate <50, 5, 100> } cylinder { <0, 0, 0> y*0.1 5 texture { pigment { White } } } // PLANE _plane0 // en het gras plane { <0, 1, 0>, 0 texture { pigment { GRAS } finish { ambient 0.12 } scale 10 } // translate < 0, 0, 0 > } sky_sphere { LUCHT } // De lucht #if(KAMERA) camera { // Camera positie: vanaf de voorkant location ZOOM * < 2, 10, -20 > look_at < 0, 5, 0 > } #else camera { // Camera positie: vanaf boven location ZOOM * WAARVAN * 30 + y * 0.03 // y: van boven, z: van achteren, x: van opzij look_at < 0, 0, 0 > } #end // LIGHT _light1 // klein beetje licht extra light_source { < 100, 200, -100 > // lampionen zijn wat weinig color White*0.1 // area_light <5, 0, 0>, <0, 0, 5>, 5, 5 // area light (prevent sharp shades) adaptive 1 jitter } #if(MIST) fog{ // En een laagje mist color rgbt MIST * <.6,.6,.9,.005, 0.1> // laatste: minimale doorlaatbaatheid fog_type 2 fog_alt 3 // scherpte van grenslaag (kleiner = scherper ) fog_offset -2 // hoogte boven de grond distance 70 // dichtheid, kleiner is dichter turbulence 0.2 turb_depth 0.3 } #end // -------------------- einde van plaatje --------------------------------