|
-
Feb 14th, 2008, 10:21 PM
#1
[RESOLVED] Intersecting Lines
I have to admit that I haven't even thought about this problem, so it may be SERIOUSLY easy, but I'm designing something different, and know this place is a source for good suggestions, so here it is:
I have two objects in a database. These objects could be defined down to two points, and I almost certainly will do it that way, though the objects are 3D. Therefore, there is a line segment defined by the points (X1,Y1) - (X2,Y2).
I will also have another table of line segments. Without any thought, I can query the database to find that set of line segments that are near the target line segment, but I'm looking for a way to determine whether one of the line segments in the table intersect the target line segment.
Here's the reason: One piece of a robot brain will be examining gaps in the map it is creating of the world. A gap is an unexplored area between two objects (which have been identified by other modules based on touch and ultrasonic echo location). One thing about echo location is that I only get single points from an object, so I can't tell without some kind of investigation whether two echoes are separate objects, or the same (there's MUCH more going into it than that, but I don't want to write a book here). Therefore, this module will figure out which gaps should be investigated to see whether or not they are real, or just blind spots. To do this, the robot will have to figure out whether or not it has traveled through the gaps that have been found. Thus, the points mentioned are the objects, and the line segment table will hold the past travels of the bot. Of course, gap detection is something the bot will be doing only when it doesn't have something more important to do, but it will go into building a more accurate world map.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|