Skip to content

Brett-Constantinoff/3D-Graph-Visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

184 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D Visualization of Graph Based Traversal Algorithms

Project Inspiration

This application was designed to visualize popular graph traversal algorithms in an easy to use and intuitive manner. Many algorithms can be difficult to visualize and thus their understanding may be lost with some individuals. Therefore, seeing certain operations being performed in a visual manner can help with understanding algorithms in a fun and interactive way.

Project Description

When starting the application, the user is brought to the landing screen where a canvas shows an interactive cube "box" where they can manipulate its orientation and size. capture1

The user can then generate a "maze" which is composed of nodes in a graph. Each nodes represents a inner cube in the outer cube frame, where certain nodes are designate as maze pathways (green) and maze walls (blue). Each node in this initialization state is transparent. capture 2

Once the desire maze has been generated the user can then select an algorithm to begin solving the maze, and once the maze has been solved the shortest path is then displayed to the user. Mazes can be continualy generated and solved by the user.

Algorithm Description

There were four main algorithms used in this project: depth first search (DFS), breadth first search (bfs), djikstras algorithm, and the a-star algorithm.

Depth First Search

DFS is used in order to create the maze pathways from a starting node to an ending node. This is not the recursive version seen in many implementations, instead a first in first out (FIFO) data structure known as a stack is used to perform DFS.

Breadth First Search

BFS is the first traversal algorithm implemented and uses a queue in order to visit all the nodes in the graph. Capture

The shortest path calculated from bfs may not be the true shortest path, but indeed it will be the first path discorvered by the algorithm. Capture

Djikstra's Algorithm

Djikstra's algorithm is the second traversal algorithm which uses known edge weights to calculate distances from any node to the start node. Node weights are visua! lized as a heat map from light (low weight) to dark (heavy weight) Capture

Unlike BFS, the shortest path is indeed the shortest path from start node to end node Capture

A-Star Algorithm

A-star is the third and final algorithm to be implemented, it operates much the same as djikstra's algorithm but uses an extra heurstic in its node distance calculation. This heurstic is determined to be the Euclidean distance from the start node to any other node. Capture

The shortest path calculation is the same as djikstra's algorithm and results in the same shortest path. Capture

Other Features

For each traversal algorithm, the pseudo code is available for visualization. This allows the user to see the code responsible for the interactive algorithm.

BFS Psuedo Code

Capture

Djikstra's Pseudo Code

Capture

A-Star Pseudo Code

Capture

Project Usage

https://algovis.net/

About

A visualization tool for graph based algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •