Skip to content

About

Educational Greenfoot scenario that visualizes graphs.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

#Project descriptions

  • PROJECT TITLE: VisualGraphs
  • PURPOSE OF PROJECT: Educational.
  • DATE: 27.09.2016
  • AUTHOR: Tobias Dorsch
  • AIM: The idea is to teach basic graph concepts. There do exist plenty of visualization of graph algorithms on the web. To my knowledge none of them lets you implement you own algorithm. The Scenario provides a visualization of Graphs and also some data structures (queue, stack, key-value table). Learners can therefore see what their algorithms do or don't do. The provided algorithm could be removed in a learning environment.

#How to run This is Greenfoot-Project. Clone the repository. Download and run Greenfoot. Select "Scenario" and choose "Open ...".

#How to use

  • To start the scenario press the "Run" button.

  • On the top left there is a switch that displays a mode which can be changed by clicking on the switch. You can also use the following key bindings:

    1. m -> Move Vertex
    2. v -> Add Vertex
    3. e -> Add Edge
    4. c -> Change weight (of edge)
    5. t -> Tiefensuche (depth-first-search)
    6. b -> Breitensuche (breadth-first-search)
    7. s -> Dijkstra (shortest path)
  • Depending on the mode you can:

    1. Move vertices by dragging them.
    2. Add a vertex to the graph by clicking somewhere inside the upper left rectangle. NOTE: Works only if you click outside vertices and of the rectangles that bound the edges. If necessary move edges before.
    3. Add an edge by clicking the two vertices that it should connect.
    4. Delete an edge by clicking on it and confirming by clicking on the button appearing in the upper right corner. The NOTE from above applies here as well.
    5. Perform a depth-first-search: first click on the start edge, then on the target edge.
    6. Perform a breadth-first-search: first click on the start edge, then on the target edge.
    7. Find the length of the shortest paths starting from an edge. NOTE: You have to select two edges. The second one is completely ignored so far. The algorithm for now does not display the actual shortes paths, but only their length.

CAVEAT:

The whole application is still RATHER BUGGY. If necessary press "reset" and then re-"run" the scenario. In particular this might be necessary after performing any of the available algorithms.

#CREDITS: The edge-deletion-confirmation-icon was made by Pavel Kozlov from www.flaticon.com and is licensed by CC 3.0 BY

About

Educational Greenfoot scenario that visualizes graphs.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages