1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6+ < meta name ="description " content ="Interactive Graph Algorithm Simulator for visualizing BFS, DFS, and Dijkstra's algorithms with sound effects and animations ">
7+ < meta name ="keywords " content ="graph algorithms, BFS, DFS, Dijkstra, visualization, simulator, computer science ">
8+ < title > Graph Algorithm Simulator | Visualize BFS, DFS, Dijkstra</ title >
9+ < link rel ="stylesheet " href ="styles.css ">
10+ </ head >
11+ < body >
12+ < header >
13+ < h1 > Graph Algorithm Simulator</ h1 >
14+ < p class ="subtitle "> Visualize BFS, DFS, and Dijkstra's Algorithm</ p >
15+ </ header >
16+ < main >
17+ < div class ="simulator-container ">
18+ < div class ="canvas-container ">
19+ < canvas id ="graphCanvas "> </ canvas >
20+ </ div >
21+ < div class ="control-panel ">
22+ < button onclick ="startBFS() ">
23+ < svg width ="16 " height ="16 " viewBox ="0 0 24 24 " fill ="none " stroke ="currentColor " stroke-width ="2 " stroke-linecap ="round " stroke-linejoin ="round ">
24+ < circle cx ="12 " cy ="12 " r ="10 "> </ circle >
25+ < line x1 ="12 " y1 ="8 " x2 ="12 " y2 ="16 "> </ line >
26+ < line x1 ="8 " y1 ="12 " x2 ="16 " y2 ="12 "> </ line >
27+ </ svg >
28+ BFS
29+ </ button >
30+ < button onclick ="startDFS() ">
31+ < svg width ="16 " height ="16 " viewBox ="0 0 24 24 " fill ="none " stroke ="currentColor " stroke-width ="2 " stroke-linecap ="round " stroke-linejoin ="round ">
32+ < circle cx ="12 " cy ="12 " r ="10 "> </ circle >
33+ < path d ="M8 14s1.5 2 4 2 4-2 4-2 "> </ path >
34+ < line x1 ="9 " y1 ="9 " x2 ="9.01 " y2 ="9 "> </ line >
35+ < line x1 ="15 " y1 ="9 " x2 ="15.01 " y2 ="9 "> </ line >
36+ </ svg >
37+ DFS
38+ </ button >
39+ < button onclick ="startDijkstra() ">
40+ < svg width ="16 " height ="16 " viewBox ="0 0 24 24 " fill ="none " stroke ="currentColor " stroke-width ="2 " stroke-linecap ="round " stroke-linejoin ="round ">
41+ < circle cx ="12 " cy ="12 " r ="10 "> </ circle >
42+ < path d ="M16 16s-1.5-2-4-2-4 2-4 2 "> </ path >
43+ < line x1 ="9 " y1 ="9 " x2 ="9.01 " y2 ="9 "> </ line >
44+ < line x1 ="15 " y1 ="9 " x2 ="15.01 " y2 ="9 "> </ line >
45+ </ svg >
46+ Dijkstra
47+ </ button >
48+ < button class ="reset " onclick ="resetGraph() ">
49+ < svg width ="16 " height ="16 " viewBox ="0 0 24 24 " fill ="none " stroke ="currentColor " stroke-width ="2 " stroke-linecap ="round " stroke-linejoin ="round ">
50+ < polyline points ="1 4 1 10 7 10 "> </ polyline >
51+ < path d ="M3.51 15a9 9 0 1 0 2.13-9.36L1 10 "> </ path >
52+ </ svg >
53+ Reset
54+ </ button >
55+ </ div >
56+ < div id ="log "> </ div >
57+ </ div >
58+ < div id ="infoPopup " class ="popup ">
59+ < div class ="popup-header ">
60+ < h3 > Algorithm Information</ h3 >
61+ < button class ="popup-close " onclick ="hidePopup() "> ×</ button >
62+ </ div >
63+ < div id ="popupContent "> </ div >
64+ </ div >
65+ < div id ="notification " class ="notification "> </ div >
66+ </ main >
67+ < footer >
68+ < p > Designed by Aditya Pandey and Team | B.Tech 4th Semester | Graph Algorithm Visualization Tool</ p >
69+ </ footer >
70+ < script src ="script.js "> </ script >
71+ </ body >
72+ </ html >
0 commit comments