Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Campus Kiosk Kendal Hershberger & David Moses Union University Scholarship Symposium April 30, 2007.

Similar presentations


Presentation on theme: "A Campus Kiosk Kendal Hershberger & David Moses Union University Scholarship Symposium April 30, 2007."— Presentation transcript:

1 A Campus Kiosk Kendal Hershberger & David Moses Union University Scholarship Symposium April 30, 2007

2 Purpose ► ► Make an application to give directions to people new to campus who may not know their way around ► ► Make the application easily accessible ► ► Scalability

3 Choosing the Language ► ► OpenGL using C   Advantage - already familiar with the language and graphics library   Disadvantage - difficulty of drawing an entire campus ► ► DirectX   Disadvantage – Microsoft-specific systems

4 Choosing the Language ► ► Flash and ActionScript   Advantages ► ► Very accessible and easy to update ► ► Opportunity to learn a new language ► ► ActionScript has many similarites to Java and other high-level languages ► ► Easy drawing utilities   Disadvantages ► ► Unfamiliar

5 ActionScript ► ► scripting language behind Flash applications ► ► ActionScript 2.0   new object-oriented model ► ► Class-based, but classes defined in external.as file

6 Graph Searching ► ► Graphs consist of nodes and vectors (or edges). ► ► A node can be connected to another node via an edge. ► ► For our case, the edges are paths that traverse Union's campus, and each node represents a geographical point where they connect or terminate.

7 Graph Searching ► ► Example:

8 Graph Searching ► ► Depth   Depth First   Iterative Deepening   Best First ► Breadth  Breadth First  Uniform Cost  Dijkstra's Algorithm ► Problem: Find the best path from one node (one point on campus) to another node (another point on campus) ► Techniques:

9 Graph Searching ► ► Depth First   Go to a node, mark it as visited, push it on a stack   Go to a neighbour node, and do the same thing   If you’re at a dead end, pop the stack until you find an unvisited neighbour   Repeat until you’ve traversed the entire tree (optimal path) or until you have found the destination node (non-optimal)

10 Graph Searching ► ► Depth First

11 Graph Searching ► ► Iterative Deepening   Same as Depth First, but depth of search is controlled   Better for very large graphs, still slow. ► ► Best First   Greedy algorithm (not uninformed) that simply selects the closest node to the destination   VERY fast, but can generate horrible paths under certain conditions

12 Graph Searching ► ► Breadth First   Go to a node, put all of its neighbour in a queue   Visit each neighbour in the order they were placed, and put all of its neighbours in a queue   Continue until all nodes have been visited (optimal path) or until destination node is found (non-optimal path)

13 Graph Searching ► ► Breadth First

14 Graph Searching ► ► Uniform Cost   Same as Breadth First Search, but prioritizes nodes that have shortest path from origin rather than simply the next node in the queue   More realistic paths, but still takes long ► ► Dijkstra's Algorithm   Same as Uniform Cost, but actively keeps track of shortest path to node   Uses relaxation of the path cost   Much faster than all others

15 Graph Searching ► dijkstra = function (origin:Node, destination:Node) { ► var S:Array = new Array();// list of visited nodes ► var Q:Array = Node.getNodes(); // list of unvisited nodes ► origin.dv = 0;// initialize distance at origin to ► ► do { ► var u:Node = extractMin(Q);// remove node with lowest distance ► S.push(u);// mark it as visited ► var neighbors:Array = u.getNeighbors();// relax u's neighbors ► for (i=0; i

16 Graph Searching ► ► Dijkstra’s Algorithm

17 Creating the Campus Map ► ► Deciding on using an image or drawing the map ourselves ► ► Using Flash to draw graphics   vector vs. raster graphics ► ► Quality ► ► Scalability

18 Creating the Campus Map

19

20 Creating Paths ► ► Create a datatype to store the nodes and edges in ActionScript ► ► Make a list of points to place the nodes ► ► Display it in a Flash scene

21 Creating Paths ► ► Kirupa’s Graph ADT ► ► Node and Edge classes   var a:Node;   a = new Node("a", 200, 50);   a.addEdge(b, "a->b"); ► ► Uses Depth First to find path ► ► Dynamically draws the path from origin to destination

22 Finding the Best Path ► ► Our implementation of the Graph ADT ► ► Tested using points around the Belltower area ► ► Depth First search is fairly accurate and fast

23 Finding the Best Path ► ► Completed entry of points for the rest of campus ► ► Our naïve Depth First search algorithm reveals its limitations

24 Finding the Best Path ► ► Switched from Kirupa’s Depth First Search and implemented our own Dijkstra’s algorithm in ActionScript ► ► Still needed to provide interface and integrate map with graph

25 Building an Interface ► ► Added map layer to Flash scene ► ► Started adding buttons and designing interface components

26 Building an Interface ► ► Choosing locations in a List Box

27 Debugging ► ► Remaining Bugs   Refresh problem ► ► Fixed by deleting the calls to draw.   Speed degradation ► ► Caused by unintended doubling of the graph size.   Faulty edges ► ► Incorrect data entry… over 500 individual edges!

28 Future Possibilities ► ► Interiors of buildings, including classrooms and faculty offices   Zoom feature   Database integration ► ► Touch screen kiosks located around campus ► ► Print feature

29 Demonstation / Questions


Download ppt "A Campus Kiosk Kendal Hershberger & David Moses Union University Scholarship Symposium April 30, 2007."

Similar presentations


Ads by Google