Skip to content

dusanerdeljan/graph-algorithms-visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graph-algorithms-visualization

Graph algorithms visualization made using olcPixelGameEngine (Visual Studio 2015 Project)

Currently supported algorithms:

  • Prim-Jarnik MST
  • Kruskal MST
  • Boruvka MST
  • Prim-Jarnik MST maze generation
  • Kruskal MST maze generation
  • Boruvka MST maze generation
  • DFS
  • BFS
  • Dijkstra
  • A*

Dijkstra's algorithm - Maze solving example

A* algorithm - Maze solving example

DFS algorithm - Maze solving example

BFS algorithm - Maze solving example

Kruskal algorithm visualization example

"Kruskal algorithm visualization"

Prim-Jarnik algorithm visualization example

"Prim-Jarnik algorithm visualization"

Boruvka algorithm visualization example

"Boruvka algorithm visualization example"

Kruskal MST maze generation example

"Kruskal MST maze generation"

Prim-Jarnik MST maze generation example

"Prim-Jarnik MST maze generation"

Boruvka MST maze generation example

"Boruvka MST maze generation"

Controls

Press Enter to move to the next frame of the animation.
If you want animation to be played automatically, set USER_ANIMATION_CONTROL macro to 0 (defined in Main.cpp).
To generate a maze, set DRAW_MAZE macro to 1 (by default it is 0) and, optionally, configure maze parameters (MAZE_GRAPH_VERTICES, VERTEX_SCALE).
To control the speed of the animation, set TIME_BETWEEN_FRAMES macro to desired value (in seconds).
To change which algorithm will be used for MST (or maze generation), set m_Type attribute of the GraphAlgorithms class to desired value.
To change which algorithm will be used for maze solving, set m_PathType attribute of the GraphAlgorithms class to desired value.

License

This program is free.
You can redistribute it and/or change it under the terms of GNU General Public License version 3.0 (GPLv3).
You can find a copy of the license in the repository.