File: blackbox.pov

package info (click to toggle)
tkgate 2.1%2Brepack-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 28,384 kB
  • sloc: ansic: 62,300; tcl: 20,345; xml: 2,731; yacc: 1,177; lex: 839; sh: 664; makefile: 180; perl: 39
file content (170 lines) | stat: -rw-r--r-- 2,715 bytes parent folder | download | duplicates (7)
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
//
// Gate Logo
// by Jeffery P. Hansen
//

//global_settings { assumed_gamma 2.2 }

#include "shapes.inc"
#include "chars.inc"
#include "colors.inc"
#include "textures.inc"
#include "woods.inc"
#include "metals.inc"

#declare Plastic_Text =
  texture {
    pigment { rgb <.87, .8, .77>  }
    normal {
	bozo 0.05
	scale .1
   }
    finish {
      specular 0.05
      roughness 0.1
      ambient 0.6
//      diffuse 0.9
      reflection 0.01
    }
  }

#declare GreenPlastic_Text =
  texture {
    pigment { rgb <.7, .87, .67>  }
    normal {
	bozo 0.05
	scale .1
   }
    finish {
      specular 0.05
      roughness 0.1
      ambient 0.6
//      diffuse 0.9
      reflection 0.01
    }
  }

#declare RedPlastic_Text =
  texture {
    pigment { rgb <.87, .5, .47>  }
    normal {
	bozo 0.05
	scale .1
   }
    finish {
      specular 0.05
      roughness 0.1
      ambient 0.6
//      diffuse 0.9
      reflection 0.01
    }
  }

#declare DarkPlastic_Text =
  texture {
   #local X = 0.5;

    pigment { rgb <X*.87, X*.8, X*.77>  }
    normal {
	bozo 0.05
	scale .1
   }
    finish {
      specular 0.05
      roughness 0.1
      ambient 0.6
//      diffuse 0.9
      reflection 0.01
    }
  }




#macro RoundBox(W,H,D,R)
  union {
    sphere { <-W,-H,-D>, R }
    sphere { <-W,-H,D>, R }
    sphere { <-W,H,-D>, R }
    sphere { <-W,H,D>, R }
    sphere { <W,-H,-D>, R }
    sphere { <W,-H,D>, R }
    sphere { <W,H,-D>, R }
    sphere { <W,H,D>, R }

    cylinder { -W*x, W*x, R translate <0,H,D> }
    cylinder { -W*x, W*x, R translate <0,H,-D> }
    cylinder { -W*x, W*x, R translate <0,-H,D> }
    cylinder { -W*x, W*x, R translate <0,-H,-D> }

    cylinder { -D*z, D*z, R translate <W,H,0> }
    cylinder { -D*z, D*z, R translate <-W,H,0> }
    cylinder { -D*z, D*z, R translate <W,-H,0> }
    cylinder { -D*z, D*z, R translate <-W,-H,0> }

    cylinder { -H*y, H*y, R translate <W,0,D> }
    cylinder { -H*y, H*y, R translate <-W,0,D> }
    cylinder { -H*y, H*y, R translate <W,0,-D> }
    cylinder { -H*y, H*y, R translate <-W,0,-D> }

    box { <-W,-H-R,-D>, <W,H+R,D> }
    box { <-W,-H,-D-R>, <W,H,D+R> }
    box { <-W-R,-H,-D>, <W+R,H,D> }
  }
#end



#declare BlackBox =
  union {
    #local W = 10;
    #local H = 10;
    #local D = 10;
    #local R = 0.5;

    // main box
    RoundBox(W/2,H/2,D/2,R)

    texture { DarkPlastic_Text }
  }

union {
  object { BlackBox }
//  rotate y*40
//  rotate z*-20
}


#declare CV = 1;
  sky_sphere {
    pigment {
      colour red CV green CV blue CV
    }
  }

//
// Where are we anyway?
//
#declare DX = 10.5;
camera {
  location  <-10.0*DX, 20.0*DX, -35*DX>

  look_at <0.0, 0.0,  0.0>
}

light_source {
  <100,200, -300>
  colour White *1.2
}