1// Persistence Of Vision Ray Tracer Scene Description File
2// File: crackle2.pov
3// Vers: 3.5
4// Desc: crackle pattern demonstration scene
5// Date: April 2001
6// Auth: Christoph Hormann
7
8// -w400 -h200
9// -w512 -h256 +a0.3
10
11#version 3.5;
12
13#include "colors.inc"
14
15global_settings {
16   assumed_gamma 1
17}
18
19light_source {
20   <1.6, 1.9, 2.7>*10000
21   rgb 1.3
22}
23
24camera {
25   location    <7, 24, 12>
26   direction   y
27   sky         z
28   up          z
29   right       2.0*x
30   look_at     <0.0, 0, 0.3>
31   angle       30
32}
33
34
35sphere {
36   <0, 0, 0>, 1
37   texture {
38      pigment {
39         color rgb < 0.60, 0.70, 0.95 >
40      }
41      finish {
42         diffuse 0
43         ambient 1
44      }
45   }
46   scale 100000
47   no_shadow
48   hollow on
49}
50
51plane {
52   z, 0
53
54   texture {
55      pigment {
56         crackle
57         color_map {
58            [ 0.0 color rgb<0.356, 0.321, 0.274> ]
59            [ 0.1 color rgb<0.611, 0.500, 0.500> ]
60            [ 0.4 color rgb<0.745, 0.623, 0.623> ]
61            [ 1.0 color rgb<0.837, 0.782, 0.745> ]
62         }
63         warp { turbulence 0.6 }
64      }
65      finish {
66         diffuse 0.6
67         ambient 0.1
68         specular 0.2
69         reflection {
70            0.2, 0.6
71            fresnel on
72         }
73         conserve_energy
74      }
75
76   }
77
78}
79
80#macro Objs(Metr)
81
82union {
83   #local fn_Crack=
84   function {
85      pigment {
86         crackle
87         metric Metr
88         color_map { [0 rgb 0][1 rgb 1] }
89         scale 0.7
90      }
91   }
92
93
94   #local T_Crack=
95   texture {
96      pigment {
97         crackle
98         metric Metr
99         color_map {
100            [ 0.0000 color rgb<0.2353, 0.1333, 0.4824> ]
101            [ 0.1000 color rgb<0.5647, 0.4353, 0.8000> ]
102            [ 0.2000 color rgb<0.6549, 0.4000, 0.8275> ]
103            [ 0.3000 color rgb<0.7294, 0.4039, 0.8471> ]
104            [ 0.7000 color rgb<0.9059, 0.5255, 0.8980> ]
105            [ 0.8000 color rgb<1.0000, 0.6784, 0.8549> ]
106            [ 0.9000 color rgb<0.9725, 0.6980, 0.5922> ]
107            [ 0.9300 color rgb<0.9490, 0.7255, 0.4078> ]
108            [ 0.9800 color rgb<0.9725, 0.7255, 0.3294> ]
109            [ 1.0000 color rgb<0.3000, 0.2000, 0.8000> ]
110         }
111         scale 0.7
112      }
113      finish {
114         ambient 0.1
115         diffuse 0.7
116         brilliance 1.3
117         specular 0.3
118      }
119   }
120
121   superellipsoid {
122      <0.1, 0.1>
123      scale <1.0, 1.0, 0.6>
124      texture { T_Crack }
125      translate <0.0, 3.0, 0.3>
126   }
127
128   superellipsoid {
129      <0.1, 0.1>
130      scale <1.0, 1.0, 0.6>
131
132      texture {
133         pigment { rgb <0.2, 0.8, 0.5> }
134         finish {
135            specular 0.5
136            roughness 0.04
137            diffuse 0.8
138            brilliance 2.0
139            ambient 0.1
140         }
141         normal {
142            crackle 0.7
143            metric Metr
144            scale 0.7
145         }
146      }
147
148      translate <0.0, -3.0, 0.3>
149   }
150
151   #if (Metr != 1)
152      isosurface {
153         function { z-fn_Crack(x, y, 0.6).red*0.35 }
154         //evaluate 1, 1.2, 0.99
155         max_gradient 1.5
156         accuracy 0.001
157         contained_by { box { <-1.0,-1.0,-0.6>,<1.0,1.0,1.1> } }
158
159         texture {
160            pigment { rgb <0.3, 0.2, 0.95> }
161            finish {
162               specular 0.5
163               roughness 0.04
164               diffuse 0.8
165               brilliance 2.0
166               ambient 0.1
167            }
168         }
169
170         translate 0.6*z
171      }
172   #end
173
174
175   object {
176      text
177      {
178         ttf
179         "crystal.ttf",
180         concat("metric ", str(Metr,0,1)),
181         0.1, 0
182
183         rotate 90*x
184         rotate 180*z
185         scale 0.3
186         translate <0.85, 4.01, 0.5>
187
188         texture {
189            pigment { color Red*0.8 }
190         }
191      }
192   }
193
194   translate -1*y
195}
196#end
197
198
199object { Objs(1)   translate -5.0*x }
200object { Objs(1.5) translate -2.5*x }
201object { Objs(2)   translate  0.0*x }
202object { Objs(2.2) translate  2.5*x }
203object { Objs(3)   translate  5.0*x }
204
205