Rigify: store advanced options in armature instead of window manager.
[blender-addons.git] / render_povray / templates_pov / biscuit.pov
blobffd2eee349d60a143041249393636086042b2914
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//
6 // //
7 // Windows users: to start rendering this image, press Alt+G or the 'Run' //
8 // button on the toobar. //
9 // //
10 // Experienced windows users: try right-clicking on the line below ... //
11 // //
12 // +w320 +h240
13 // +w800 +h600 +a0.3 +am2
14 // //
15 // See the docs for full explanations of new features such as the above. //
16 // //
17 //oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo//
19 // Persistence Of Vision raytracer sample file.
20 // Copyright 2001 Fabien Mosen
21 //
22 // Updated: 2013/02/15 for 3.7
23 //
24 #version 3.6;
25 global_settings{ assumed_gamma 1.3 max_trace_level 5}
27 #include "colors.inc"
28 #include "functions.inc"
29 #include "logo.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
35 look_at <0,2,0>
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
44 #declare Pig_1 =
45 pigment {
46 gradient z
47 color_map {
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>]
53 frequency 4
55 #declare Pig_2 =
56 pigment {
57 bozo
58 color_map {
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]
65 scale 0.1
68 #declare Nappe =
69 cylinder {0,y*-1,50
70 texture {
71 pigment {
72 gradient x
73 pigment_map {
74 [0.0, Pig_1]
75 [0.5, Pig_1]
76 [0.5, Pig_2]
77 [1.0, Pig_2]
79 warp {turbulence .05 octaves 2}
81 normal {quilted 0.6 scale 0.025 warp {turbulence 0.05 octaves 2}}
82 scale 5
83 translate 10
87 object {Nappe}
89 //----------------------- BISCUITS
90 #declare Tex_Biscuit =
91 texture {
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 =
98 union {
99 blob {
100 threshold 0.7
101 #declare I = 0;
102 #while (I < 359)
103 sphere {<4,0,0>, 1+rand(r1)*0.1, 1 rotate y*I}
104 #declare I = I+(360/28);
105 #end
107 cylinder {<0,0,0>, <0,0.5,0>, 4}
108 texture {Tex_Biscuit}
111 #declare Chocolate =
112 union {
113 difference {
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}
117 torus {
118 3.55, 0.1
119 translate y*0.2
120 clipped_by {torus {3.55+0.1, 0.1 translate y*0.1}}
122 union {
123 #declare I = -4;
124 #while (I < 4)
125 cylinder {<-4,0.1,I>,<4,0.1,I>, 0.05}
126 #declare I = I+0.5;
127 #end
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}
134 #declare LogoFun =
135 object{Povray_Logo_Prism rotate x*90 scale 2.2 translate -0.3*z}
137 #declare ProjLogo =
138 blob {
139 threshold 0.6
140 #declare I = 0;
141 #while (I < 1)
142 #declare Pos = <-2+rand(r1)*4, 0, -2+rand(r1)*4>;
143 #if (inside(LogoFun,Pos))
144 sphere {Pos, 0.08, 1}
145 #end
146 #declare I = I+0.0002;
147 #end
150 #declare Black_Chocolate =
151 texture {
152 pigment {color rgb <0.24, 0.10, 0.03>}
153 normal {wrinkles 0.2}
154 finish {specular 0.3}
156 #declare Milk_Chocolate =
157 texture {
158 pigment {color rgb <0.48, 0.26, 0.13>}
159 normal {wrinkles 0.2}
160 finish {specular 0.2}
162 #declare White_Chocolate =
163 texture {
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}
171 normal {bumps 0.1}
174 #declare Biscuit_1 =
175 union {
176 object {Base_Biscuit}
177 object {Chocolate translate y*0.5 texture {Black_Chocolate}}
178 disc {
179 <0,0.101,0>, y, 3.6
180 translate y*0.5
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}}
184 translate y*0.5
186 #declare Biscuit_2 =
187 union {
188 object {Base_Biscuit}
189 object {Chocolate translate y*0.5 texture {Milk_Chocolate}}
190 disc {
191 <0,0.101,0>, y, 3.6
192 translate y*0.5
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}}
196 translate y*0.5
198 #declare Biscuit_3 =
199 union {
200 object {Base_Biscuit}
201 object {Chocolate translate y*0.5 texture {White_Chocolate}}
202 disc {
203 <0,0.101,0>, y, 3.6
204 translate y*0.5
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}}
208 translate y*0.5
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)
216 union {
217 #declare I = 0;
218 #while (I < Num)
219 object {Bisc translate x*9 rotate y*60*I}
220 #declare I = I+1;
221 #end
222 object {Bisc}
224 #end
226 //----------------------- CRUMBS
227 #declare Fun_Sphere = function {x*x + y*y +z*z}
229 #declare Crumb =
230 isosurface {
231 function {Fun_Sphere(x,y,z) + f_noise3d(x*2,y*2,z*2)*1}
232 threshold 1
233 max_gradient 3.9
234 //max_gradient 15
235 accuracy 0.01
236 contained_by {box {-1,1}}
237 scale 0.5
240 #declare r1 = seed(0);
242 #declare I = 0;
243 #while (I < 1)
244 object {
245 Crumb
246 rotate rand(r1)*360
247 scale 0.2+rand(r1)*0.3
248 translate <rand(r1)*10,0,rand(r1)*10>
249 texture {Tex_Biscuit}
251 object {
252 Crumb
253 rotate rand(r1)*360
254 scale 0.1+rand(r1)*0.15
255 translate <rand(r1)*10,0,rand(r1)*10>
256 texture {Tex_Biscuit}
258 #declare I = I+0.03;
259 #end
261 //----------------------- METAL BOX
262 #declare Pig3 =
263 pigment {
264 gradient y
265 color_map {
266 [0, rgb <0.1, 0.5, 0.7>]
267 [1, rgb <0.7, 0.6, 0.4>]
269 scale 0.5
272 #declare Pig4 =
273 pigment {
274 crackle
275 color_map {
276 [0, rgb <1.0, 0.5, 0.6>]
277 [1, rgb <0.0, 0.0, 0.0>]
279 scale 0.2
282 #declare MetalBoxPig =
283 pigment {
284 radial frequency 60
285 pigment_map {
286 [0.0, Pig3]
287 [0.5, Pig3]
288 [0.5, Pig4]
289 [1.0, Pig4]
293 #declare BiscuitBox =
294 union {
295 difference {
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}
302 cylinder {
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}}
307 pigment {Gray60}
308 finish {phong 0.8 metallic reflection {0.5, 0.7}}
311 union {
312 object {BiscuitBox}
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
320 #declare TeaCup =
321 union {
322 difference {
323 cylinder {<0,1.2,0>, <0,6,0>, 4.2}
324 cylinder {<0,1,0>, <0,6.2,0>, 3.8}
327 difference {
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}
334 difference {
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}
348 union {
349 difference {
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}
352 translate y*1.25
354 difference {
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}
357 translate y*-1.25
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
365 pigment {White}
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>}