Re: Java library for geometric?

From: Carl Howells (chowells_at_janrain.com)
Date: 07/15/04


Date: Thu, 15 Jul 2004 13:17:24 -0700

ak wrote:
>>I need to do some 2D computional geometry, like testing a couple of
>>polygons for intersection. If I understood java.awt.Polygon etc., I
>>can't test a Polygon for intersection with another Polygon, I just can
>>check for intersection with a Rectangle.
>>
>
> may be you could test if one of your polygons contains points from another
> polygon.
>

Doesn't work. Two polygons can intersect with neither containing
vertices in the other. Consider these two:

(0,5) -> (15, 5) -> (15,10) -> (0,10) -> (0,5)

and

(5,0) -> (10,0) -> (10, 15) -> (5,15) -> (5,0)

And while those are both rectangles to make the example simple, they
clearly don't have to be.



Relevant Pages

  • Re: Intersecting Polygons
    ... don't use polygons much so I can't help you out there. ... I should have asked about the intersection of 2 POLYGONS, ... >> places the coordinates of the intersection rectangle into the destination ... >> Doug. ...
    (microsoft.public.vb.general.discussion)
  • Re: Intersecting Polygons
    ... I should have asked about the intersection of 2 POLYGONS, ... The polygons can have 3 or more points/sides, ... > Hi Matt: ... > places the coordinates of the intersection rectangle into the destination ...
    (microsoft.public.vb.general.discussion)
  • booleans
    ... i've been trying to implement boolean operators (like intersection, ... subtraction) for 3D polygonal objects ... since certain polygons collide with more polygons ... ...
    (comp.graphics.algorithms)
  • Re: Crossing between PATCH and plane
    ... I have the following problem...I have a 3D object, defined by a patch structure, and I want to obtain the intersection between these object and a planar surface. ... The actual problem is a patch describing a ship hull. ... the shape of the hull, there could be more than 1 closed polygons, due ...
    (comp.soft-sys.matlab)
  • Re: Extracting polygons from a given set of lines
    ... all polygons from a given set of lines? ... load the PQ with the LOWER endpoint of each line segment. ... CLOSE the polygon below the intersection ...
    (comp.graphics.algorithms)