-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMonitor.pov
96 lines (79 loc) · 2.16 KB
/
Monitor.pov
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
#version 3.7;
#include "colors.inc"
#include "shapes.inc"
#include "Utils.pov"
#local debugMode = 0;
#if (debugMode)
global_settings {
assumed_gamma 1
charset utf8
}
#end
// ----------------------------------------
// Monitor
// ----------------------------------------
#macro Monitor(screenWidth, screenHeight, screenThickness, baseX, baseY, baseZ, neckHeight, neckRadius)
#local ang = 20;
union {
union {
box {
<-baseX/2, 0, -baseZ/2>,
<baseX/2, baseY, baseZ/2>
}
cylinder {
<0, baseY, 0>,
<0, baseY + neckHeight, 0>,
neckRadius
}
finish {
reflection 0.02
}
}
union {
box {
<-screenWidth/2 + 0.01, -screenHeight/2 + 0.01, -screenThickness/2>,
<screenWidth/2 - 0.01, screenHeight/2 - 0.01, screenThickness/2>
}
object {
Frame(
<-screenWidth/2, -screenHeight/2, -screenThickness/2 - 0.005>,
<screenWidth/2, screenHeight/2, -screenThickness/2>,
screenThickness,
z
)
//Frame(screenWidth, screenHeight, screenThickness, 0.0025)
pigment { rgb<0.4, 0.4, 0.4> }
//translate <0, 0, -screenThickness/2 - 0.0025>
}
rotate x * ang
translate y * (baseY + neckHeight + screenHeight/6)
}
finish {
phong 0.9
phong_size 60
}
}
#end
// ----------------------------------------
// Scene
// ----------------------------------------
#if (debugMode)
camera {
location <0, 1, -1.5>
look_at <0, 0, 1>
}
background { White * 0.5 }
light_source { <-1, 3, -2> color White }
plane {
y, -1
texture {
pigment { checker rgb<0.3, 0.3, 0.3> White }
}
}
object {
Monitor(0.8, 0.5, 0.05, 0.8, 0.02, 0.5, 0.5, 0.04)
//rotate y * 45
scale 1.5
translate <0, -1, 1.5>
}
#end