On 6/14/07, Monu Rathour <[EMAIL PROTECTED]> wrote:
>
> There are some rectangles and some pin-vertices's in a two dimensional
> plane. I have to join pin-vertices's  such that  lines are  rectilinear and
> line should not cross over the  rectangles.
>
> How to write a mathematical formula for calculating path length ?


 If the two points can be connected by lines taking only two fixed
directions alternately, then the distance b/w them is the sum of the
distances of the x coordinate and y coordinate. This can be easily
understood by considering a chess board and trying to reach from lower-left
to upper-right only moving up/right :). This can be verified by starting
with a line that directly connects the two and for every intersection with
rectangles break the line into two or more.

But if the lines could be winding (with U shapes) then I guess it gets more
complex and you'd have to determine the individual segments and then
evaluate the distance. Still thinking to find an easier means to quantify
this :-?.

Cheerios
Ramaswamy


> >
>
>


-- 
"Chaos is the rule in nature, not an exception"

http://ramaswamy.r.googlepages.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to