File: Photons_and_Radiosity.pov

package info (click to toggle)
povray 1%3A3.7.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 146,780 kB
  • sloc: cpp: 845,005; ansic: 122,118; sh: 34,206; pascal: 6,420; asm: 3,355; ada: 1,681; makefile: 1,387; cs: 879; awk: 590; perl: 245; xml: 95
file content (114 lines) | stat: -rw-r--r-- 3,006 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// Insert menu illustration scene "Radiosity_and_Photons.pov"
// Author: Friedrich A. Lohmueller, June-2012
#version 3.7;
global_settings{ assumed_gamma 1.0 } 

#default{ finish{ ambient 0.1 diffuse 0.9 }} 
#include "shapes.inc"
#include "colors.inc"
#include "textures.inc"

#declare In_Path  = "I0 - Radiosity and Photons/"   

      // #declare Typ =85; // for tests

#switch (Typ)  //----------------------------------------------------------

#case(30)  #declare Txt_Path="30 - Radiosity scene.txt" #break
#case(35)  #declare Txt_Path="35 - Radiosity scene.txt" #break
#case(40)  #declare Txt_Path="40 - Radiosity scene2.txt" #break 

//
#case(80)  #declare Txt_Path="80 - Photons scene.txt" #break
#case(85)  #declare Txt_Path="85 - Photons scene1.txt" #break
#case(90)  #declare Txt_Path="90 - Object photons on code" #break

#end // of '#switch (Typ)' ------------------------------------------------
//-------------------------------------------------------------------------



//------------------------------------------------------------------------- 
//----------
#if (Typ=30) // In_Path,"30 - Radiosity scene.txt"
 #include concat(In_Path,Txt_Path) 
#end
//----------
#if (Typ=35) // In_Path,"35 - Radiosity scene.txt"
 #include concat(In_Path,Txt_Path) 
#end  
//----------
#if (Typ=40) // In_Path,"30 - Radiosity scene.txt"
 #include concat(In_Path,Txt_Path) 
#end

//----------
#if (Typ=80) // In_Path,"80 - Photons scene.txt"
 #include concat(In_Path,Txt_Path) 
#end
//----------
#if (Typ=85) // In_Path,"85 - Photons scene1.txt"
 #include concat(In_Path,Txt_Path) 
#end
//----------
#if (Typ=90) // In_Path,"90 - Object photons on - code.txt"
global_settings{ 
        max_trace_level 15
        photons {
                spacing 0.03
        }
} //-----------------------------------------
// photon object
// Derived for a sample of Bob Hughes,2001
// by Friedrich A. Lohmueller, May 2010
//
#declare Crystal=
intersection{
 #for (Count, 0,8,1 )
   box{ <-1,-1,-1>,<1,1,1> rotate <45,0,45> rotate Count*40*y }
 #end
} //------------

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.8,1.0>*0.7]
      [0.3 rgb <0.3,0.6,0.9>*0.7]
      [1.0 rgb <0.1,0.4,0.8>*0.7]
    }
  }
}

camera {
  location  <0, 8, -14>
  right    x*image_width/image_height
  rotate 6*y
  look_at   <0.25,0,0>  
  angle 23  
}

light_source { <-200, 150, -200>, color rgb<1,1,1> }
 
plane{  <0,1,0>,-1  
        pigment {rgb 0.5}
}//----
 
object{ Crystal
        pigment{ rgbft <1,1,1,0.9,0.1>}
        finish { specular 0.3 roughness 0.009 reflection {0.1} }
        interior {ior 1.33 dispersion 1.2 dispersion_samples 12}
        translate <1.55,0.5,0>
        photons {target 0.9 refraction on reflection on}
}//----

object{ Crystal
        pigment {rgb 0.1}
        finish {diffuse 0.2 specular 0.6 roughness 0.01 reflection {0.9}}
        translate <-1.55,0.5,0>
        photons {target 0.9 refraction off reflection on}
}//----
#end


//---------- End Radiosity and Photons