-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
231 lines (196 loc) · 10.6 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
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Batman and Robin</title>
<link rel="stylesheet" href="./visual/css/style.css" />
<link rel="stylesheet" href="./visual/lib/themes/jquery.ui.all.css" />
<script type="text/javascript" src="./visual/lib/raphael-min.js"></script>
<script type="text/javascript" src="./visual/lib/es5-shim.min.js"></script>
<script type="text/javascript" src="./visual/lib/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="./visual/lib/state-machine.min.js"></script>
<script type="text/javascript" src="./visual/lib/async.min.js"></script>
<script type="text/javascript" src="./visual/lib/ui/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="./visual/lib/ui/jquery.ui.widget.min.js"></script>
<script type="text/javascript" src="./visual/lib/ui/jquery.ui.mouse.min.js"></script>
<script type="text/javascript" src="./visual/lib/ui/jquery.ui.draggable.min.js"></script>
<script type="text/javascript" src="./visual/lib/ui/jquery.ui.accordion.min.js"></script>
<script type="text/javascript" src="./visual/lib/ui/jquery.ui.slider.min.js"></script>
<script type="text/javascript" src="./dist/pathfinding.bundle.js"></script>
<script type="text/javascript" src="./visual/js/view.js"></script>
<script type="text/javascript" src="./visual/js/controller.js"></script>
<script type="text/javascript" src="./visual/js/panel.js"></script>
<script type="text/javascript" src="./visual/js/main.js"></script>
</head>
<body>
<div id="draw_area"></div>
<!-- instructions panel -->
<div id="instructions_panel" class="panel">
<header>
<h2 class="header_title">Instructions</h2>
<span id="hide_instructions">hide</span>
</header>
Click within the <span class="white">white</span> grid and drag your mouse to draw obstacles. <br>
Drag the <span class="green">green</span> node to set the start position. <br>
Drag the <span class="red">red</span> node to set the end position. <br>
To draw obstacles/hills/valleys select terrain from `Set Landscape' panel and click within the white grid and drag your mouse. <br>
Select number of destinations from the right hand side panel. By default, the end nodes have no priority. To set priority, click on the `give priority" option. The priority goes as follows: East>South>North <br>
Choose an algorithm from the right-hand panel. <br>
Choose weights/ heuristic/ don't cross corners options from the panel. <br>
Click Start Search in the lower-right corner to start the animation.
</div>
<div id="algorithm_panel" class="panel right_panel">
<header><h2 class="header_title">Select Algorithm</h2></header>
<div class="accordion">
<h3 id="info_header"><a href="#">Introduction</a></h3>
<div id = "info_section" class="finder_section">
<font size="-1">
<b>Batman and Robin are working on their most daring enterprise yet: Mars colonization! </b>
As a first step, they have made a pathfinding visualizer software to help them plan out paths for their Mars rover. Always dedicated to serving Gotham city, they have made this software publicly available for anyone's perusal. Check it out and let us know what you think!
</font>
</div>
<h3 id="astar_header"><a href="#">A*</a></h3>
<div id="astar_section" class="finder_section">
<header class="option_header">
<h3>Distace</h3>
</header>
<div id="astar_heuristic" class="sub_options">
<input type="radio" name="astar_heuristic" value="manhattan" checked />
<label class="option_label">Manhattan</label> <br>
<input type="radio" name="astar_heuristic" value="euclidean"/>
<label class="option_label">Euclidean</label> <br>
<input type="radio" name="astar_heuristic" value="octile"/>
<label class="option_label">Octile</label> <br>
<input type="radio" name="astar_heuristic" value="diagonal"/>
<label class="option_label">Diagonal</label> <br>
</div>
<header class="option_header">
<h3>Options</h3>
</header>
<div class="optional sub_options">
<input type="checkbox" class="allow_diagonal" checked>
<label class="option_label">Allow Diagonal</label> <br>
<input type="checkbox" class="bi-directional">
<label class="option_label">Bi-directional</label> <br>
<input type="checkbox" class="dont_cross_corners">
<label class="option_label">Don't Cross Corners</label> <br>
</div>
</div>
<h3 id="breadthfirst_header"><a href="#">Breadth-First-Search</a></h3>
<div id="breadthfirst_section" class="finder_section">
<header class="option_header">
<h3>Options</h3>
</header>
<div class="optional sub_options">
<input type="checkbox" class="allow_diagonal" checked>
<label class="option_label">Allow Diagonal</label> <br>
<input type="checkbox" class="bi-directional">
<label class="option_label">Bi-directional</label> <br>
<input type="checkbox" class="dont_cross_corners">
<label class="option_label">Don't Cross Corners</label> <br>
</div>
</div>
<h3 id="bestfirst_header"><a href="#">Best-First-Search</a></h3>
<div id="bestfirst_section" class="finder_section">
<header class="option_header">
<h3>Heuristic</h3>
</header>
<div id="bestfirst_heuristic" class="sub_options">
<input type="radio" name="bestfirst_heuristic" value="manhattan" checked />
<label class="option_label">Manhattan</label> <br>
<input type="radio" name="bestfirst_heuristic" value="euclidean"/>
<label class="option_label">Euclidean</label> <br>
<input type="radio" name="bestfirst_heuristic" value="octile"/>
<label class="option_label">Octile</label> <br>
<input type="radio" name="bestfirst_heuristic" value="diagonal"/>
<label class="option_label">Diagonal</label> <br>
<input class="spinner" name="bestfirst_weight" value="1000">
<label class="option_label">Weight</label> <br>
</div>
<header class="option_header">
<h3>Options</h3>
</header>
<div class="optional sub_options">
<input type="checkbox" class="allow_diagonal" checked>
<label class="option_label">Allow Diagonal</label> <br>
<input type="checkbox" class="bi-directional">
<label class="option_label">Bi-directional</label> <br>
<input type="checkbox" class="dont_cross_corners">
<label class="option_label">Don't Cross Corners</label> <br>
</div>
</div>
<h3 id="dijkstra_header"><a href="#">Dijkstra</a></h3>
<div id="dijkstra_section" class="finder_section">
<header class="option_header">
<h3>Options</h3>
</header>
<div class="optional sub_options">
<input type="checkbox" class="allow_diagonal" checked>
<label class="option_label">Allow Diagonal</label> <br>
<input type="checkbox" class="bi-directional">
<label class="option_label">Bi-directional</label> <br>
<input type="checkbox" class="dont_cross_corners">
<label class="option_label">Don't Cross Corners</label> <br>
</div>
</div>
<h3 id="dest_header"><a href="#">Num of destinations</a></h3>
<div id = "NoOfDest" class="finder_section" >
<!-- <header><h2 class = "header_title">No. of destinations</h2></header> -->
<div class="options">
<input type="radio" name="dest" value="One" />
<label class="option_label">1</label> <br>
<input type="radio" name="dest" value="Two"/>
<label class="option_label">2</label> <br>
<input type="radio" name="dest" value="Three"/>
<label class="option_label">3</label> <br>
</div>
<div class="options">
<input type="radio" name="priority" value=1 >
<label class="option_label">Give priority</label> <br>
<input type="radio" name="priority" value=0 checked>
<label class="option_label">No priority</label> <br>
<!-- <input type="radio" name="dest" value="Four"/>
<label class="option_label">4</label> <br> -->
</div>
<button id="button1" class="control_button">Set dest</button>
</div>
<h3 id="maze_header"><a href="#">Maze</a></h3>
<div id = "maze_section" class="finder_section">
<!-- <header><h2 class = "header_title">No. of destinations</h2></header> -->
<div class="options">
<input type="radio" name="maze" value=1 />
<label class="option_label">DFS</label> <br>
<input type="radio" name="maze" value=2>
<label class="option_label">Prim</label> <br>
</div>
<button id="button2" class="control_button" >Set maze</button>
</div>
</div><!-- .accordion -->
</div><!-- #algorithm_panel -->
<div id="play_panel" class="panel right_panel">
<div id="play_new">
<button id="button3" class="control_button">Start Search</button>
<button id="button4" class="control_button">Pause Search</button>
<button id="button5" class="control_button">Clear Terrain</button>
</div>
</div>
<div id="landscape_panel" class="panel ">
<header><h2 class = "header_title">Set landscape</h2></header>
<div id="landscape" class="options">
<input type="radio" name="terrain" value=0 checked />
<label class="option_label">Obstacles</label> <br>
<input type="radio" name="terrain" value=1>
<label class="option_label">Hill</label> <br>
<input type="radio" name="terrain" value=2>
<label class="option_label">Valley</label> <br>
</div>
</div>
</div>
</div> -->
<div id="stats"></div>
<footer>
Project hosted on <a href="https://github.com/Meeta14/pf_mars/">GitHub</a><br>
Click <a href="./Mars.pdf">here</a> for documentation
</footer>
</body>
</html>