shapes.pov
2.42 KB
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
#include "colors.inc"
#include "glass.inc"
#include "golds.inc"
#include "metals.inc"
#include "stones.inc"
#include "woods.inc"
#include "textures.inc"
#include "shapes3.inc"
global_settings { assumed_gamma 1.0 }
#declare my_blue = rgb<0.000, 0.404, 0.698>;
#declare my_lblue = rgb<0.278, 0.671, 0.871>;
#declare my_green = rgb<0.278, 0.667, 0.259>;
#declare my_orange = rgb<0.965, 0.518, 0.157>;
#declare my_yellow = rgb<1.000, 0.831, 0.329>;
#declare my_red = rgb<0.933, 0.220, 0.173>;
#declare my_purple = rgb<0.635, 0.169, 0.675>;
camera {
// negative for right-handed coordinates
// 16/9 aspect ratio (to avoid distortions)
right <1, 0, 0>
location < 0, 2, -5>
look_at < 0, 0, 0>
sky < 0, 1, 0>
angle 45
}
light_source { <100, 100, -100> color White }
background { color White }
#macro SPHERE()
sphere {
<0,0,0>, 1
scale 2
pigment { color my_red }
finish { phong 0.4 ambient 0.1 diffuse 0.9 }
}
#end
#macro BOX()
box {
<-0.5, -0.5, -0.5>
< 0.5, 0.5, 0.5>
rotate < 0, 30, 15>
translate <0.07, 0.05, 0>
scale 2.6
pigment { color my_blue }
finish { phong 0.8 ambient 0.1 diffuse 0.9 }
}
#end
#macro TUBE()
object {
difference {
cylinder {
<0, -1, 0> <0, 1, 0>, 1
pigment { color my_orange }
finish { phong 1.0 ambient 0.2 specular 0.15 diffuse 0.75 }
}
cylinder { <0, -1.1, 0> <0, 1.1, 0>, 0.75
pigment { color my_orange }
finish { phong 1.0 ambient 0.2 specular 0.15 diffuse 0.75 }
}
}
rotate < -60, 25, 15>
translate <0.13,-0.1,0>
scale 1.5
}
#end
#macro CONE()
cone { <0,-0.5,0>, 1.4, <0,2,0>, 0.4
rotate <-20, 0, 30>
translate <0.13, -0.17, 0>
scale 1.2
pigment { color my_purple }
finish { phong 0.3 ambient 0.1 diffuse 0.9 }
}
#end
#macro TORUS()
torus { 1.0, 0.4
rotate <-20, 0, 30>
translate <-0.1, 0.1, 0>
scale 1.5
pigment { color my_lblue }
finish { phong 0.3 ambient 0.1 diffuse 0.9 }
}
#end
#macro TRAPEZOID()
object { // trapezoid
Pyramid_N_AB(4, <0,-1,0>, 2.0, <0,1,0>, 0.9)
rotate <0, 30, 0>
rotate <-10, 0, 0>
translate <0.2, 0.7, 0>
scale 0.8
pigment { color my_green }
finish { phong 1.0 ambient 0.2 specular 0.15 diffuse 0.75 }
}
#end
#macro POLYHEDRON()
isosurface {
function { abs(x)+abs(y)+abs(z)-2.9 }
contained_by { box { -2, 2 } }
accuracy 0.003
max_gradient 5
pigment { color my_yellow }
finish { phong 1.0 ambient 0.2 specular 0.15 diffuse 0.75 }
//rotate <-5, -10, 0>
rotate <10, -10, 90>
scale 0.92
}
#end