Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Path Finder Visualizer

A Python tool to visualize pathfinding algorithms on real-world maps with 3D effects and dynamic sound.

Open In Colab

Demo

Features

  • Multiple Algorithms: BFS, A*, Dijkstra, and Greedy Best-First Search.
  • 3D/2D Visualization: Toggle between 3D perspective and 2D top-down views.
  • Rich 2D Maps: 2D mode includes rendering for rivers, lakes, forests, parks, and buildings.
  • Dynamic Sound: Growing pitch sound effects during search and a triumphant "found" sound.
  • Real Map Data: Fetches street networks from OpenStreetMap.
  • Video/GIF Export: Export animations to high-quality MP4 with audio or silent GIFs.

Supported Algorithms

Algorithm Type Description
BFS Unweighted Explores equally in all directions. Guarantees shortest path on unweighted graphs.
Dijkstra Weighted Explores based on actual road distance. Guarantees the shortest path.
A* Weighted + Heuristic Uses distance to target to guide search. Efficiently finds the shortest path.
Greedy BFS Heuristic Moves directly towards the target. Fast but not guaranteed to be shortest.

Requirements

  • Python 3.10+
  • FFmpeg: Required for video export (--mode export).

Quick Start

  1. Install Dependencies:

    poetry install
  2. Run Visualization:

    poetry run path-viz

CLI Usage

path-viz --mode [view|export|preview] --algo [bfs|astar|dijkstra|greedy] --dim [2d|3d] --duration 10 --output demo.gif
  • --mode: view (interactive), export (save to mp4/gif), preview (static check).
  • --algo: Choose the search algorithm.
  • --dim: 2d or 3d visualization.
  • --duration: Total animation length in seconds (default: 10).
  • --output: Optional filename (e.g., result.mp4 or demo.gif).

Output

  • Videos: Saved in the output/ directory.
  • Cache: Map data and features are cached in the cache/ directory.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Python-based 2D/3D pathfinding visualizer using OpenStreetMap (OSM) data, featuring A, Dijkstra, and BFS with dynamic sound effects

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages