Is there any known approach to compute the intersection rectangle between two rectangles? I mean if the rectangle A is defined by (x1,y2, x2,y2) and B by (x3,y3, x4,y4), how do
The general problem of intersecting polygons is explained in detail in here: http://davis.wpi.edu/~matt/courses/clipping . Incidentally, one of the best libraries for the task, with bindings for several programming languages, is GPC - the General Polygon Clipper library: http://www.cs.man.ac.uk/~toby/alan/software