WpfGraph is a tool to create animations of graph algorithms using a WPF based 3D rendering engine.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 83d46a1 Apr 2, 2017
Failed to load latest commit information.
WpfGraph.Core.Test Initial import Apr 2, 2017
WpfGraph.Core Initial import Apr 2, 2017
WpfGraph.Ui Initial import Apr 2, 2017
.gitignore Initial import Apr 2, 2017
LICENSE Initial commit Apr 2, 2017
README.md Update README.md Apr 2, 2017
Readme.txt Initial import Apr 2, 2017
Settings.StyleCop Initial import Apr 2, 2017
WpfGraph.sln Initial import Apr 2, 2017



WPFGraph is a tool to create animations of graph algorithms using a WPF based 3D rendering engine.
You can create a graph by adding nodes and edges to the UI simply by using your mouse.
Then you can execute a graph algorithm like Dijkstra on the created graph.

Additional information about the implementation can be found under Resources.

Author: Daniel Palme
Blog: www.palmmedia.de
Twitter: @danielpalme

Sample Animation

Watch a video of a sample animation:

Sample animation


  • By clicking on an empty area, a new node is created
  • By clicking on two nodes within one second (not necessarily different nodes), a new edge is created
  • By clicking at a node or edge, its properties can be edited in the panel on the right
  • All graph algorithms can be executed by selecting the corresponding entry in the menu

Implement custom graph algorithms

The application already contains several graph algorithms like Dijkstra or Kruskal. To create your own algorithms, add a new class to the solution and implement the interface IGraphAlgorithm. After recompiling the solution, your algorithm will be listed in the menu.

Creating animations is quite simple, some extension methods make things even easier. In the following example, we add two nodes to the graph, then we flash the two nodes for 3 seconds. After the flashing is finished, both nodes are moved to another position.

public void Execute(IGraph<NodeData, EdgeData> graph)

    this.node1 = graph.AddNode(new NodeData(new Point3D(0, 25, 0)));
    this.node2 = graph.AddNode(new NodeData(new Point3D(0, -25, 0)));

    this.graph.AddEdge(this.node1, this.node2);

    this.node2.Blink(3000, this.Callback);

private void Callback()
    this.node1.Move(new Point3D(25, 0, 0), 4000);
    this.node2.Move(new Point3D(-25, 0, 0), 4000);