View Single Post
  #10 (permalink)  
Old August 22nd, 2004, 12:55 AM
mehdi62b mehdi62b is offline
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

way 2,
you know tow rectangles can intersect each other if and only if there is two borderlines thath intersect each other so you should check 4*4=16 times it that means you should check every borderline in rectangle one with all the borderlines in rectangle 2 for intersections,I think you can write a simple function that take two lines and determine if they intersect each other then use this function 16 times in your program for implementing this I told you.
Hth.

--------------------------------------------
Mehdi.:)
Reply With Quote