forked from shiplab/vesseljs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
444 lines (381 loc) · 14.8 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
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
<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="">
<title>Vessel.js</title>
<!-- Bootstrap Core CSS -->
<link href="examples/libs/bootstrap.min.css" rel="stylesheet">
<!-- jQuery Version 1.11.1 -->
<script src="examples/libs/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="examples/libs/bootstrap.min.js"></script>
<!-- Navigation -->
<nav class="navbar navbar-inverse">
<div class="container">
<!-- Add the <div>[Something]</div> structure for each header in the navbar-->
<div class="navbar-header">
<a class="navbar-brand" href="https://github.com/shiplab/vesseljs/wiki/Examples">Examples</a>
<a class="navbar-brand" href="https://github.com/shiplab/vesseljs/wiki">Documentation</a>
<a class="navbar-brand" href="https://github.com/shiplab/vesseljs">Source</a>
</div>
<!-- This is for the right part of the navbar. Reserved for Shiplab logo-->
<div class="nav navbar-nav navbar-right">
<div class="navbar-header">
<a class="navbar-brand" href="http://www.shiplab.hials.org/"><img src="images/barquinho.png"
alt="Shiplab logo" style="height:150%">
</a>
</div>
</div>
</div>
</nav>
<style media="screen">
html {
font: 16px/1.5em "Helvetica Neue", Helvetica, sans-serif;
min-width: 1040px;
margin: 0;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
text-indent: 20px;
}
h1 {
margin-block-start: 1em;
}
pre,
code {
font-family: "Menlo", monospace;
-webkit-text-size-adjust: 100%;
}
code {
line-height: 1em;
}
pre {
border-left: solid 2px #ccc;
padding-left: 18px;
margin: 2em 0 2em -20px;
}
.html .string,
.javascript .string,
.javascript .regexp {
color: #756bb1;
}
.html .tag,
.css .tag,
.javascript .keyword {
color: #3182bd;
}
.comment {
color: #636363;
}
.html .doctype,
.javascript .number {
color: #31a354;
}
.html .attr,
.css .attr,
.javascript .class,
.javascript .special {
color: #e6550d;
}
.static {
position: absolute;
}
.static:hover {
opacity: 0;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
td {
text-align: center;
border: 1px solid #808080;
padding-bottom: 20px;
}
</style>
</head>
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3 text-center">
<!-- <svg width="96" height="91" style="position:relative;top:22px;">
<defs>
<linearGradient id="MyGradient">
<stop offset="5%" stop-color="blue" />
<stop offset="95%" stop-color="black" />
</linearGradient>
</defs>
<rect fill="url(#MyGradient)" x="0" y="0" width="100" height="100" />
</svg> -->
<img height="150" src="images/LogoVesseljs.jpg">
</div>
</div>
</div>
<br>
<canvas id="example-deep"></canvas>
<div class="container">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<h1>Introduction</h1>
<p><b>Vessel.js</b> is a JavaScript library for conceptual ship design with an
object-oriented paradigm. Vessel.js represents the vessel as an object, which
is used to simulate different functionalities and behaviors. Currently, the
library includes methods for hydrostatic and stability calculations.</p>
<p>The library is developed by <a href="http://www.shiplab.hials.org/">Ship Design and Operation Lab</a> at
Norwegian
University of Science and Technology (NTNU) in Ålesund.</p>
<p>Dowload the latest version here:</p>
<ul>
<li>
<a href="https://github.com/shiplab/vesseljs/archive/master.zip">vesseljs.zip</a>
</li>
</ul>
<p>Import Vessel.js in html by using the following script:</p>
<pre><code class="html hljs xml"><span class="tag"><<span class="name">script</span> <span class="attr">src</span>=<span class="string">"Vessel.js"</span>></span><span class="undefined"></span><span class="tag"></<span class="name">script</span>></span></code></pre>
<h1>Contributing</h1>
<p>When contributing, fork the repository and send pull requests with your
commits. If your modifications are only to files related to examples
and you have pull request authorization, you can approve them by
yourself. If not, then wait for review and approval by the development
team.</p>
<p>You are also welcome to create <a href="https://github.com/shiplab/vesseljs/issues">
issues</a> reporting bugs or suggesting
improvements and features for development.</p>
<h1>Examples</h1>
<div style="overflow-x:auto;">
<table>
<tr valign="top">
<td width="25%">
<h4>Ship in regular ocean</h4><a href="examples/Ship_in_regular_ocean.html"><img
class="static" height="133" width="183.2"
src="images/Ship_in_Ocean_heave_only.jpg"><img class="active" height="133"
width="183.2" src="images/Ship_in_Ocean_heave_only.gif"></a>
</td>
<td width="25%">
<h4>Ships in regular ocean</h4><a href="examples/Many_ships_in_regular_ocean.html"><img
height="133" width="183.2" src="images/Ships_in_regular_ocean.jpg"></a>
</td>
<td width="25%">
<h4>Barge motion with equations</h4><a href="examples/Ship_in_Ocean_dynamical.html"><img
class="static" height="133" width="183.2" src="images/Ship_in_Dynamical.jpg"><img
class="active" height="133" width="183.2" src="images/Ship_in_Dynamical.gif"></a>
</td>
<td width="25%">
<h4>Barge Motion with WAMIT</h4><a href="examples/Radiation_WAMIT.html"><img height="133"
width="183.2" src="images/Radiation_WAMIT.jpg"></a>
</td>
</tr>
<tr valign="top">
<td width="25%">
<h4>Ship with mooring</h4><a href="examples/Ship_in_Ocean_dynamical_MooringWave.html"><img
class="static" height="133" width="183.2" src="images/MooringLine.jpg"><img
class="active" height="133" width="183.2" src="images/MooringLine.gif"></a>
</td>
<td width="25%">
<h4>Ship with mooring (parametric)</h4><a
href="examples/Ship_in_Ocean_dynamical_MooringWave_Parametric.html"><img class="static"
height="133" width="183.2" src="images/MooringLineParametric.jpg"><img
class="active" height="133" width="183.2" src="images/MooringLine.gif"></a>
</td>
<td width="25%">
<h4>Side by side 3</h4><a href="examples/Side_by_side_operation_complex_case.html"><img
height="133" width="183.2" src="images/Side_by_side_operation_complex_case.jpg"></a>
</td>
<td width="25%">
<h4>Side by side 2</h4><a
href="examples/Side_by_side_operation_different_loading_conditons.html"><img
height="133" width="183.2"
src="images/Side_by_side_operation_different_loading_conditons.jpg"></a>
</td>
</tr>
<tr valign="top">
<td width="25%">
<h4>Side by side 1</h4><a href="examples/Explore_file_side_to_side.html"><img height="133"
width="183.2" src="images/Explore_file_side_to_side.jpg"></a>
</td>
<td width="25%">
<h4>Subsea</h4><a href="examples/Subsea.html"><img height="133" width="183.2"
src="images/Subsea.jpg"></a>
</td>
<td width="25%">
<h4>Simple Multibody Example</h4><a
href="examples/Simple_example_with_explore_file.html"><img height="133" width="183.2"
src="images/Simple_example_with_explore_file.jpg"></a>
</td>
<td width="25%">
<h4>Pendulum load</h4><a
href="https://observablehq.com/@icarofonseca/pendulum-load-in-lifting-operation"><img
height="133" width="183.2" src="images/lifting.jpg"></a>
</td>
</tr>
<tr valign="top">
<td width="25%">
<h4>Epoch Analysis</h4><a href="examples/epoch.html"><img height="133" width="183.2"
src="images/epoch.jpg"></a>
</td>
<td width="25%">
<h4>Pendulum in ocean</h4><a href="examples/Ship_with_aframe_in_regular_ocean.html"><img
class="static" height="133" width="183.2"
src="images/Ship_with_aframe_in_regular_ocean.jpg"><img class="active" height="133"
width="183.2" src="images/Ship_with_aframe_in_regular_ocean.gif"></a>
</td>
<td width="25%">
<h4>Ship in still water</h4><a href="examples/Ship_in_Ocean_still_water.html"><img
height="133" width="183.2" src="images/Ship_in_Ocean_still_water.jpg"></a>
</td>
<td width="25%">
<h4>Ships in still water</h4><a href="examples/Many_ships_in_still_water.html"><img
height="133" width="183.2" src="images/Many_ships_in_still_water.jpg"></a>
</td>
</tr>
<tr valign="top">
<td width="25%">
<h4>Ship visualization</h4><a href="examples/Ship3D_with_pretty_JSON.html"><img
class="static" height="133" width="183.2" src="images/orbit3d.jpg"><img
class="active" height="133" width="183.2" src="images/orbit3d.gif"></a>
</td>
<td width="25%">
<h4>Gunnerus</h4><a href="examples/Gunnerus_Complete_Example.html"><img height="133"
width="183.2" src="images/Gunnerus.jpg"></a>
</td>
<td width="25%">
<h4>Hull hydrostatics</h4><a href="examples/Hull_hydrostatics.html"><img height="133"
width="183.2" src="images/HullHydrostatics.jpg"></a>
</td>
<td width="25%">
<h4>General Arrangement</h4><a href="examples/Ship3D_GA.html"><img class="static"
height="133" width="183.2" src="images/Ship3D_ga.jpg"><img class="active"
height="133" width="183.2" src="images/Ship3D_ga.gif"></a>
</td>
</tr>
<tr valign="top">
<td width="25%">
<h4>Manoeuvring Model</h4><a href="examples/manoeuvring.html"><img height="133"
width="183.2" src="images/manoeuvring.jpg"></a>
</td>
<td width="25%">
<h4>ADAF Project</h4><a href="examples/manoeuvring_UiTModel.html"><img height="133"
width="183.2" src="images/manoeuvring_UiTModel.jpg"></a>
</td>
<td width="25%">
<h4>Trondheim Scene</h4><a href="examples/trondheim.html"><img height="133" width="183.2"
src="images/trondheim.jpg"></a>
</td>
<td width="25%">
<h4>Draco Compressed Model</h4><a href="examples/trondheim_compressed.html"><img
height="133" width="183.2" src="images/draco3d-vert.svg">
</td>
</tr>
<tr valign="top">
<td width="25%">
<h4>Ballasting</h4><a href="examples/ballasting.html"><img height="133" width="183.2"
src="images/Ballast.jpg"></a>
</td>
<td width="25%">
<h4>Path</h4><a href="examples/path.html"><img height="133" width="183.2"
src="images/Path.jpg"></a>
</td>
<td width="25%">
<h4>Lifecycle</h4><a href="examples/lifecycle.html"><img height="133" width="183.2"
src="images/Lifecycle.jpg"></a>
</td>
<td width="25%">
<h4>Loading</h4><a href="examples/loading.html"><img height="133" width="183.2"
src="images/Loading.jpg"></a>
</td>
</tr>
<tr valign="top">
<td width="25%">
<h4>Scale Ship</h4><a href="examples/scaleApp.html"><img class="static" height="133"
width="183.2" src="images/scaleApp.jpg"><img class="active" height="133"
width="183.2" src="images/scaleApp.gif"></a>
</td>
<td width="25%">
<h4>Validation of ship stability</h4><a href="examples/blockCase_compare.html"><img
height="133" width="183.2" src="images/GZ_graphics.jpg"></a>
</td>
<td width="25%">
<h4>Stability with Blocks</h4><a href="examples/Ship_stability_with_blocks.html"><img
class="static" height="133" width="183.2"
src="images/Ship_stability_with_blocks.jpg"><img class="active" height="133"
width="183.2" src="images/Ship_stability_with_blocks.gif"></a>
</td>
<td width="25%">
<h4>ECMS 2019</h4><a
href="https://observablehq.com/@icarofonseca/a-prime-on-web-based-simulations"><img
height="133" width="183.2" src="images/ecms_2019.jpg"></a>
</td>
</tr>
<tr valign="top">
<td width="25%">
<h4>Digital twin: aquarium</h4><a href="../dt_cv/aquarium_demo"><img height="133"
width="183.2" src="images/dt_cv.jpg"></a>
</td>
<td width="25%">
<h4>Digital twin: basin</h4><a href="../dt_cv/basin_demo.html"><img height="133"
width="183.2" src="images/dt_tpn.jpg"></a>
</td>
<td width="25%">
<h4>OpenBridge</h4><a href="../openbridge/index.html"><img height="133" width="183.2"
src="images/openbridge.jpg"></a>
</td>
</tr>
</table>
</div>
<h1>Tutorials</h1>
<p>Vessel.js tutorials are available on the <a
href="https://observablehq.com/collection/@icarofonseca/vessel-js" target="_blank">ObservableHQ
notebook collection</a>. Don't know where to start? Try the <a
href="https://observablehq.com/@icarofonseca/vessel-js-learn-guide?collection=@icarofonseca/vessel-js"
target="_blank">learning guide</a>.</p>
<table>
<iframe width="50%" height="600" frameborder="0"
src="https://observablehq.com/embed/@ferrari212/from-the-hull-to-simulation-a-vessel-js-tutorial?cells=e1%2Ce2%2Ce3"></iframe>
<iframe width="50%" height="600" frameborder="0"
src="https://observablehq.com/embed/@icarofonseca/pendulum-load-in-lifting-operation?cells=e1%2Ce2"></iframe>
</table>
</div>
</div>
<body>
<!-- Container creates the space -->
<div class="container">
<!-- Row creates horizontal groups of columns -->
<div class="row">
<script>
"use strict";
window.onload = function () {
var canvas = document.getElementById('example-deep');
var context = canvas.getContext('2d');
make_base();
function make_base(distX, distY) {
var base_image = new Image();
base_image.src = 'images/background.jpg';
var r = 721 / 1920;
base_image.onload = function () {
canvas.width = window.innerWidth;
canvas.height = innerHeight * .5;
var imageX = canvas.width + 50 * r;
var imageY = imageX * r;
if (imageY < canvas.height) {
canvas.height = imageY * .8;
}
var imageY = imageX * r;
if (distY) {
var ry = distY / canvas.height;
} else {
var ry = 0;
}
context.drawImage(base_image, - (imageX - canvas.width) / 2, - (imageY - canvas.height) * ry, imageX, imageY);
};
}
$('#example-deep').mousemove(function (event) {
var $distTop = $('#example-deep').offset().top;
var distX = event.pageX;
var distY = event.pageY - $distTop;
make_base(distX, distY);
});
window.onresize = make_base;
};
</script>
</body>
</html>