summaryrefslogtreecommitdiff
path: root/3d/watch.pov
blob: cc2844b188ee931d8dfc3738e312a3a03021d7c3 (plain)
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
// Persistence of Vision Ray Tracer Scene Description File
// File: wtchrgls.pov
// Vers: 3
// Desc: A wrist watch lying on the ground with an hour-glass standing behind it.
// Date: June 30, 1996
// Auth: Dan Moulding

#include "binwatch.inc"

#include "colors.inc"
#include "shapes.inc"
#include "glass.inc"
#include "metals.inc"
#include "stones.inc"
#include "woods.inc"

#declare T_WATCH=texture { pigment { color P_Silver3 } finish { F_MetalE reflection 0.5 } }
#declare T_HG_WOOD=texture { T_Wood2 rotate <90,0,0> scale 5 }
#declare T_Leather=texture { normal { crackle .3 sine_wave turbulence 0.3 scale <1.5,3,1.5> phase 0.5 } pigment { color VeryDarkBrown } finish { brilliance 3 } }
#declare R_WATCH=<0,0,0>;

camera
{
  location <-3,20,-10>
  look_at <0,0,-2>
}

light_source
{
  <-10,10,10>
  color White
}

light_source
{
  <10,15,-8>
  color White
}

light_source
{
  <15,15,15>
  color White
}

////////////////////////////////
//  Watch case
////////////////////////////////

// Base of Watch
cylinder
{
  <0,-.4,0>,<0,.25,0>,7
  open
  texture
  {
    T_WATCH
  }
  rotate R_WATCH
}

torus
{
  6.5,.5
  scale <1,.5,1>
  translate <0,.25,0>
  texture
  {
    T_WATCH
  }
  rotate R_WATCH
}

// Ring just on top of base
cylinder
{
  <0,0,0>,<0,.5,0>,6.75
  open
  texture
  {
    T_WATCH
  }
  rotate R_WATCH
}

torus
{
  6.25,.5
  scale <1,.3,1>
  translate <0,.5,0>
  texture
  {
    T_WATCH
  }
  rotate R_WATCH
}

// Numbered bezel
cylinder
{
  <0,.5,0>,<0,.75,0>,6.5
  open
  texture
  {
    T_WATCH
  }
  rotate R_WATCH
}

cone
{
  <0,.7,0>,6.5,<0,1,0>,5.5
  open
  texture
  {
    T_WATCH
  }
  rotate R_WATCH
}

#declare Count=0;
#while (Count<60)
  #if (mod(Count,10)=0)
    #if (Count!=0)
      text
      {
        ttf "arial.ttf"
        str(Count,0,0)
        .05,0
        rotate <107,0,0>
        translate <-.5,.95,5.7>
        rotate <0,Count/60*360,0>
        pigment { color Black }
        rotate R_WATCH
      }
    #else
      triangle
      {
        <-.2,0,.2>,<.2,0,.2>,<0,0,-.2>
        rotate <15,0,0>
        translate <0,.84,6.05>
        pigment { color Black }
        rotate R_WATCH
      }
    #end
  #else
    disc
    {
      <0,0,0>,y,.1
      rotate <15,0,0>
      translate <0,.84,6.05>
      rotate <0,Count/60*360,0>
      pigment { color Black }
      rotate R_WATCH
    }
  #end
  #declare Count=Count+1.25;
#end


// Wrist band holders
#declare BAND_HOLDER=
  union
  {
    difference
    {
      intersection
      {
        torus
        {
          3,6
          scale <1,.31,1.05>
          translate <0,-1.1,0>
        }
        prism
        {
          linear_sweep
          linear_spline
          -.85,.45
          5
          <4,5>,<5.5,3>,<4.75,9>,<4,9>,<4,5>
        }
        texture
        {
          T_WATCH
        }
        translate <0,.2,0>
      }
      torus
      {
        3,7
        scale <1,.28,1>
        texture
        {
          T_WATCH
        }
        translate <0,-2,0>
      }
    }
    difference
    {
      intersection
      {
        torus
        {
          3,6
          scale <1,.31,1.05>
          translate <0,-1.1,0>
        }
        prism
        {
          linear_sweep
          linear_spline
          -.85,.45
          5
          <-4,5>,<-5.5,3>,<-4.75,9>,<-4,9>,<-4,5>
        }
        texture
        {
          T_WATCH
        }
        translate <0,.2,0>
      }
      torus
      {
        3,7
        scale <1,.28,1>
        texture
        {
          T_WATCH
        }
        translate <0,-2,0>
      }
    }
  }

object
{
  BAND_HOLDER
  rotate R_WATCH
}

object
{
  BAND_HOLDER
  rotate <0,180,0>
  rotate R_WATCH
}

// Adjuster knob and housing
union
{
  union
  {
    cylinder
    {
      <0,0,0>,<0,.4,0>,.4
    }
    #declare Count=0;
    #while (Count<=40)
      box
      {
        <-.01,.4,.4>,<.01,0,.45>
        rotate <0,Count/40*360,0>
      }
      #declare Count=Count+1;
    #end
    sphere
    {
      <0,.4,0>,.4
    }
    rotate <0,0,-90>
    translate <7.05,0,0>
  }
  intersection
  {
    torus
    {
      3,6
      scale <1,.35,1>
      translate <0,-1.1,0>
    }
    intersection
    {
      prism
      {
        -.4,2
        9
        <6,-2.2>,<8,-1.4>,<8,-.65>,<7,-.55>,<7,.55>,<8,.65>,<8,1.4>,<6,2.2>,<6,-2.2>
      }
      cylinder
      {
        <0,-2,0>,<0,2,0>,7.3
      }
    }
  }
  texture
  {
    T_WATCH
  }
  rotate R_WATCH
}


/////////////////////////////
// Face and glass
/////////////////////////////

// Green face
//disc
//{
//  <0,.25,0>,y,6.5
//  texture
//  {
//    pigment { color rgb <0,.15,0> }
//    finish
//    {
//      specular 0.6
//      reflection 0.1
//      metallic
//    }
//  }
//  rotate R_WATCH
//}

// Glass
object
{
  Paraboloid_Y
  rotate <180,0,0>
  scale <2.733,.25,2.733>
  translate <0,2,0>
  texture
  {
    pigment { color rgbt <1,1,1,.9> }
    finish
    {
      reflection 0.6
      specular 0.2
      diffuse 0
      phong 0.3
      phong_size 500
    }
  }
  rotate R_WATCH
  clipped_by
  {
    plane
    {
      -y,-.75
      rotate R_WATCH
    }
  }
}

//////////////////////
// Leather wrist band
//////////////////////
#declare WRIST_BAND=
  union
  {
    prism
    {
      linear_sweep
      linear_spline
      -.5,0
      5
      <-4,-8>,<-3.5,-25>,<3.5,-25>,<4,-8>,<-4,-8>
    }
    cylinder
    {
      <0,-4,0>,<0,4,0>,.5
      rotate <90,90,0>
      translate <0,-.5,-8>
    }
    texture
    {
      T_Leather
    }
  }

object
{
  WRIST_BAND
  rotate R_WATCH
}

cylinder
{
  <0,-.5,0>,<0,0,0>,3.5
  texture
  {
    T_Leather
  }
  scale <1,1,4>
  translate <0,0,-25>
  rotate R_WATCH
}

object
{
  WRIST_BAND
  rotate <0,180,0>
  rotate R_WATCH
}

// Silver buckle
prism
{
  linear_sweep
  linear_spline
  -.3,0
  19
  <3.5,24.5>,<3.75,24.5>,<3.75,25>,<3.75,28>,<3.5,28.5>,<0,29>,<-3.5,28.5>,<-3.75,28>,<-3.75,25>,<-3.75,24.5>,<-3.5,24.5>,<-3.5,25>,<-3.5,27.5>,<-3.25,28>,<0,28.3>,<3.25,28>,<3.5,27.5>,<3.5,25>,<3.5,24.5>
  texture
  {
    T_WATCH
  }
  rotate R_WATCH
}

prism
{
  linear_sweep
  linear_spline
  -.3,.1
  5
  <.5,24.5>,<.5,28.5>,<-.5,28.5>,<-.5,24.5>,<.5,24.5>
  texture
  {
    T_WATCH
  }
  rotate R_WATCH
}

//////////////////
// Floor
//////////////////

plane
{
  y,-.8
  texture
  {
    T_Stone9
  }
}

////////////////////
//  Sky
////////////////////
sky_sphere
{
  pigment
  {
    color CornflowerBlue
  }
}

object{
	BINWATCH(-9.5,0,-9.5,0,0,0)
	scale 0.6
}