-
Notifications
You must be signed in to change notification settings - Fork 99
/
Copy pathindex.html
129 lines (123 loc) · 4.21 KB
/
index.html
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
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
<title>Лабораторная работа 3</title>
<link rel="stylesheet" href="https://www.x3dom.org/download/x3dom.css" />
<script src="https://www.x3dom.org/x3dom/release/x3dom-full.js"></script>
</head>
<body>
<x3d width='1300px' height='600px' >
<scene>
<Group DEF = "object"> <!-- Добавление Group, DEF, USE. Контрольный вопрос-->
<transform rotation='1 0 1 3.5'>
<!-- Контур тарелки -->
<Shape>
<IndexedLineSet coordIndex="0 1 2 3 4 5 6 7 0"
colorIndex="0 1 2 3 4 -1 5 6 0 1 -1"
colorPerVertex='true'>
<Coordinate point="0 0 1.5,1 0 1, 1.5 0 0, 1 0 -1, 0 0 -1.5,
-1 0 -1, -1.5 0 0, -1 0 1'"></Coordinate>
<Color color="0 0 1, 0 1 0, 0 1 1, 1 0 0, 1 0 1, 1 1 0, 1 1 1">
</IndexedLineSet>
</Shape>
<!-- Большая часть тарелки -->
<Shape>
<Appearance>
<Material diffuseColor='#C0C0C0'/>
</Appearance>
<IndexedFaceSet colorPerVertex="true" convex="true"
creaseAngle="0" normalPerVertex="true" solid="false"
coordIndex="0 1 3 2 -1
1 4 6 3 -1
4 5 7 6 -1
5 8 10 7 -1
8 9 11 10 -1
9 12 14 11 -1
12 13 15 14 -1
13 0 2 15">
<Coordinate point="0 0 1.5,1 0 1, 0 1 0.5, 0.5 1 0.5,
1.5 0 0, 1 0 -1, 0.5 1 0, 0.5 1 -0.5,
0 0 -1.5, -1 0 -1, 0 1 -0.5, -0.5 1 -0.5,
-1.5 0 0, -1 0 1, -0.5 1 0, -0.5 1 0.5">
</Coordinate>
</IndexedFaceSet>
</Shape>
<!--МАлая часть тарелки-->
<Shape>
<Appearance>
<Material diffuseColor='#A9A9A9'/>
</Appearance>
<IndexedTriangleSet index='0 1 2 1 2 3 3 4 2 0 4 2' solid='false'>
<Coordinate point='-0.5 1 0.5, 0.5 1 0.5, 0 2 0,
0.5 1 -0.5,-0.5 1 -0.5'></Coordinate>
</IndexedTriangleSet>
</Shape>
</transform>
<transform translation="0.2 -0.8 -0.2" scale="0.5 0.5 0.5" rotation='1 0 1 0.5'>
<!-- октаэдр внутри тарелки-->
<Shape>
<Appearance>
<Material emissiveColor='1 0 0'/>
</Appearance>
<IndexedTriangleStripSet index='4 0 1 5 -1 4 1 3 6 -1 4 3 2 8 -1 4 2 0 7 ' solid='true'>
<Coordinate point='1 0 1, -1 0 1, 1 0 -1, -1 0 -1, 0 -1.5 0,
0 1.5 0.5, -0.5 1.5 0, 0.5 1.5 0, 0 1.5 -0.5'/>
</Shape>
</transform>
<transform rotation='1 0 1 0.5' translation="0 -.1 0">
<!-- Точки на краях откраэдра-->
<Shape>
<PointSet>
<Color color='0 0 0, 0 0 0, 0 0 0, 0 0 0'></Color>
<Coordinate point='0.3 -0.1 0, -0.3 -0.1 0,0 -0.1 0.3, 0 -0.1 -0.3'></Coordinate>
</PointSet>
</Shape>
</transform>
<transform rotation='1 0 1 0.5' translation='0.2 -0.1 0.3'>
<!-- Лазеры -->
<Shape>
<Appearance>
<Material diffuseColor ='#FF0000'/>
</Appearance>
<IndexedFaceSet colorPerVertex="true" convex="true"
creaseAngle="0" normalPerVertex="true" solid="false"
coordIndex="0 1 2 -1
1 3 2 -1
3 4 2 -1
0 4 2">
<Coordinate point="0 0 0, -0.5 0 0, 0 8 0,
-0.5 0 -0.5, 0 0 -0.5">
</Coordinate>
</IndexedFaceSet>
</Shape>
</transform>
</Group> <!-- Добавление -->
<!-- Добавление -->
<transform rotation = '0 1 0 3' translation = '3 0 0'>
<shape USE = "object">
</shape>
</transform>
<transform translation="-5.7 -5 -6" >
<!--Холм -->
<Shape>
<Appearance>
<imagetexture url="grass.jpg" repeats="true" repeatt="true">
<texturetransform scale="1 1"></texturetransform>
</Appearance>
<ElevationGrid xDimension="5" zDimension="6"
height="0, 0, 0, 0, 0,
0, 0, 1, 0, 0,
0, 1, 4, 4 0,
0, 1, 1, 1, 0,
0, -0.5, 1, -0.5, 0,
0, 0, 0,0, 0"
xSpacing="3" zSpacing="3" solid="false">
</ElevationGrid>
</Shape>
</transform>
</scene>
</x3d>
</body>
</html>