-
Notifications
You must be signed in to change notification settings - Fork 0
/
exercise18.html
255 lines (218 loc) · 8.57 KB
/
exercise18.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Name Surname">
<link rel="icon" href="media/favicon.ico">
<title>Fab Academy 2015 - Name Surname</title>
<!-- Bootstrap core CSS -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="media/fabacademy.css" rel="stylesheet">
<!-- 3D files viewer -->
<script type="text/javascript" src="media/jsc3d_ie.min.js"></script>
<script type="text/javascript" src="media/jsc3d.min.js"></script>
<script type="text/javascript" src="media/jsc3d.webgl.js"></script>
<script type="text/javascript" src="media/jsc3d.touch.js"></script>
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="bootstrap/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="bootstrap/js/ie-emulation-modes-warning.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Load the menu file -->
<script>
function menu() {
$('#exercises').load("exercises-menu.html");
$('#project').load("project-menu.html");
$('#cclicense').load("license.html");
}
</script>
</head>
<body onload="menu()">
<!-- Static navbar -->
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Name Surname</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="about.html">About</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Exercises <span class="caret"></span></a>
<ul id="exercises" class="dropdown-menu" role="menu">
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Final Project <span class="caret"></span></a>
<ul id="project" class="dropdown-menu" role="menu">
</ul>
</li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<!-- Insert your content here below! -->
<h2>Exercise...</h1>
<h3>Menu</h3>
<p>
You can edit it by changing the <em>exercises-menu.html</em> and <em>project-menu.html</em>. Do <strong>not</strong> add any <ol> or <ul>, leave the structure as it is.
</p>
<h3>Text</h3>
<p>
You can set it up with:
<pre class="prettyprint linenums">
<p>
Your text here
</p></pre>
</p>
Result:
<p>
Your text here
</p>
<h3>Images</h3>
<p>
You can set it up with:
<pre class="prettyprint linenums">
<p class="pic>><img src="http://academy.cba.mit.edu/2012/students/menichinelli.massimo/exercise07/exercise07_02.jpg">
<legend>Here's the legend of the picture.</legend>
</p></pre>
</p>
Result:
<p class="pic"><img src="http://academy.cba.mit.edu/2012/students/menichinelli.massimo/exercise07/exercise07_02.jpg">
<legend>Here's the legend of the picture.</legend>
</p>
<h3>Code</h3>
<p>
You can set it up with:
<pre class="prettyprint linenums">
<pre class="prettyprint linenums">
Your code here
</pre></pre>
Result:
<pre class="prettyprint linenums">
for i in members:
print ""
print "USER:",members[i]
print "Loading connections..."
followers = load_connections([i], "followers")
friends = load_connections([i], "friends")
# Add edges...
print "Building the graph..."
for f in followers:
for k in followers[f]:
graph.add_edge(k,f)
for f in friends:
for k in friends[f]:
graph.add_edge(f,k)</pre>
</p>
<h3>3D Model</h3>
<p>
The model can be rotated and zoomed with the mouse/trackpad. You can set it up with:
<pre class="prettyprint linenums">
<canvas id="cv" width=640 height=480>
It seems you are using an outdated browser that does not support canvas :-(
</canvas>
<script type="text/javascript">
var canvas = document.getElementById('cv');
var viewer = new JSC3D.Viewer(canvas);
viewer.setParameter('SceneUrl','media/monkey.stl');
viewer.setParameter('ModelColor','#CAA618');
viewer.setParameter('BackgroundColor1','#E5D7BA');
viewer.setParameter('BackgroundColor2','#383840');
viewer.setParameter('RenderMode','flat');
viewer.setParameter('MipMapping','on');
viewer.setParameter('Definition','high');
viewer.setParameter('Renderer','webgl');
viewer.init();
viewer.update();
</script></pre>
You can set up the path to the 3D model (.stl/.obj) within this line:
<pre class="prettyprint linenums">
viewer.setParameter('SceneUrl','media/monkey.stl');</pre>
Result:
<canvas id="cv" width=640 height=480>
It seems you are using an outdated browser that does not support canvas :-(
</canvas>
<script type="text/javascript">
var canvas = document.getElementById('cv');
var viewer = new JSC3D.Viewer(canvas);
viewer.setParameter('SceneUrl','media/monkey.stl');
viewer.setParameter('ModelColor','#CAA618');
viewer.setParameter('BackgroundColor1','#E5D7BA');
viewer.setParameter('BackgroundColor2','#383840');
viewer.setParameter('RenderMode','flat');
viewer.setParameter('MipMapping','on');
viewer.setParameter('Definition','high');
viewer.setParameter('Renderer','webgl');
viewer.init();
viewer.update();
</script>
</p>
<h3>Download</h3>
<p>
You can set up a button for files to be downloaded with:
<pre class="prettyprint linenums">
<a href="#">
<button type="button" class="btn btn-primary btn-lg">Download the file</button>
</a></pre>
</p>
<p>
Result:
</p>
<p>
<a href="#">
<button type="button" class="btn btn-primary btn-lg">Download the file</button>
</a>
</p>
<h3>Would you like to insert more style/elements?</h3>
<p>
Check the documentation of Bootstrap <a href="">here</a>.
</p>
<!-- End of your content -->
</div> <!-- /container -->
<!-- footer -->
<footer id="footer">
<p id="cclicense">
</p>
<p class="license">
Theme: <a href="https://github.com/openp2pdesign/FabAcademy_Template">Fab Academy Template</a> by <a href="http://openp2pdesign.org">Massimo Menichinelli</a> <br>
Based on <a href="http://getbootstrap.com/">Twitter Bootstrap</a>+<a href="http://jquery.com/">JQuery</a>+<a href="https://code.google.com/p/google-code-prettify/">google-code-prettify</a>+<a href="http://jmblog.github.io/color-themes-for-google-code-prettify/github/">GitHub theme for google-code-prettify</a>+<a href="https://code.google.com/p/jsc3d/">JSC3D</a>+<a href="https://github.com/thegrubbsian/jquery.ganttView">jquery.ganttView</a>.
</p>
</footer>
<!-- Do not touch this! -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="media/jquery-1.9.1.min.js"></script>
<!-- Syntax Highlighter -->
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js">
</script>
<!-- From https://github.com/jmblog/color-themes-for-google-code-prettify -->
<link href="media/github.css" type="text/css" rel="stylesheet">
<script type="text/javascript">
!function ($) {
$(function(){
window.prettyPrint && prettyPrint()
})
}(window.jQuery)
</script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="bootstrap/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>