[comp.graphics] polygon clipping

koolish@bbn.COM (Richard Koolish) (12/24/87)

References for polygon clipping:

    "Reentrant Polygon Clipping" by Ivan Sutherland and Gary Hodgman
    CACM, Vol 17, No 1, January 1974

    "An Analysis and Algorithm for Polygon Clipping" by You-Dong Liang
    and Brian Barsky, CACM Vol 26, No 11, November 1983

neiderer@amsaa-seer.brl.mil (Andrew Neiderer ) (04/23/91)

Will clipping a triangle to a rectangular region always result
in a convex polygon (or no polygon at all) ?  This seems reasonable
to me, but I just want to make sure so that I can restrict scan-
conversion to convex polygons.  Thanks.

lambert@silver.cs.umanitoba.ca (Tim Lambert) (04/24/91)

>>>>> On 23 Apr 91 10:24:09 GMT, neiderer@amsaa-seer.brl.mil (Andrew Neiderer ) said:

> Will clipping a triangle to a rectangular region always result
> in a convex polygon (or no polygon at all) ? 

Yes, because the intersection of two convex sets is convex.

dfr@usna.NAVY.MIL (Prof. David F. Rogers) (04/25/91)

In article <LAMBERT.91Apr23232842@silver.cs.umanitoba.ca> lambert@silver.cs.umanitoba.ca (Tim Lambert) writes:
>>>>>> On 23 Apr 91 10:24:09 GMT, neiderer@amsaa-seer.brl.mil (Andrew Neiderer ) said:
>
>> Will clipping a triangle to a rectangular region always result
>> in a convex polygon (or no polygon at all) ? 
>
>Yes, because the intersection of two convex sets is convex.

No, it depends on whether you do an INTERIOR or an EXTERIOR clip.
If you do and EXTERIOR clip you can get a concave polygon.

Dave Rogers

markv@pixar.com (Mark VandeWettering) (05/08/91)

>>> Will clipping a triangle to a rectangular region always result
>>> in a convex polygon (or no polygon at all) ? 

>>Yes, because the intersection of two convex sets is convex.

>No, it depends on whether you do an INTERIOR or an EXTERIOR clip.
>If you do and EXTERIOR clip you can get a concave polygon.

Well, we generally do mean interior clips when we speak about clipping 
to a rectangular region.  And anyway, the exterior of a rectangle is 
not a convex set, so the original statement is correct as stands.

mark

dfr@usna.NAVY.MIL (Prof. David F. Rogers) (05/08/91)

In article <1991May7.181010.22047@pixar.com> markv@pixar.com (Mark VandeWettering) writes:
!!!! Will clipping a triangle to a rectangular region always result
!!!! in a convex polygon (or no polygon at all) ? 
!
!!!Yes, because the intersection of two convex sets is convex.
!
!!No, it depends on whether you do an INTERIOR or an EXTERIOR clip.
!!If you do and EXTERIOR clip you can get a concave polygon.
!
!Well, we generally do mean interior clips when we speak about clipping 
!to a rectangular region.  And anyway, the exterior of a rectangle is 
!not a convex set, so the original statement is correct as stands.
!
!mark

No, not necessarily, a simple example is any windowing system.
The intersection of two convex sets is convex IN THE CONTEXT OF
A BOOLIAN OPERATION. In the context of `clipping' this is not
true since clipping CAN be either interior or exterior.

Dave Rogers

lambert@silver.cs.umanitoba.ca (Tim Lambert) (05/09/91)

AN = neiderer@amsaa-seer.brl.mil (Andrew Neiderer)
TL = lambert@cs.umanitoba.ca (Tim Lambert)
DR = dfr@usna.NAVY.MIL (Prof. David F. Rogers)
MV =  markv@pixar.com (Mark VandeWettering)

AN> Will clipping a triangle to a rectangular region always result
AN> a convex polygon (or no polygon at all) ? 

TL> Yes, because the intersection of two convex sets is convex.

DR> No, it depends on whether you do an INTERIOR or an EXTERIOR clip.
DR> If you do and EXTERIOR clip you can get a concave polygon.

MV> Well, we generally do mean interior clips when we speak about clipping 
MV> to a rectangular region.  And anyway, the exterior of a rectangle is 
MV> not a convex set, so the original statement is correct as stands.

DR> No, not necessarily, a simple example is any windowing system.

OK.  Consider X.  Clipping regions are lists of (non-intersecting)
rectangles.  No exterior clipping.  (Of course, when you have one
window partly obscuring another, you are really doing an exterior clip
against the obscuring window, but that is not the way X looks at it.)

I understand "clipping" to mean interior clipping and "exterior
clipping to R" to mean clipping to the exterior of R.  

DR> The intersection of two convex sets is convex IN THE CONTEXT OF
DR> A BOOLIAN OPERATION. In the context of `clipping' this is not
DR> true since clipping CAN be either interior or exterior.

I don't understand.  Are you saying that in the context of clipping
`intersection' sometimes means `difference'?

Tim