2 added 1435 characters in body

More thoughts:

I want to decide if rectangles with negative dimensions makes much sense. I could leave this up to the users of the rectangles, but it is up to me to define what an operation like intersection does.

'neg' rectangles could just mean that the x,y is at the opposite corner than expected. ie they could be 'facing' the wrong way, and by moving x,y to the opposite corner, w,h can be made positive, and the rectangles are 'normalized'.

But when I consider intersection, imagine 2 rectangles moving along the plane, at first intersecting, but moving such that they overlap less and less - they eventually get to the point where they only touch at the corners - and the intersection is then a rectangle with w = h = 0.

Now, If we continue to move the rectangles further apart, you could either say that the result of intersection is still an empty rectangle, or I think it might make more sense to say the result is a 'negative' rectangle (and w,h depicts how far away they are from overlapping).

Given this concept, can it be somehow continued/followed/expanded in a logical/consistent way, and if so, what do we end up with?

Mathematically it would nice if it was a group, and if making it a group required a few other common operations (like union maybe) to be defined in a certain consistent way, I would like to explore that.

I just don't have any colleges nearby that think mathematically...

1

# Intersection/Union of Rectangles as a Group (or Monoid or...?)

In a computer graphing library, a rectangular region of the Cartesian plane may be defined by {x, y, w, h} (where w,h are width and height). Intersection (lets say '^') is defined as the overlapping region of two rectangles (and also is a rectangle). Union of r1 and r2 could be defined as the smallest (ie smallest w, smallest h) rectangle 'u' such that u ^ r1 = r1 and u ^ r2 = r2

etc.

My question(s):

• does negative w, h make 'sense',
• if so , what sense does it make? ie, and in particular, should the result of intersection of non-overlapping rectangles be a rectangle with negative width and/or height?
• can this be used to build a Group over the set of rectangles with the operation of union and/or intersection?

• what is the 'area' of a rectangle with width < 0 and height < 0. I would like it to be negative, but typically it is width x height, thus positive.

Sorry if this sounds more computerish than mathish, but I was once a math major, and non of the other computerish people I might ask know anything about group theory...