File: building.inc

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 (212 lines) | stat: -rw-r--r-- 4,721 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
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

// Persistence Of Vision Ray Tracer Include File
// File: building.inc
// Desc: building for 'balcony.pov' demonstration scene
// Date: July/August 2001
// Auth: Christoph Hormann

// Updated: 09Aug2008 (jh) for v3.7 distribution

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

#if (version < 3.7)
  #version 3.5;
#end

#declare Tex_Stone=
texture {
  pigment {

    agate
    color_map {
      [0.7 color rgb <0.6,0.6,0.6> ]
      [1.0 color rgb 0.46 ]
    }
    warp { turbulence <0.7,0.4,0.4> }
    scale <0.3,1.2,1.2>*0.25
    rotate -60*y
    rotate 70*z
  }
  finish {
    ambient 0.0//0.1
    diffuse 0.5
    specular 0.15
  }
  normal {
    granite 0.2
    warp {turbulence 1}
    scale 0.1
  }
}

#declare Tex_Floor_A=
texture {
  pigment {
    color rgb <0.6,0.6,0.6>
  }
  finish {
    ambient 0.0
    diffuse 0.5
    specular 0.15
  }
  normal {
    granite 0.2
    warp {turbulence 1}
    scale 0.25
    translate 2
  }
}

#declare Tex_Floor_B=
texture {
  pigment {
    color rgb <0.18,0.18,0.22>
  }
  finish {
    ambient 0.0
    diffuse 0.5
    specular 0.15
  }
  normal {
    granite 0.2
    warp {turbulence 1}
    scale 0.25
  }
}

#declare Tex_Floor=
texture {
  checker
  texture { Tex_Floor_A },
  texture { Tex_Floor_B }
  scale 0.4
  rotate 45*z
}

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

#include "shapes.inc"

#declare fn_Rad=
function {
  sin(pow(abs(z*0.4),1.8))+0.4
}

#declare Small_Column_part1=
isosurface {
  function { min(sqrt( x*x + y*y ) - fn_Rad(x, y, z), sqrt( x*x + y*y + pow(abs(z*2),1.4)) - 1.0) }
  max_gradient 1.8
  //eval
  accuracy 0.001
  contained_by { box { -4, 4 } }
  translate 4*z
  scale 6

  texture { Tex_Stone }
}

#declare Small_Column=
union {
  object { Small_Column_part1 translate 3*z }
  object { Round_Cylinder_Union (0, 3*z, 10, 1) }
  object { Round_Cylinder_Union (51*z, 54*z, 10, 1) }

  scale 0.01

  translate 0.1*z
  texture { Tex_Stone }
}

#declare Large_Column=
union {
  object { Round_Cylinder_Merge (0.7*z, 0.8*z, 0.22, 0.02) }

  cylinder { 0.75*z, 3*z, 0.2 }
  object { Round_Box_Union (<-0.23,-0.23,-0.1>, <0.23,0.23,0.15>, 0.02) }
  object { Round_Box_Union (<-0.20,-0.20,0.00>, <0.20,0.20,0.70>, 0.02) }
  object { Round_Box_Union (<-0.23,-0.23,0.58>, <0.23,0.23,0.70>, 0.02) }
  object { Round_Box_Union (<-0.26,-0.26,0.64>, <0.26,0.26,0.74>, 0.02) }

  torus { 0.2, 0.06 rotate 90*x translate 2.74*z }

  object { Round_Box_Union (<-0.26,-0.26,2.80>, <0.26,0.26,2.88>, 0.01) }

  texture { Tex_Stone }
}

#declare Balustrade=
union {
  object { Round_Box_Union (<0.0,-0.15,0>, <5,0.15,0.1>, 0.02) }
  object { Round_Box_Union (<0.0,-0.15,0.64>, <5,0.15,0.74>, 0.02) }

  #declare Cnt=0;

  #while (Cnt<10)
    object { Small_Column translate(Cnt*0.5+0.6)*x }
    #declare Cnt=Cnt+1;
  #end

  texture { Tex_Stone }
}

#declare Walls=
union {
  box { <-0.5,-0.5,-1>, <-2,5.5,3.2> }
  box { <-0.5,-0.5,-1>, <5.5,-2,3.2> }

  texture { Tex_Stone }
}

#declare Ceiling_Segment=
union {
  box { <-0.20,-0.20,2.94>, <0.20,0.20,2.98> }
  box { <-0.14,-0.14,2.94>, <0.14,0.14,3.01> }
}

#declare Ceiling=
union {
  box { <5.6,5.6,3.04>, <-2,-2,3.5> }

  union {
    object { Round_Box_Union (<0.0,-0.26,3.1>, <6,0.26,2.88>, 0.02) rotate 180*z }
    object { Round_Box_Union (<0.0,-0.26,3.1>, <6,0.26,2.88>, 0.02) rotate -90*z }
    translate <5,5,0>
  }

  difference {
    box { <5.0,5.0,2.95>, <-2,-2,3.5> }
    object { Ceiling_Segment translate <4.44,4.44,0> }
    object { Ceiling_Segment translate <4.44,3.94,0> }
    object { Ceiling_Segment translate <3.94,4.44,0> }
    object { Ceiling_Segment translate <3.94,3.94,0> }
    object { Ceiling_Segment translate <4.44,3.44,0> }
    object { Ceiling_Segment translate <3.44,4.44,0> }
    object { Ceiling_Segment translate <3.94,3.44,0> }
    object { Ceiling_Segment translate <3.44,3.94,0> }
    object { Ceiling_Segment translate <4.44,2.94,0> }
    object { Ceiling_Segment translate <2.94,4.44,0> }
  }

  texture { Tex_Stone }
}

#declare Base=
union {
  box { <5.4,5.4,0>, <0,0,-1> texture { Tex_Floor } }
  box { <6,6,-1>, <0,0,-2> }

  texture { Tex_Stone }
}

object { Balustrade rotate 180*z translate <5,5,0> }
object { Balustrade rotate -90*z translate <5,5,0> }
object { Large_Column translate <5,5,0> }
object { Base }
object { Walls }
object { Ceiling }

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/