-
Notifications
You must be signed in to change notification settings - Fork 1
/
relative.html
172 lines (127 loc) · 5.72 KB
/
relative.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="js/raphael.js"></script>
<script src="js/jquery-1.11.2.js"></script>
<script src="js/relative.js"></script>
<script src="js/scale.js"></script>
<script src="js/placeholders.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/nav.css">
</head>
<body>
<div id="navbar">
<ul>
<li><a href="index.html">Index</a></li>
<li><a href="linearmotion.html">Linear motion</a><li>
<li><a href="projectiles.html">Projectiles</a><li>
<li><a style="color:black; background-color:#A0A0A0" href="relative.html">Relative velocity</a></li>
<li><a href="connected.html">Connected particles</a></li>
<li><a href="circular-shm.html">Circular and SHM</a></li>
<li><a href="collisions.html">Collisions</a></li>
</ul>
</div>
<div id="navselect">
<select id="navselectmenu" onchange="location = this.options[this.selectedIndex].value;">
<option value="relative.html">Relative Velocity</option>
<option value="linearmotion.html">Linear Motion</option>
<option value="projectiles.html">Projectiles</option>
<option value="connected.html">Connected Particles</option>
<option value="circular-shm.html">Circular and SHM</option>
<option value="collisions.html">Collisions</option>
<option value="index.html">Index</option>
</select>
</div>
<div style="position:absolute; width:165px;top:70px;">
<!-- DROPDOWN MENU -->
<div>Select scenario:</div>
<div style="height:10px;"></div>
<select id="typeSelect" onchange="typeChange()" autocomplete="off">
<option id="vab">Simple Vab</option>
<option id="closest">Closest distance</option>
<option id="river">River crossing</option>
</select>
<div style="height:5px;"></div>
<hr style = "float:left; width:85%;">
</br>
<!-- SHOWN WHEN "SIMPLE VAB" IS SELECTED -->
<div id = "vabdiv">
<input id="vab-vai" type="text" placeholder="A i velocity Vai" style = "float:left;width:87.5%;" autocomplete="off"/> </br>
<div style="height:5px;"></div>
<input id="vab-vaj" type="text" placeholder="A j velocity Vaj" style = "float:left;width:87.5%;" autocomplete="off"/> </br>
<div style="height:5px;"></div>
<div style="height:5px;"></div>
<input id="vab-vbi" type="text" placeholder="B i velocity Vbi" style = "float:left;width:87.5%;" autocomplete="off"/> </br>
<div style="height:5px;"></div>
<input id="vab-vbj" type="text" placeholder="B j velocity Vbj" style = "float:left;width:87.5%;" autocomplete="off"/> </br>
<div style="height:5px;"></div>
<hr style = "float:left; width:85%;">
</br>
</div>
<!-- SHOW WHEN "CLOSEST DISTANCE" IS SELECTED -->
<div id = "closestdiv" style="display:none;">
<input id="closest-ai" type="text" placeholder="A's i velocity > 0" style = "float:left;width:87.5%;" autocomplete="off"/> </br>
<div style="height:5px;"></div>
<input id="closest-as" type="text" placeholder="A's distance west > 0" style = "float:left;width:87.5%; height:auto;" autocomplete="off"/> </br>
<div style="height:5px;"></div>
<div style="height:5px;"></div>
<input id="closest-bj" type="text" placeholder="B's j velocity > 0" style = "float:left;width:87.5%;" autocomplete="off"/> </br>
<div style="height:5px;"></div>
<input id="closest-bs" type="text" placeholder="B's distance south > 0" style = "float:left;width:87.5%;" autocomplete="off"/> </br>
<div style="height:5px;"></div>
<hr style = "float:left; width:85%;">
</br>
</div>
<!-- SHOWN WHEN "RIVER" IS SELECTED -->
<div id = "riverdiv" style="display:none;">
<input id="river-vp" type="text" placeholder="Person's speed >0 " style = "float:left;width:87.5%;" autocomplete="off"> </br>
<div style="height:5px;"></div>
<input id="river-angle" type="text" placeholder="Angle 90 ≥ Θ > 0" style = "float:left;width:87.5%;" autocomplete="off"> </br>
<div style="height:5px;"></div>
<input id="river-vr" type="text" placeholder="Speed of the current > 0" style = "float:left;width:87.5%;" autocomplete="off"> </br>
<div style="height:5px;"></div>
<input id="river-w" type="text" placeholder="Width of the river > 0" style = "float:left;width:87.5%;" autocomplete="off"> </br>
<div style="height:5px;"></div>
<hr style = "float:left; width:85%;">
</br>
</div>
<!-- RUN BUTTON -->
<button onclick="run()" type="button">Run simulation</button>
<div style="height:5px;"></div>
<!-- STOP BUTTON -->
<button onclick="stopSimulation()" type="button">Stop simulation</button>
<div style="height:5px;"></div>
<!-- CLEAR INPUT BUTTON -->
<button onclick="clearInput()" type="button">Clear input</button>
<div style="height:5px;"></div>
<!-- HELP BUTTON -->
<button onclick="showHelp()" type="button">Help</button>
<div style="height:5px;"></div>
</div>
<!-- space for the graphics panel -->
<div id="graphics_panel" style="position:absolute; left:165px;width:600px;top:70px;"></div>
<!-- real time info relevant to the simulation -->
<div id ="info_pane" style="position:absolute;left:770px;width:250px;top:65px;height:345px;">
<div id="vab-info" style="display:none;">
<div id="va-value"></div>
<div id="vb-value"></div>
<div id="vab-value"></div>
</div>
<div id="closest-info" style="display:none;">
<div id="vai-value"></div>
<div id="vbj-value"></div>
<div id="vab-closest-value"></div>
<div id="time-closest-value"></div>
<div id="distance-closest-value"></div>
</div>
<div id="river-info" style="display:none;">
<div id="current-value"></div>
<div id="angle-value"></div>
<div id="landing-value"></div>
<div id="ij-value"></div>
</div>
<div id="scale"></div>
<div id="time"></div>
</div>
</body>
</html>