{"id":20236405,"url":"https://github.com/danielpalme/wpfgraph","last_synced_at":"2025-04-10T19:04:30.054Z","repository":{"id":66271578,"uuid":"86980572","full_name":"danielpalme/WpfGraph","owner":"danielpalme","description":"WpfGraph is a tool to create animations of graph algorithms using a WPF based 3D rendering engine.","archived":false,"fork":false,"pushed_at":"2022-01-04T12:22:12.000Z","size":89,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T16:45:52.050Z","etag":null,"topics":["csharp","graph-algorithms","wpf"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielpalme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-02T11:00:24.000Z","updated_at":"2024-06-19T06:43:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"a3f383fe-3488-4539-b0de-d87f088b545d","html_url":"https://github.com/danielpalme/WpfGraph","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpalme%2FWpfGraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpalme%2FWpfGraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpalme%2FWpfGraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpalme%2FWpfGraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielpalme","download_url":"https://codeload.github.com/danielpalme/WpfGraph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248279196,"owners_count":21077406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","graph-algorithms","wpf"],"created_at":"2024-11-14T08:20:42.362Z","updated_at":"2025-04-10T19:04:30.046Z","avatar_url":"https://github.com/danielpalme.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WpfGraph\nWPFGraph is a tool to create animations of graph algorithms using a WPF based 3D rendering engine.  \nYou can create a graph by adding nodes and edges to the UI simply by using your mouse.  \nThen you can execute a graph algorithm like Dijkstra on the created graph.\n\nAdditional information about the implementation can be found under [Resources](#resources).\n\nAuthor: Daniel Palme  \nBlog: [www.palmmedia.de](http://www.palmmedia.de)  \nTwitter: [@danielpalme](http://twitter.com/danielpalme)  \n\n## Sample Animation\n\nWatch a video of a sample animation: \n\n[![Sample animation](http://img.youtube.com/vi/wQJBQB-Ajdc/0.jpg)](http://www.youtube.com/watch?v=wQJBQB-Ajdc \"Sample animation\")\n\n## Usage\n\n* By clicking on an empty area, a new node is created\n* By clicking on two nodes within one second (not necessarily different nodes), a new edge is created\n* By clicking at a node or edge, its properties can be edited in the panel on the right\n* All graph algorithms can be executed by selecting the corresponding entry in the menu\n\n## Implement custom graph algorithms\nThe application already contains several graph algorithms like [Dijkstra](https://github.com/danielpalme/WpfGraph/blob/master/WpfGraph.Ui/Algorithms/Dijkstra.cs) or [Kruskal](https://github.com/danielpalme/WpfGraph/blob/master/WpfGraph.Ui/Algorithms/SpanningTree/Kruskal.cs). To create your own algorithms, add a new class to the solution and implement the interface [IGraphAlgorithm](https://github.com/danielpalme/WpfGraph/blob/master/WpfGraph.Ui/Algorithms/IGraphAlgorithm.cs). After recompiling the solution, your algorithm will be listed in the menu.\n\nCreating 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.\n\n```csharp\npublic void Execute(IGraph\u003cNodeData, EdgeData\u003e graph)\n{\n    graph.Clear();\n\n    this.node1 = graph.AddNode(new NodeData(new Point3D(0, 25, 0)));\n    this.node2 = graph.AddNode(new NodeData(new Point3D(0, -25, 0)));\n\n    this.graph.AddEdge(this.node1, this.node2);\n\n    this.node1.Blink(3000);\n    this.node2.Blink(3000, this.Callback);\n}\n\nprivate void Callback()\n{\n    this.node1.Move(new Point3D(25, 0, 0), 4000);\n    this.node2.Move(new Point3D(-25, 0, 0), 4000);\n}\n```\n\n## Resources\n\n* http://www.codeproject.com/KB/WPF/WPFGraphAnimation.aspx\n* http://www.palmmedia.de/Blog/2009/12/29/wpf-animation-of-graph-algorithms-part-1\n* http://www.palmmedia.de/Blog/2009/12/29/wpf-animation-of-graph-algorithms-part-2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielpalme%2Fwpfgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielpalme%2Fwpfgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielpalme%2Fwpfgraph/lists"}