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.
4
5//   Persistence of Vision Raytracer Scene Description File
6//   File: shapes.pov
7//   Author: Chris Huff and Rune S. Johansen
8//   Description:
9// This scene demonstrates some of the new macros in shapes.inc.
10//
11// -w320 -h240
12// -w800 -h600 +a0.3
13//
14//*******************************************
15
16#version 3.7;
17
18#include "stdinc.inc"
19
20//-------------------------------------------
21
22global_settings {
23   assumed_gamma 1.0
24   max_trace_level 10
25}
26
27#default {finish {ambient 0}}
28
29camera {
30   location <-2.0, 3.5,-8.5>
31   up y  right x*image_width/image_height
32   angle 45
33   look_at <0.0, 0.7, 0.0>
34}
35
36light_source {<-150, 200,-100>, color 0.8 * <1.0, 1.0, 0.6>} // yellowish light from the left
37light_source {< 150, 100,-100>, color 0.7 * <0.6, 0.6, 1.0>} // blueish light from the right
38light_source {< -50, 200, 100>, color 0.5 * <1.0, 1.0, 1.0>} // dim light from the back of the objects.
39
40box {
41   <-10,-1,-10>, < 10, 0, 10>
42   texture {
43      pigment {checker color <0.1, 0.3, 0.4>, color <0.2, 0.5, 0.7>}
44      finish {diffuse 0.7 reflection 0.2}
45   }
46}
47
48//*******************************************
49
50#declare ShinyFinish =
51finish {
52   diffuse 0.7
53   reflection {0.1, 1.0 fresnel}
54   specular 1 roughness 0.0035 metallic
55}
56#declare Int =
57interior {ior 1.7}
58
59
60object {
61   Align_Object( // Bevelled_Text(Font, String, Cuts, BevelAng, BevelDepth, Depth, Offset)
62      Center_Object(Bevelled_Text("crystal.ttf", "POV", 3, 45, 0.025, 0.25, 0, no), x)
63      -y, < 0, 0, 0>
64   )
65   texture {
66      pigment {color <0.5,0.3,0.1>}
67      finish {
68         diffuse 0.8 brilliance 2
69         reflection {0.3 metallic}
70         specular 1 roughness 0.1 metallic
71      }
72   }
73   scale 2
74   translate <-1.5, 0.0,-0.5>
75}
76
77object {
78   Supercone(< 0, 0, 0>, 0.5, 1.00, < 0, 2, 0>, 1.0, 0.25)
79   texture {
80      pigment {color rgb 0.5}
81      finish {ShinyFinish}
82   }
83   interior {Int}
84   translate < 1.5, 0.0, 3.5>
85}
86
87object {
88   Round_Cone(< 0, 0, 0>, 1.0, < 0, 2, 0>, 0.5, 0.15, no)
89   texture {
90      pigment {color rgb 1}
91      finish {ShinyFinish}
92   }
93   interior {Int}
94   translate < 2.5, 0.0, 2.0>
95}
96
97// The Round_Cone2 macro below makes a rounded cone out of a cone and two spheres,
98// where the cone in the middle is made to fit the spheres in the ends.
99union {
100   sphere {< 0, 1, 0>, 1.0001}
101   sphere {< 0, 2, 0>, 0.5001}
102   texture {
103      pigment {color rgb 0.5}
104      finish {ShinyFinish}
105   }
106   interior {Int}
107   translate < 3, 0, 0>
108}
109object {
110   Round_Cone2(< 0, 1, 0>, 1.0, < 0, 2, 0>, 0.5, yes)
111   texture {
112      pigment {color rgb 1}
113      finish {ShinyFinish}
114   }
115   interior {Int}
116   translate < 3, 0, 0>
117}
118
119// The Round_Cone3 macro below makes a rounded cone out of a cone and two spheres,
120// where the spheres in the ends are made to fit the cone in the middle.
121cone {
122   <-1, 0, 0>, 0.5001, < 1, 1, 0>, 0.1001
123   texture {
124      pigment {color rgb 0.5}
125      finish {ShinyFinish}
126   }
127   interior {Int}
128   translate <-2, 2, 3>
129}
130object {
131   Round_Cone3(<-1, 0, 0>, 0.5, < 1, 1, 0>, 0.1, yes)
132   texture {
133      pigment {color rgb 1}
134      finish {ShinyFinish}
135   }
136   interior {Int}
137   translate <-2, 2, 3>
138}
139
140object {
141   Round_Cylinder(< 0, 0, 0>, < 0, 1.5, 0>, 0.75, 0.25, no)
142   texture {
143      pigment {color rgb 1}
144      finish {ShinyFinish}
145   }
146   interior {Int}
147   translate <-0.5, 0.0, 3.5>
148}
149object {
150   Wire_Box(<-1.1, 0.0,-0.1>, < 1.1, 1.6, 1.1>, 0.05, no)
151   texture {
152      pigment {color rgb 1}
153      finish {ShinyFinish}
154   }
155   interior {Int}
156   translate <-2.5, 0.0, 2.0>
157}
158object {
159   Round_Box(<-1.0, 0.0, 0.0>, < 1.0, 1.5, 1.0>, 0.25, no)
160   texture {
161      pigment {color rgb 0.5}
162      finish {ShinyFinish}
163   }
164   interior {Int}
165   translate <-2.5, 0.0, 2.0>
166}
167
168//*******************************************
169
170#declare MyFunction = function{pattern {bumps scale 0.2}}
171
172object {
173   HF_Square (MyFunction, off, off, <60,60>, on, "", <0.0, 0.1, 0.0>, <1.5, 0.5, 1.5>)
174   texture {
175      pigment {color rgb 1}
176      finish {ShinyFinish}
177   }
178   translate <-3.0, 0.0,-3.2>
179}
180
181object {
182   HF_Sphere (MyFunction, off, off, <60,60>, on, "", <0.0, 0.6, 0.0>, 0.3, 0.3)
183   texture {
184      pigment {color rgb 1}
185      finish {ShinyFinish}
186   }
187   translate <-0.7, 0.0,-3.3>
188}
189
190object {
191   HF_Cylinder (MyFunction, off, off, <60,60>, on, "", <0.5, 0.0, 0.5>, <0.5, 1.0, 0.5>, 0.4, 0.3)
192   texture {
193      pigment {color rgb 1}
194      finish {ShinyFinish}
195   }
196   translate < 0.7, 0.0,-3.5>
197}
198
199object {
200   HF_Torus (MyFunction, off, off, <60,60>, on, "", 0.5, 0.1, 0.3)
201   texture {
202      pigment {color rgb 1}
203      finish {ShinyFinish}
204   }
205   translate < 0.5, 0.3,-1.0>
206}
207