-
Notifications
You must be signed in to change notification settings - Fork 74
/
models.inc
101 lines (93 loc) · 2.4 KB
/
models.inc
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
static const
light light1 = {
.light_color = { 0.7, 0.5, 0.5 },
.position = { 5, 5, 20 },
.intensity = 200.0,
};
static const
light light2 = {
.light_color = { 0.8, 0.8, 0.8 },
.position = { 10, 10, 20 },
.intensity = 200.0,
};
static const
sphere sphere1 = {
.center = { 5, 0, 5 },
.radius = 3,
.sphere_fill = {
.fill_color = { 0.8, 0.8, 0.8 },
.Kd = 0.8, .Ks = 0.8, .T = 0.0, .R = 0.6,
.index_of_refraction = 0.0, .phong_power = 30.0
}
};
static const
sphere sphere2 = {
.center = { 20, 15, 15 },
.radius = 3,
.sphere_fill = {
.fill_color = { 0.8, 0.6, 0.4 },
.Kd = 0.0, .Ks = 1.0, .T = 1.0, .R = 1.0,
.index_of_refraction = 1.5, .phong_power = 30.0
}
};
static const
sphere sphere3 = {
.center = { 5, 10, 5 },
.radius = 3,
.sphere_fill = {
.fill_color = { 0.4, 0.8, 0.6 },
.Kd = 0.8, .Ks = 0.1, .T = 0.0, .R = 0.1,
.index_of_refraction = 0.0, .phong_power = 30.0
}
};
static const
viewpoint view = {
.vrp = { 40.0, 40.0, 40.0 },
.vpn = { -1.0, -1.0, -1.0 },
.vup = { 0.0, 0.0, 1.0 }
};
static const
rectangular rectangular1 = {
.vertices = {
{ 0.0, 0.0, 0.0 }, /* v0 */
{ 0.0, 0.0, 20.0 }, /* v1 */
{ 20.0, 0.0, 20.0 }, /* v3 */
{ 20.0, 0.0, 0.0 }, /* v2 */
},
.normal = { 0.0, 1.0, 0.0 },
.rectangular_fill = {
.fill_color = { 0.6, 0.6, 0.6 },
.Kd = 0.8, .Ks = 0.0, .T = 0.0, .R = 0.5,
.index_of_refraction = 0.0, .phong_power = 5.0,
},
};
static const
rectangular rectangular2 = {
.vertices = {
{ 0.0, 0.0, 0.0 }, /* v0 */
{ 20.0, 0.0, 0.0 }, /* v1 */
{ 20.0, 20.0, 0.0 }, /* v3 */
{ 0.0, 20.0, 0.0 }, /* v2 */
},
.normal = { 0.0, 0.0, 1.0 },
.rectangular_fill = {
.fill_color = { 0.6, 0.1, 0.1 },
.Kd = 0.8, .Ks = 0.0, .T = 0.0, .R = 0.5,
.index_of_refraction = 0.0, .phong_power = 5.0,
},
};
static const
rectangular rectangular3 = {
.vertices = {
{ 0.0, 0.0, 0.0 }, /* v0 */
{ 0.0, 20.0, 0.0 }, /* v1 */
{ 0.0, 20.0, 20.0 }, /* v3 */
{ 0.0, 0.0, 20.0 }, /* v2 */
},
.normal = { 1.0, 0.0, 0.0 },
.rectangular_fill = {
.fill_color = { 0.1, 0.1, 0.6 },
.Kd = 0.8, .Ks = 0.0, .T = 0.0, .R = 0.5,
.index_of_refraction = 0.0, .phong_power = 5.0,
},
};