Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 9th, 2005, 9:58 AM   #1
Aphex_Twin
Newbie
 
Join Date: Mar 2005
Posts: 27
Rep Power: 0 Aphex_Twin is on a distinguished road
Path finding algorithms & miscelaneous stuff

The problem is this. You have a predefined space (say a square), in which there are a series of "obstacles" (concave or convex polygons).

Can you help me with a couple of ideas, links, suggestions on an algorithm that finds the shortest path between two arbitrary points in that space (granted, of course, if neither A, nor B are inside any of the obstacles)?


Secondly, if you have a random concave polygon, do you know of an algorithm that can split it into a minimum number of triangles and the combined perimeter of the new shapes is minimal?
Aphex_Twin is offline   Reply With Quote
Old Jul 9th, 2005, 1:21 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
For the first, look up Dijkstra's Shortest Path Algorithm.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Jul 10th, 2005, 12:07 PM   #3
Aphex_Twin
Newbie
 
Join Date: Mar 2005
Posts: 27
Rep Power: 0 Aphex_Twin is on a distinguished road
Here is what I have in mind.

I have an "enclosure" made up of passable and impassable terrain. In the picture below the impassable terrain is black.

So everything is made up of polygons. My purpose is to construct an algorithm that could divide the terrain into triangles as it is shown in the picture. Well, the larger or more obtuse triangles could themselves be subdivided into smaller triangles if it is necessary.

Now if we take the centers of weight of the triangles (the blue dots) and join them with the centers of weight of the neighbouring triangles (triangles that share at least a vertice) we can arrange the terrain as an un-oriented graph. The nice thing about this setting is that you can always find a path from point A to B if both A and B are in passable terrain (and here is where Dijkstra comes in).

I would appreciate any hints and ideas
Attached Images
File Type: gif map.GIF (7.1 KB, 50 views)
Aphex_Twin is offline   Reply With Quote
Old Jul 10th, 2005, 7:02 PM   #4
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
What do you need help with? You seem to have got it!
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:43 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC