kimos <(E-Mail Removed)> scribbled the following:

> hi all,

> how to calculate the intersection of 2 rectangle

> a rectangle is the following:

> Rectangle makeRectangle (Point lowerLeft, Point upperRight) {

>

> Rectangle r;

> r.pt1 = lowerLeft;

> r.pt2 = upperRight;

> return r;

> }

> and Point is the following:

> Point makePoint(int x, int y) {

> Point p;

> p.x = x;

> p.y = y;

> return p;

> }

> And i want the know how to make:

> Rectangle intersection(Rectangle r1, Rectangle r2)

> this should return the intersection of the 2 rectangles

> anyone can help me plz?
Which part are you having trouble with, calculating the intersection's

coordinates or implementing the algorithm as a C program?

--

/-- Joona Palaste ((E-Mail Removed)) ------------- Finland --------\

\--

http://www.helsinki.fi/~palaste --------------------- rules! --------/

"Immanuel Kant but Genghis Khan."

- The Official Graffitist's Handbook