Skip to content

stevenhuang010/Pathfinding-Illustrator

Repository files navigation

Pathfinding-Illustrator

This is a tool built with Java, JavaFX, HTML, and CSS that helps users understand and picture various pathfinding and maze generation algorithms by illustrating these algorithms step-by-step.

Implemented algorithms include:

  • Dijkstra's Algorithm
  • A* Search
  • Breadth-First Search
  • Depth-First Search
  • Bidirectional BFS
  • Prim's Maze Generation Algorithm
  • Recursive Division Maze Generation Algorithm.

Basic Controls

  • The light-pink circle represents the start node and the light-blue circle represents the end node. These nodes can be dragged and dropped at different locations on the grid.

  • The user is also able to add walls or erase walls by checking the Draw Wall checkbox or Erase Wall checkbox, respectively, and dragging their mouse across the grid. Wall nodes are shaded in a dark-purple color, and these nodes are impassable for pathfinding algorithms.

  • When a pathfinding algorithm is executed (located at the top of the application), the square-shaped grid nodes that the algorithm has visited will change to a light-purple color to showcase how the algorithm works, while the unvisited nodes remain white. Since wall nodes are impassable, they will remain dark-purple during the algorithm. If a path from the start node to the end node exists, a light blue path will be drawn at the conclusion of the algorithm. Otherwise, no path will be drawn.

  • After a pathfinding algorithm concludes, the user can drag the start or end node to any place on the grid and the pathfinding algorithm will update in real time, continuing to shade the visited nodes light-purple and show the shortest path (if it exists) as the user drags the circular node.

  • When a maze generation algorithm is executed, dark-purple walls will be added, so that pathfinding algorithms must go around them when looking for a valid path.

Other Features

The folowing extra features are included at the bottom of the application.

  • About PathFinder - Opens a new stage with information about this application

  • Clear Board - Clears all animations and walls

  • Speed Slider - Changes the animation speed

  • Draw Wall - If this box is checked, the user can draw walls on the board by dragging the mouse across the grid

  • Erase Wall - If this box is checked, the user can erase walls on the board by dragging the mouse across the grid

  • Show Steps - If this box is checked, the animation for the algorithm will be showed; otherwise, only the final product will be visible

  • Finish Algorithm - If an algorithm is occurring, this button can be pressed to immediately finish it and show the final product

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published