Skip to content

Create an undirected graph in VR and activate it to visualize Prim's Algorithm

Notifications You must be signed in to change notification settings

Hunter-Bobeck/Prim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prim

Created in Unity using SteamVR, Prim is a Vive virtuality application that allows the player to create an undirected graph and visualize Prim's Algorithm.

Features

  • Graph - The player can create a graph out of two kinds of elements: nodes, and automatic distance weighted undirected edges.
  • Prim's Algorithm - The player can visualize Prim's Algorithm computing the minimum spanning tree (maximum nodes connected, minimum total weight) for the graph, from a chosen starting node.

Visuals

  • Environment - rocky wilderness (to provide a nice natural atmosphere)

  • Nodes - represented by blue spheres

  • Edges - represented by green lines by default; yellow when highlighted by Prim's algorithm

  • Weights - number text label above each corresponding edge (distance is in meters)

Controls

The following controls are identical for each Vive controller.

Graph adjustments:

  • Touchpad Press - create node
  • Touchpad Hold - create edge from initially contacted node to finally contacted node
  • Trigger Press and Hold - grab and reposition contacted node
  • Grip Press - Single Controller - delete contacted node
  • Grip Press - Both Controllers - delete all elements in the graph

Prim's Algorithm command:

  • Menu Button Press - Either Controller - toggle the Prim minimum spanning tree visualization; when starting, the starting node will be chosen to be the node nearest to the controller doing the pressing

About

Create an undirected graph in VR and activate it to visualize Prim's Algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published