File: IncludeFiles_own.pov

package info (click to toggle)
povray 1%3A3.7.0.10-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 147,232 kB
  • sloc: cpp: 845,011; ansic: 122,118; sh: 34,204; pascal: 6,420; asm: 3,355; ada: 1,681; makefile: 1,389; cs: 879; awk: 590; perl: 245; xml: 95
file content (216 lines) | stat: -rw-r--r-- 7,037 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
// Insert menu illustration scene "IncludeFiles_own.pov"
// Author: Friedrich A. Lohmueller, June-2012
#version 3.7;

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


#if( Typ != 2 )  
global_settings{ assumed_gamma 1.0 } 
#end 

#default{ finish{ ambient 0.1 diffuse 0.9 }} 
#include "colors.inc"
#include "textures.inc"
//------------------------------------
#declare In_Path  = "A0 - Include files/"   
#declare Sub_Path = "20 - own include files/"


#switch (Typ)  //----------------------------------------------------------
// In_Path 
#case(1)  #declare Txt_Path="50 - Include_File Chair.txt" #break 
#case(2)  #declare Txt_Path="50 - Include_File_Chair_Use.txt" #break

#case(3)  #declare Txt_Path="20 - Include_File Socket.txt" #break 
#case(4)  #declare Txt_Path="30 - Include_File_Socket_Use.txt" #break


#case(10)  #declare Txt_Path="'chars.inc'.txt" #break
#case(11)  #declare Txt_Path="'logo.inc'.txt" #break
//#declare Typ=7; 'chars'.txt 


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

 
//------------------------------------------------------------------------
// sun -------------------------------------------------------------------
light_source{<500,2500,-2500> color White}
// sky -------------------------------------------------------------------
sky_sphere{ pigment{ gradient <0,1,0>
                     color_map{ [0   color rgb<1,1,1>         ]//White
                                [0.4 color rgb<0.14,0.14,0.56>]//~Navy
                                [0.6 color rgb<0.14,0.14,0.56>]//~Navy
                                [1.0 color rgb<1,1,1>         ]//White
                              }
                     scale 2 }
           } // end of sky_sphere 
//------------------------------------------------------------------------
// ground -----------------------------------------------------------------
//---------------------------------<<< settings of squared plane dimensions
#declare RasterScale = 0.3;
#declare RasterHalfLine  = 0.035;  
#declare RasterHalfLineZ = 0.035; 
//-------------------------------------------------------------------------
#macro Raster(RScale, HLine) 
       pigment{ gradient x scale RScale
                color_map{[0.000   color rgbt<1,1,1,0>*0.3]
                          [0+HLine color rgbt<1,1,1,0>*0.3]
                          [0+HLine color rgbt<1,1,1,1>]
                          [1-HLine color rgbt<1,1,1,1>]
                          [1-HLine color rgbt<1,1,1,0>*0.3]
                          [1.000   color rgbt<1,1,1,0>*0.3]} }
 #end// of Raster(RScale, HLine)-macro    
//-------------------------------------------------------------------------
box { <-2,-0.1,-1.5>,<1.5,0,2>     // plane with layered textures
        texture { pigment{color White*1.1}}
        texture { Raster(RasterScale,RasterHalfLine ) rotate<0,0,0> }
        texture { Raster(RasterScale,RasterHalfLineZ) rotate<0,90,0>}
        rotate<0,0,0>
      }
//------------------------------------------------ end of squared plane XZ
#end // "Base_Scene_1 ()"
//------------------------------------------------------------------------- 
//------------------------------------------------------------------------- 
//------------------------------------------------------------------------- 
//------------------------------------------------------------------------- 
//----------
#if (Typ=1) // 
Base_Scene_1 ()
camera { angle 12   // diagonal view
         location  <5.0 , 3.0 ,-5.0>
         right     x*image_width/image_height
         look_at   <0.0 , 0.45 , 0.0>}

#include concat(In_Path,Sub_Path,Txt_Path) // "50 - Include_File Chair.txt")
      //Chair( seat h, chair width, backrest h, feet d)
object{ Chair( 0.45, 0.45, 0.90, 0.04 )
        rotate<0,0,0>
        translate<0,0,0>
      }  
#end
//----------
#if (Typ=2) // 
/*
//Base_Scene_1 ()
camera { angle 10   // diagonal view
         location  <10.0 , 10.0 ,-10.0>
         right     x*image_width/image_height
         look_at   <0.0 , 0.5 , 0.0>}
*/
#include concat(In_Path,Sub_Path,Txt_Path) //"50 - Include_File Chair.txt")
      //Chair( seat h, chair width, backrest h, feet d)

object{ Chair( 0.45, 0.45, 0.90, 0.04 )
        rotate<0,-70,0>
        translate<-1,0, 0.1>
      }  
object{ Chair( 0.45, 0.45, 0.90, 0.04 )
        rotate<0,-20,0>
        translate<-0.5,0, 0.8>
      }  
object{ Chair( 0.45, 0.45, 0.90, 0.04 )
        rotate<0, 20,0>
        translate<0.75,0, 0.2>
      }  

object{ Chair( 0.45, 0.45, 0.90, 0.04 )
        rotate<0, -160,0>
        translate<-0.45,0,-1.0>
      }  

 
#end
//----------

#if (Typ=3) // 
Base_Scene_1 ()
camera { angle 12   // diagonal view
         location  <5.0 , 3.0 ,-5.0>
         right     x*image_width/image_height
         look_at   <0.0 , 0.45 , 0.0>}

#include concat(In_Path,Sub_Path,Txt_Path) // "50 - Include_File Chair.txt")
      //Chair( seat h, chair width, backrest h, feet d)
object{ Socket translate<0,0.5,0>
        scale 0.9
        rotate<0,0,0>
        
      }  
#end
//----------

#if (Typ=4) // 
Base_Scene_1 ()
camera { angle 20   // diagonal view
         location  <5.0 , 3.0 ,-5.0>
         right     x*image_width/image_height
         look_at   <0.1 , 0.45 , 0.0>}

#declare Socket_Tex_1 =  // sphere
//texture{ pigment{color rgb<1,0,0>}
texture{ Chrome_Metal  
         normal { bumps 0.85 scale 0.01 }
         finish { phong 0.5 } 
       }
#declare Socket_Tex_2 =  // box 
//texture{ pigment{color rgb<1,0.65,0>}
texture{ pigment{color rgb<1,1,1>*0.7}
         finish { phong 0.5 } 
       }
#declare Socket_Tex_3 =  // cylinders
// texture{ pigment{color rgb<0.5,1,0> }
texture{ Chrome_Metal
         finish { phong 1 } 
       }
#include concat(In_Path,Sub_Path,"20 - Include_File Socket.txt") //

object{ Socket  translate< 0,0.50, 0.00>
        scale <1,1,1>*1
        rotate<0,0,0>
        translate<0.750,0, 0.00>
      } //------------------------

// re-declared textures 
#declare Socket_Tex_1 =  // sphere
texture{ pigment{color rgb<1,0,0>}
         finish { phong 0.5 } 
       }
#declare Socket_Tex_2 =  // box 
texture{ pigment{color rgb<1,0.65,0>}
         finish { phong 0.5 } 
       }
#declare Socket_Tex_3 =  // cylinders
texture{ pigment{color rgb<0.5,1,0> }
         finish { phong 1 } 
       }
// loading object definition again ----------------------------------------------------//
#include concat(In_Path,Sub_Path,"20 - Include_File Socket.txt") //
object{ Socket  translate<0,0.50, 0.00>
        scale <1,1,1>*1
        rotate<0,0,0>
        translate< -0.750,0, 0.00>
      } //------------------------

#end
//----------





#if (Typ=10) // 
#include concat(In_Path,Txt_Path) //"50 - Include_File Chair.txt")
#end
//----------
#if (Typ=11) // 
#include concat(In_Path,Txt_Path) //"50 - Include_File Chair.txt")
#end
//----------


//---------- End Include file samples