Ross Hatton
The boundaries on all my objects (robot and obstacles) are positively oriented (when moving around the object in the direction of its component line segments, the interior of the object is always on the left). I use this property extensively to determine whether a given line segment is inside or outside of any given object.
At the intersection of two line segments, one line segment will have come from ``inside" the other if its vector has a positive dot product with the outward pointing normal vector of the other segment. This rule can be expanded to handle special cases, such as segments which meet at endpoints, though the rules are more complex.
The robot gets onto the graph by running the corr_loop
function with a coarse step size, then a finer one. Having reached the
graph, it detects the edge it is on and follows it to a node with follow_edge_to_node. Having reached the node, it uses the identify_node
function to find the edges which connect to the node. The robot then
follows each edge to its terminal node, and adds that node to the
graph. The algorithm terminates when all nodes in the graph have no
unexplored edges.
The distances and directions to the obstacles are found by first finding the nearest vertex to the robot, then projecting the robot's position onto the obstacle edges connecting to that vertex. The closet point on the obstacle is the nearest projection which is on the edge of the obstacle, or the vertex if neither projection is on the obstacle.
This document was generated using the LaTeX2HTML translator Version 2002-2-1 (1.71)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -split 0 writeup.tex
The translation was initiated by Ross Hatton on 2007-11-05