File: benchmark.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 (1240 lines) | stat: -rw-r--r-- 24,585 bytes parent folder | download | duplicates (6)
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
// This work is licensed under the POV-Ray v3.7 distribution license.
// To view a copy of this license, visit http://www.povray.org/licences/v3.7/.
//
// The following exception is granted to the above license terms:
// Permission is granted for this file and the output from it to be
// freely redistributed in an unmodified form for the purpose of
// generating and maintaining POV-Ray benchmarks.  Derivative works
// are permitted provided that they have a clearly different filename
// and do not claim to be the standard benchmark file.
//

// Persistence Of Vision Ray Tracer Scene Description File
//
// File:            benchmark.pov
// Benchmark Vers:  2.01 Scene File Version
// Desc:            POV-Ray benchmark scene
// Date:            October/November 2001
//
// Assembled by Christoph Hormann
// Contributions by:
//    - Ingo Janssen
//    - Mick Hazelgrove
//
// ==================================================================
//
//    Standard POV-Ray benchmark version 2.01 Scene File Version
//
// This is the official POV-Ray benchmark scene.  It is designed
// to test a variety of POV-Ray features and should render in a
// reasonable amount of time on current machines.  Note that the
// radiosity feature is still experimental and not very suitable for
// comparing results of different versions, therefore it is turned
// off by default.
//
// Please log all changes made to this file below.
//
// Note that only results generated with the above options and the
// unchanged scene file are allowed to be published as 'official
// POV-Ray benchmark results'.  Feel free to do additional tests, but
// make sure the differences are made clear when publishing them.
//
// When publishing results, be sure to quote the exact version of the
// benchmark scene used (2.01 Scene File Version), and the exact
// version of POV-Ray.
//
// ==================================================================
//
// Change history
// --------------
//
// Nov. 2001   Initial release (version 3.5.0)
// Jan. 2002   using 'max()' instead of '&' in isosurface
// Apr. 2002   changed max_gradient of isosurface (new ver is 1.01)
// Jun. 2002   added photons pass_through to clouds (new ver is 1.02)
// Dec. 2010   made ready for v3.7 release (new ver is 2.00)
// Oct. 2012   allow run without installation (same ver : 2.00)
// Jan. 2013   change version to 2.01 to differentiate from beta.
// Feb  2013   Updated for 3.7
//
// ==================================================================
//
// Suggested command line options if not using an INI file:
//
// -w512 -h512 +a0.3 +v -d -f -x
//
// The following INI options are used when the 'Run Benchmark' command
// is chosen on versions of POV-Ray that support the built-in version.
//
// All_Console=On
// All_File=
// Antialias_Depth=3
// Antialias=On
// Antialias_Gamma=2.5
// Antialias_Threshold=0.3
// Bits_Per_Color=8
// Bounding=On
// Bounding_Method=1
// Bounding_Threshold=3
// Clock=0
// Continue_Trace=Off
// Clockless_Animation=off
// Cyclic_Animation=Off
// Debug_Console=On
// Display=Off
// Display_Gamma=2.2
// Dither=off
// End_Column=1
// End_Row=1
// Fatal_Console=On
// Fatal_Error_Command=
// Fatal_Error_Return=I
// Field_Render=Off
// Final_Clock=1
// Final_Frame=1
// Grayscale_Output=off
// Height=512
// High_Reproducibility=off
// Initial_Clock=0
// Initial_Frame=1
// Include_Header=
// Input_File_Name=benchmark.pov
// Jitter_Amount=0.3
// Jitter=On
// Light_Buffer=On
// Odd_Field=Off
// Output_Alpha=Off
// Output_File_Name=
// Output_File_Type=n
// Output_To_File=Off
// Palette=3
// Pause_When_Done=Off
// Post_Frame_Command=
// Post_Frame_Return=I
// Post_Scene_Command=
// Post_Scene_Return=I
// Preview_End_Size=1
// Preview_Start_Size=1
// Pre_Frame_Command=
// Pre_Frame_Return=I
// Pre_Scene_Command=
// Pre_Scene_Return=I
// Quality=9
// Radiosity_From_File=off
// Radiosity_To_File=off
// Radiosity_Vain_Pretrace=on
// Real_Time_Raytracing=off
// Remove_Bounds=On
// Render_Block_Size=16
// Render_Block_Step=0
// Render_Console=On
// Render_Pattern=0
// Sampling_Method=1
// Split_Unions=Off
// Start_Column=0
// Start_Row=0
// Statistic_Console=On
// Subset_End_Frame=1
// Subset_Start_Frame=1
// Test_Abort_Count=0
// Test_Abort=Off
// User_Abort_Command=
// User_Abort_Return=I
// Verbose=On
// Version=3.7
// Warning_Console=On
// Width=512
//
// ==================================================================

#version 3.7;
global_settings{ assumed_gamma 1.0 }

#default { texture { finish { ambient 0 diffuse 1 }}}

//#include "functions.inc"
//#include "colors.inc"
//#include "logo.inc"

#declare use_radiosity = false;

#declare use_photons = true;
#declare use_area_light = true;

#declare show_clouds = true;
#declare show_objects = true;

#declare Rad = 50000;

global_settings {
   max_trace_level 12
   assumed_gamma 1.0

   #if (use_radiosity=true)

      radiosity {
         pretrace_start 0.08
         pretrace_end 0.01
         count 80

         nearest_count 5
         error_bound 0.5
         recursion_limit 1

         low_error_factor .5
         gray_threshold 0.0
         minimum_reuse 0.015
         brightness 0.7

         adc_bailout 0.01/2

         normal on
      }

   #end

   #if (use_photons=true)
      photons { spacing 0.007 }
   #end

}

#if (use_radiosity=false)
   #default {finish {ambient 0.02}}
#else
   #default {finish {ambient 0.00}}
#end

//====================================================================================
// This scene uses a non-standard camera set-up. 
// (See CAMERA in the included documentation for details.) 
// If you are new to POV-Ray, you might want to try a different demo scene.
//====================================================================================
camera {
   location  <3.2, 3.2, 1.8>
   direction y
   sky       z
   up        z
   right    -x*image_width/image_height // keep propotions with any aspect ratio
   // right     -x
   look_at   <-1, -1, 0.9>
   angle     45
}


light_source {
   <-0.7, 0.83, 0.24>*150000
   color rgb <3.43,2.87,1.95>
   #if (use_area_light=true)
      area_light 4000*x 4000*y  4,4
      jitter
      orient
      circular
   #end

   media_attenuation on
   media_interaction on

   photons {
      reflection on
      refraction on
   }
}

#if (use_radiosity=false)
   light_source {
      <0.9, -0.6, 0.5>*150000
      color rgb 0.35

      shadowless
   }
#end

fog{
   fog_type 2
   fog_alt 1.5
   fog_offset 0
   color rgbt <0.75, 0.80, 0.86, 0.2>
   distance 400
   up z
}


//====================================================================================

// Copied from functions.inc for Oct 2012
#declare f_ridged_mf = function { internal(59) }
// Parameters: x, y, z
    // Six extra parameters required:                          
    // 1. H 
    // 2. Lacunarity 
    // 3. octaves
    // 4. offset 
    // 5. Gain 
    // 6. noise


#declare RMF = function{ f_ridged_mf(x, y, z, 0.07, 2.2,  7, 0.6, 0.9, 1)}

#declare M_Watx4 =
material {
   texture {
      pigment { color rgbt <0.21, 0.20, 0.3, 0.96> }
      finish {
         diffuse 0.0
         ambient 0.0

         reflection {
            0.1, 0.95
            fresnel on
            exponent 0.8
         }

         conserve_energy

         specular 0.1
         roughness 0.007
         metallic
      }
      normal{
         function { RMF(x, y, z) } 0.2
         scale 0.07
      }
   }
   interior {
      ior 1.31
      fade_distance 0.8
      fade_power 1001.0
      fade_color <0.02, 0.20, 0.06>
   }
}

box {              // --- Water ---
   <-1.95,  -1.65, 0.42>, < 1.95,  1.65, -5.5>

   material { M_Watx4 }
   hollow on

   photons { collect off }
}

#declare fn_RMF = function{ f_ridged_mf(x, y, z, 0.1, 3.1, 8 ,0.7, 0.8, 2) }


plane {            // --- floor ---
   z, -0.3

   texture {
      pigment { color rgb <1.0, 0.85, 0.6> }
      finish {
         diffuse 0.7
         specular 0.1
      }
      normal {
         function { fn_RMF(x, y, z) } 0.3
         scale 8
      }
   }

   clipped_by {
      box { <-1.95,  -1.65, 1>, < 1.95,  1.65, -1> inverse }
   }

   photons { collect off }
}


isosurface {
   function {
      z - fn_RMF(x, y, z)*0.07
   }

   max_gradient 1.3

   contained_by { box { <-15, -15, 0.0>, <15, 15, 0.2> } }

   texture {
      pigment { color rgb <1.0, 0.85, 0.6> }
      finish {
         diffuse 0.7
         specular 0.1
      }
   }

   scale 8
   translate -0.16*z

   clipped_by {
      box { <-1.95,  -1.65, 1>, < 1.95,  1.65, -1> inverse }
   }

   photons { collect off }
}


// ====================================================================================



sphere {           // --- Sky ---
   <0, 0, 0>, 1
   texture {
      pigment {
         gradient z
         pigment_map {
            [0.00 color rgb <0.6667, 0.7255, 0.7725>]
            [0.19
               spherical
               color_map {
                  [0.08 color rgb <0.33, 0.37, 0.90> ]
                  [0.14 color rgb <0.3210, 0.53, 0.9259> ]
                  [0.26 color rgb <0.3610, 0.57, 0.9259> ]
                  [0.50 color rgb < 0.880, 0.935, 0.976 > ]
               }
               scale 1.8
               translate <-0.7, 0.7, 0.24>
            ]
         }
      }
      finish {
         diffuse 0
         ambient 1
      }
   }
   scale Rad*<20, 20, 4>
   translate -2*z
   no_shadow
   hollow on

   photons { collect off pass_through }
}

#if (show_clouds)

// from mick

difference {
   sphere { 0,Rad}
   sphere {0,Rad-15000}
   material{
      texture{
         pigment{ rgbf 1 }
         finish {
            ambient 0
            diffuse 0
         }
      }
      interior{
         media{
            scattering {2,<.013,.012,.008>/1.3 extinction 1/1.3 }
            method 3
            samples 7,7
            intervals 1

            density { // one
               wrinkles
               ramp_wave

               noise_generator 1

               color_map {
                  [0 rgb 0]
                  [0.5 rgb 0]
                  [0.7 rgb 0.275]
                  [1 rgb 0.475]
               } // color_map

               scale <10000,9000,5000>/3
               rotate z*29
               translate <1000,0,Rad-30000>
            } // density

            density { // two
               marble
               warp { turbulence 1.65 octaves 7 }
               noise_generator 1

               color_map {
                  [0 rgb 0]
                  [0.4 rgb 0]
                  [0.85 rgb 0.25]
                  [1 rgb 0.5]
               } // color_map

               scale <10000,7500,5000>*5
               rotate z*-25
               translate <0,0,Rad-30000>
            } // density

         } // media
      } // interior
   } // material
   hollow

   rotate z*70
   rotate y*15
   translate <0,0,32000-Rad>
   rotate -102*z

   scale <1,1,0.4>

   photons { collect off pass_through }

} // difference

#end

// ====================================================================================


#declare Metal_Texture =
texture {
   pigment { color rgb <0.65, 0.55, 0.5> }
   finish {
      ambient 0.0
      diffuse 0.15
      specular 0.3
      metallic
      roughness 0.01
      reflection {
         0.8
         metallic
      }
   }
}

#declare Stone_Tex =
texture {
   pigment {
      crackle
      pigment_map {
         [0.03
            bozo
            color_map {
               [0 color rgb <0.2, 0.14, 0.05>]
               [1 color rgb <0.2, 0.14, 0.05>]
            }
            warp { turbulence 0.6 }
         ]
         [0.055
            granite
            color_map {
               [0.0 color rgb <1, 0.95, 0.9>]
               [0.5 color rgb <0.6, 0.5, 0.52>]
               [1.0 color rgb <0.9, 0.8, 0.7>]
            }
            warp { turbulence 0.4 lambda 2.4 octaves 8 }
            scale 0.5
         ]
      }

      warp { turbulence 0.72 lambda 2.25 omega 0.53 octaves 9}

      scale 0.3
   }
   finish {
      diffuse 0.55
      specular 0.1
   }
   normal {
      granite 0.15
      scale 0.06
   }
}

#declare Stone_Tex2 =
texture {
   pigment {
      crackle
      pigment_map {
         [0.03
            bozo
            color_map {
               [0 color rgb <0.1, 0.08, 0.2>]
               [1 color rgb <0.1, 0.08, 0.2>]
            }
            warp { turbulence 0.6 }
         ]
         [0.055
            granite
            color_map {
               [0.0 color rgb <1, 0.95, 0.9>]
               [0.5 color rgb <0.6, 0.5, 0.52>]
               [1.0 color rgb <0.9, 0.8, 0.7>]
            }
            warp { turbulence 0.4 lambda 2.4 octaves 8 }
            scale 1.2
         ]
      }

      warp { turbulence 0.55 lambda 2.25 omega 0.53 octaves 9 }

      scale 0.24
   }
   finish {
      diffuse 0.55
      specular 0.1
   }
   normal {
      granite 0.15
      scale 0.06
   }
}

#declare Stone_Tex3 =
texture {
   pigment {
      agate
      pigment_map {
         [0.3
            crackle
            color_map {
               [0.1 color rgb <0.3, 0.28, 0.4>]
               [0.2 color rgb <0.8, 0.7, 0.4>]
            }
            warp { turbulence 0.5 lambda 2.2 omega 0.52 octaves 8 }
            scale 0.3
         ]
         [0.5
            granite
            color_map {
               [0.0 color rgb <1, 0.95, 0.9>]
               [0.5 color rgb <0.3, 0.6, 0.52>]
               [1.0 color rgb <0.3, 0.8, 0.7>]
            }
            warp { turbulence 0.4 lambda 2.4 octaves 8 }
         ]
      }

      warp { turbulence 0.55 }

      scale 0.24
   }
   finish {
      diffuse 0.55
      specular 0.1
   }
   normal {
      granite 0.15
      scale 0.06
   }
}

#declare Mat_Glass =
material {
   texture {
      pigment { color rgbt 1 }
      finish {
         diffuse 0
         ambient 0
         specular 0.6
         metallic 0.5
         roughness 0.005

         reflection {
            0.05, 0.95
            fresnel on
         }

         conserve_energy
      }
   }
   interior {
      ior 1.5
      fade_distance 0.12
      fade_power 1001
      fade_color <0.6, 0.5, 0.7>
   }
}


#declare Socket =
union {
   difference {
      cylinder { -5*z, -0.04*z, 0.8 }
      cylinder { -6*z, 0, 0.3 }

      #declare Cnt = 0;

      #while (Cnt<360)

         merge {
            cylinder { < 0.0,  0.0, -0.24>, < 1.0,  0.0, -0.24>, 0.1 }
            box { < 0.0,  -0.1, -0.24>, < 1.0,  0.1, -6> }

            rotate Cnt*z
         }

         #declare Cnt = Cnt+30;
      #end
   }

   #declare Cnt = 0;

   #while (Cnt<360)

      union {
         cylinder { < 0.8,  0.0, -0.04>, < 0.8,  0.0, -5>, 0.05 }
         cylinder { < 0.8,  0.0, -0.04>, < 0.8,  0.0, -0.01>, 0.07 }

         rotate 15*z
         rotate Cnt*z
      }

      #declare Cnt = Cnt+30;
   #end

   cylinder { -0.04*z, 0, 0.86 }
   torus {
      0.83, 0.03
      rotate 90*x
   }
}

#declare Pos1 = < 0.0,  0.0, 0.6>;
#declare Pos2 = <-2.4, -0.8, 1.0>;
#declare Pos3 = <-1.4, -2.8, 1.3>;
#declare Pos4 = < 1.4,  0.6, 0.5>;

#declare Pos5 = <-10, -5, 1.5>;

object { Socket translate Pos1 texture { Stone_Tex } }

object { Socket translate Pos2 texture { Stone_Tex } }

object { Socket scale 0.8 translate Pos3 texture { Stone_Tex } }

object { Socket scale 0.4 translate Pos4 texture { Stone_Tex } }

object { Socket scale 2 translate Pos5 texture { Stone_Tex } }

difference {
   box { <-2.0,  -1.7, 0.5>, < 2.0,  1.7, -6> }
   box { <-1.9,  -1.6, 1.0>, < 1.9,  1.6, -5> }

   texture {
      Stone_Tex2
   }
}

#if (show_objects)

#declare POV_Text =
text {
   //ttf "timrom.ttf"
   internal 1
   "POV-Ray"
   0.25,0
   scale 0.3
   rotate 90*x
   rotate -90*z
}

#declare Version_Text =
text {
   //ttf "timrom.ttf"
   internal 1
   "Version 3.7"
   0.25,0
   scale 0.3
   rotate 90*x
   rotate -90*z
}

object {
   POV_Text
   translate <-1.97,  0.995, 0.575>
   texture { Stone_Tex2 }
}

object {
   Version_Text
   rotate 90*z
   translate <-0.5, -1.5, 0.575>
   texture { Stone_Tex2 }
}

#end


height_field {

   function 300,300 {
      pigment {
         function { 1-(min(pow(x*x + y*y, 0.25), 1) -0.0001) }

         color_map {
            [0.0 rgb 0.0]
            [1.0 rgb 1.0]
         }

         translate <0.5,0.5,0>

         scale 0.45

         warp { turbulence 0.455 }

         scale 3
         warp { turbulence 0.2 lambda 2.2 octaves 8 }
         scale 1/3

      }
   }

   water_level 0.02

   rotate 90*x

   rotate 43*z

   scale <5, 5, 1.3>
   scale 2.6

   texture {
      pigment {
         bozo
         color_map {
            [0.40 color rgb <0.6, 0.6, 0.7>*0.6]
            [0.58 color rgb <0.9, 0.6, 0.3>*0.6]
            [0.62 color rgb <0.2, 0.6, 0.1>*0.4]
         }
         warp { turbulence 0.4 }
         scale <0.2, 0.2, 3>
      }
      finish {
         diffuse 0.6
         specular 0.2
      }
   }

   translate <-18, -13, -0.4>
}


#if (show_objects)

// ---------- Pos1 ----------

difference {
   cylinder { -0.0*z, 0.15*z, 0.7 }
   cylinder { -0.1*z, 0.25*z, 0.68 }

   texture { Metal_Texture }

   translate 0.6*z

   photons { target reflection on }
}

#declare fn_pigm =
function {
   pigment {
      bozo
      poly_wave 2
      color_map {
         [0 rgb 0][1 rgb 1]
      }
      warp {  turbulence 0.4 lambda 2.3 omega 0.52 }

      scale 0.2
   }
}


isosurface {
   function {
      (max(sqrt(x*x + y*y)-0.25, z-0.7))

      - fn_pigm(x, y, z).gray*0.07

   }

   max_gradient 2.4

   contained_by { box { <-0.35, -0.35, 0.0>, <0.35, 0.35, 0.8> } }

   texture {
      pigment { color rgb <1, 0.45, 0.2> }
      finish {
         diffuse 0.6
         specular 0.2
      }
   }

   translate Pos1
}

// Copied from logo.inc for Oct 2012
// The original version is made of various objects.
#declare Povray_Logo =
merge {
   sphere {2*y, 1}
   difference {
      cone {2*y, 1, -4*y, 0}
      sphere {2*y, 1.4 scale <1,1,2>}
   }
   difference {
      sphere {0, 1 scale <2.6, 2.2, 1>}
      sphere {0, 1 scale <2.3, 1.8, 2> translate <-0.35, 0, 0>}
      rotate z*30 translate 2*y
   }
   rotate <0, 0, -25>
   translate <-0.5,-0.35,0>
   scale 1/4
}


object {
   Povray_Logo

   rotate 90*x
   scale 0.4
   translate -0.2*y

   texture {
      pigment { color rgb <0.65, 0.55, 0.9> }
      finish {
         ambient 0.0
         diffuse 0.15
         specular 0.3
         metallic
         roughness 0.01
         reflection {
            0.8
            metallic
         }
      }
      normal {
         bumps 0.3
         scale 0.3
      }
   }

   rotate -25*z

   translate 0.96*z

   translate Pos1
}

#end

#if (show_objects)

// ---------- Pos2 ----------

#declare rd = seed(45);

union {

   #declare Cnt = 0;

   #while (Cnt<360)

      superellipsoid {
         <rand(rd)*2, rand(rd)*2>
         texture { Metal_Texture }
         scale 0.12
         translate <0.6, 0.0, 0.12>
         rotate (Cnt+30)*z
      }

      julia_fractal {
         < rand(rd), rand(rd)*0.6, -0.54, 0.2 >
         quaternion
         max_iteration 7
         precision 500
         scale 0.12
         translate <0.6, 0.0, 0.1>
         rotate Cnt*z

         texture {
            pigment { color rgb <1, 0.4, 0.8> }
            finish {
               ambient 0
               diffuse 0.6
               specular 0.2
               reflection 0.2
            }
         }
      }

      #declare Cnt = Cnt+60;
   #end

   translate Pos2
}

#end

#if (show_objects)

// ---------- Pos3 ----------

sphere {
   0, 0.24

   translate 0.24*z

   material { Mat_Glass }

   photons { target reflection on refraction on }

   translate Pos3
}

#end

#if (show_objects)


// ---------- Pos4 ----------


// from ingo

#declare Letter =
text {
   //ttf "timrom.ttf"
   internal 1
   "X"
   1,0
   scale <1/0.7,1/0.66,1>
   translate <0,0,-0.5>
}

#declare xPigm =
function {
   pigment {
      object {
         Letter
         pigment {rgb 1}
         pigment {rgb 0}
      }
      warp {repeat x}
      warp {repeat y}
      scale 1.00002
      translate < 0.000001,-0.00001, 0>
   }
}

#declare XsinPigm =
function {
   pigment {
      function {xPigm(sin(x),pow(sin(y),2),z).gray}
   }
}

#declare Fn_Obj =
difference {
   cylinder {
      -2*y, 2*y, 2
      pigment {
         function{XsinPigm(x,y,z).gray}
         warp {planar}
         scale <0.5/pi, 1, 1>*0.5
         warp {
            cylindrical
            orientation z
            dist_exp 1
         }
         colour_map {
            [0, rgb 1]
            [1, rgbf 1]
         }
      }
      finish {
        diffuse 0.6
        specular 0.4
      }
   }
   cylinder {
      -1.9*y, 2.1*y, 1.9
      pigment {rgbf 1}
      finish {
        diffuse 0.6
        specular 0.4
      }
   }

   translate 1.96*y
   rotate 90*x
   scale 0.12
}

object {
   Fn_Obj
   translate Pos4
}

#end


#if (show_objects)


// ---------- Pos5 ----------


// from ingo

#macro BuildWriteMesh2(VecArr, NormArr, UVArr, U, V)

   #debug concat("\n\n Building mesh2: \n   - vertex_vectors\n")
   #local NumVertices = dimension_size(VecArr,1);
   mesh2 {
      vertex_vectors {
         NumVertices
         #local I = 0;
         #while (I<NumVertices)
            VecArr[I]
            #local I = I+1;
         #end
      }

      #debug concat("   - normal_vectors\n")
      #local NumVertices = dimension_size(NormArr,1);
      normal_vectors {
         NumVertices
         #local I = 0;
         #while (I<NumVertices)
            NormArr[I]
            #local I = I+1;
         #end
      }

      #debug concat("   - uv_vectors\n")
      #local NumVertices = dimension_size(NormArr,1);
      uv_vectors {
         NumVertices
         #local I = 0;
         #while (I<NumVertices)
            UVArr[I]
            #local I = I+1;
         #end
      }

      #debug concat("   - face_indices\n")
      #declare NumFaces = U*V*2;
      face_indices {
         NumFaces
         #local I = 0;
         #local H = 0;
         #while (I<V)
            #local J = 0;
            #while (J<U)
               #local Ind = (I*U)+I+J;
               <Ind, Ind+1, Ind+U+2>, <Ind, Ind+U+1, Ind+U+2>
               #local J = J+1;
               #local H = H+1;
            #end
            #local I = I+1;
         #end
      }
   }
#end

#macro FnA(X)
   #if (X<0.13)
      0.5+sin(X*14)*0.4
   #else
      0.5+sin((X-0.13)*7.2)*0.3
   #end
#end


// Build a two-dimensional array with vectors and normals retrieved from a function macro
// ResSpl: the amount of vectors to get from the macro
// based on ingo's code for splines

#macro L_GetVN(ResSpl)
   #local I = 0;
   #local A = array[ResSpl+1][2]
   #while (I<=ResSpl)
      #local P0 = 0+<FnA(I/ResSpl), I/ResSpl, 0>;
      #if (P0.x=0 & P0.z=0)
         #local P0 = <1e-25,P0.y,1e-25>;
      #end
      #if (I=0)
         #local P1 = 0+<FnA(((I-0.5)/ResSpl)), I/ResSpl, 0>;
         #local P2 = 0+<FnA(((I+0.5)/ResSpl)), I/ResSpl, 0>;
      #else
         #local P1 = P2;
         #local P2 = 0+<FnA(((I+0.5)/ResSpl)), I/ResSpl, 0>;
      #end
      #local P3 = vrotate(P0,<0,1,0>);
      #local P4 = vrotate(P0,<0,-1,0>);
      #local B1 = P4-P0;
      #local B2 = P2-P0;
      #local B3 = P3-P0;
      #local B4 = P1-P0;
      #local N1 = vcross(B1,B2);
      #local N2 = vcross(B2,B3);
      #local N3 = vcross(B3,B4);
      #local N4 = vcross(B4,B1);
      #local N = vnormalize((N1+N2+N3+N4)*-1);
      #local A[I][0] = P0;
      #local A[I][1] = N;
      #local I = I+1;
   #end
   A
#end

#macro FnLathe (Rot, ResRot, ResSpl)
   #declare VNArr = L_GetVN (ResSpl)
   #local VecArr = array[(ResRot+1)*(ResSpl+1)]
   #local NormArr = array[(ResRot+1)*(ResSpl+1)]
   #local UVArr = array[(ResRot+1)*(ResSpl+1)]
   #local R = Rot/ResRot;
   #local Dim = dimension_size(VNArr,1);
   #local Count = 0;
   #local I = 0;
   #while (I<=ResRot)
      #local J = 0;
      #while (J<Dim)
         #local VecArr[Count] = vrotate(VNArr[J][0],<0,R*I,0>);
         #local NormArr[Count] = vrotate(VNArr[J][1],<0,R*I,0>);
         #local UVArr[Count] = <I/ResRot,J/(Dim-1)>;
         #local J = J+1;
         #local Count = Count+1;
      #end
      #local I = I+1;
   #end
   BuildWriteMesh2(VecArr, NormArr, UVArr, ResSpl, ResRot)
#end


#declare MSH = FnLathe(360, 100, 100)

#declare Obj_Msh =
object {
   MSH

   uv_mapping

   texture {
      pigment{
         checker
         color rgb <1.0, 0.7, 0.5>,
         color rgb <0, 0, 0.15>

         scale 0.05
      }
      finish {
         diffuse 0.7
         specular 0.3
      }
   }

   rotate 90*x
   scale <1.9, 1.9, 2.8>


   translate Pos5
}


object { Obj_Msh }


#end