1 // This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
2 // To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
3 // letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
5 //oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo//
7 // Windows users: to start rendering this image, press Alt+G or the 'Run' //
8 // button on the toobar. //
10 // Experienced windows users: try right-clicking on the line below ... //
13 // +w800 +h600 +a0.3 +am2
15 // See the docs for full explanations of new features such as the above. //
17 //oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo//
19 // Persistence Of Vision raytracer sample file.
20 // Copyright 2001 Fabien Mosen
22 // Updated: 2013/02/15 for 3.7
25 global_settings{ assumed_gamma 1.3 max_trace_level 5}
28 #
include "functions.inc"
32 camera{ location <20,40,28>
33 angle 40 // direction 2*z
34 right x*image_width
/image_height
// keep proportions with any aspect ratio
38 light_source {<-140,200, 300> rgb <1.0, 1.0, 0.95>*1.5}
39 light_source {< 140,200,-300> rgb <0.9, 0.9, 1.00>*0.9 shadowless}
41 #
declare r1
= seed(0);
43 //----------------------- THE TABLE
48 [0.00, rgb <0.01, 0.59, 0.81>]
49 [0.70, rgb <0.01, 0.59, 0.81>]
50 [0.70, rgb <0.98, 0.98, 0.87>]
51 [1.00, rgb <0.98, 0.98, 0.87>]
59 [0.00, rgb <0.35, 0.58, 0.88>*1.0]
60 [0.25, rgb <0.35, 0.58, 0.88>*1.1]
61 [0.50, rgb <0.35, 0.58, 0.88>*0.9]
62 [0.75, rgb <0.35, 0.58, 0.88>*1.0]
63 [1.00, rgb <0.35, 0.58, 0.88>*0.8]
79 warp {turbulence .05 octaves 2}
81 normal {quilted 0.6 scale 0.025 warp {turbulence 0.05 octaves 2}}
89 //----------------------- BISCUITS
90 #
declare Tex_Biscuit
=
92 pigment {color rgb <0.98, 0.83, 0.58>}
93 normal {dents 1.2 scale 0.01}
94 finish {phong 0 brilliance 0.7}
97 #
declare Base_Biscuit
=
103 sphere {<4,0,0>, 1+rand(r1
)*0.1, 1 rotate y*I
}
104 #
declare I
= I
+(360/28);
107 cylinder {<0,0,0>, <0,0.5,0>, 4}
108 texture {Tex_Biscuit
}
114 cone {<0,0,0>, 4.2, <0,0.4,0>, 4}
115 cone {<0,0.1,0>, 3.6, <0,0.401,0>, 3.75}
120 clipped_by {torus {3.55+0.1, 0.1 translate y*0.1}}
125 cylinder {<-4,0.1,I
>,<4,0.1,I
>, 0.05}
128 clipped_by {cone {<0,0,0>, 4.2, <0,0.4,0>, 4}}
130 torus {3.96, 0.04 translate y*0.4}
131 torus {3.79, 0.04 translate y*0.4}
135 object{Povray_Logo_Prism
rotate x*90 scale 2.2 translate -0.3*z}
142 #
declare Pos
= <-2+rand(r1
)*4, 0, -2+rand(r1
)*4>;
143 #
if (inside
(LogoFun
,Pos
))
144 sphere {Pos
, 0.08, 1}
146 #
declare I
= I
+0.0002;
150 #
declare Black_Chocolate
=
152 pigment {color rgb <0.24, 0.10, 0.03>}
153 normal {wrinkles 0.2}
154 finish {specular 0.3}
156 #
declare Milk_Chocolate
=
158 pigment {color rgb <0.48, 0.26, 0.13>}
159 normal {wrinkles 0.2}
160 finish {specular 0.2}
162 #
declare White_Chocolate
=
164 pigment {color rgb <0.96, 0.95, 0.75>}
165 normal {wrinkles 0.2}
166 finish {ambient 0.3 specular 0.01}
169 #
declare Icing
= texture {
170 pigment {rgbf <0.95, 0.95, 1.00, 0.1>*1.2}
176 object {Base_Biscuit
}
177 object {Chocolate
translate y*0.5 texture {Black_Chocolate
}}
181 texture {Black_Chocolate
} normal {bumps 0.3 scale 0.05}
183 object {ProjLogo
scale 1.5 rotate y*-90 translate <-0.4,0.6,0.5> texture {Icing
}}
188 object {Base_Biscuit
}
189 object {Chocolate
translate y*0.5 texture {Milk_Chocolate
}}
193 texture {Milk_Chocolate
} normal {bumps 0.3 scale 0.05}
195 object {ProjLogo
scale 1.5 rotate y*-90 translate <-0.4,0.6,0.5> texture {White_Chocolate
}}
200 object {Base_Biscuit
}
201 object {Chocolate
translate y*0.5 texture {White_Chocolate
}}
205 texture {White_Chocolate
} normal {bumps 0.3 scale 0.05}
207 object {ProjLogo
scale 1.5 rotate y*-90 translate <-0.4,0.6,0.5> texture {Milk_Chocolate
}}
211 object {Biscuit_2
rotate y*-80 translate <-3.5,0,2>}
212 object {Biscuit_1
rotate y*-120 translate <3.5,0,-4>}
213 object {Biscuit_3
rotate x*-4 translate <8.5,0.9,0>}
215 #macro SevenBiscuits
(Bisc
,Num
)
219 object {Bisc
translate x*9 rotate y*60*I
}
226 //----------------------- CRUMBS
227 #
declare Fun_Sphere
= function
{x*x + y*y +z*z}
231 function
{Fun_Sphere
(x,y,z) + f_noise3d
(x*2,y*2,z*2)*1}
236 contained_by
{box {-1,1}}
240 #
declare r1
= seed(0);
247 scale 0.2+rand(r1
)*0.3
248 translate <rand(r1
)*10,0,rand(r1
)*10>
249 texture {Tex_Biscuit
}
254 scale 0.1+rand(r1
)*0.15
255 translate <rand(r1
)*10,0,rand(r1
)*10>
256 texture {Tex_Biscuit
}
261 //----------------------- METAL BOX
266 [0, rgb <0.1, 0.5, 0.7>]
267 [1, rgb <0.7, 0.6, 0.4>]
276 [0, rgb <1.0, 0.5, 0.6>]
277 [1, rgb <0.0, 0.0, 0.0>]
282 #
declare MetalBoxPig
=
293 #
declare BiscuitBox
=
296 cylinder {<0,0,0>, <0,5,0>, 14}
297 cylinder {<0,0.1,0>, <0,5.1,0>, 13.9}
299 torus {14, 0.1 translate y*5}
300 torus {14, 0.1 translate y*0.1}
301 torus {14, 0.1 scale <1,2,1> translate y*4}
303 <0,0.3,0>,<0,3.5,0>, 14.01 open
304 pigment {MetalBoxPig
}
305 finish {phong 0.8 reflection {0.01, 0.15}}
308 finish {phong 0.8 metallic reflection {0.5, 0.7}}
313 object {SevenBiscuits
(Biscuit_1
,6)}
314 object {SevenBiscuits
(Biscuit_3
,6) rotate y*30 translate y*1}
315 object {SevenBiscuits
(Biscuit_2
,5) rotate y*0 translate y*2}
316 rotate y*-75 translate <-18,0,-12>
319 //-----------------------CUP OF TEA
323 cylinder {<0,1.2,0>, <0,6,0>, 4.2}
324 cylinder {<0,1,0>, <0,6.2,0>, 3.8}
328 cylinder {<0,0.2,0>, <0,2.5,0>, 4}
329 torus {2.8, 1 translate y*2.5}
330 torus {4, 1 translate y*0}
331 cylinder {<0,1.5,0>, <0,2.6,0>, 2.8}
335 #
declare LiquidLevel
= 5;
336 cylinder {<0,1.4,0>, <0,LiquidLevel
,0>, 4}
337 torus {3.6, 0.2 translate y*LiquidLevel
}
338 cylinder {<0,LiquidLevel
-0.2,0>,<0,LiquidLevel
+0.3,0>,3.6}
339 pigment {Orange
*0.8 filter 0.6}
340 finish {phong 0.7 reflection 0.15}
341 normal {bumps 0.05 scale 1}
344 torus {4.0, 0.2 translate y*6.0}
345 torus {4.0, 0.2 translate y*1.2}
346 torus {2.8, 0.2 translate y*0.2}
350 cylinder {<0.2,0,0>,<-0.2,0,0>,0.5}
351 torus {0.5, 0.2 rotate z*90 translate x*0.2}
355 cylinder {<0.2,0,0>,<-0.2,0,0>,0.5}
356 torus {0.5, 0.2 rotate z*90 translate x*0.2}
359 torus {1.25, 0.3 rotate x*90 clipped_by {plane {x,0 inverse}} translate x*0.8}
360 cylinder {<0,-1.25,0>,<0.8,-1.25,0>,0.3}
361 cylinder {<0,1.25,0>,<0.8,1.25,0>,0.3}
362 scale <1,1,1.5> translate <4.2,4,0> rotate y*-90
366 normal {bumps 0.05 scale 3}
367 finish {phong 0.8 reflection 0.1}
370 object {TeaCup
rotate y*50 translate <4,0,-14>}