Re: Java library for geometric?
From: Carl Howells (chowells_at_janrain.com)
Date: 07/15/04
- Next message: Roedy Green: "Re: size limitation to a .java file?"
- Previous message: Flip: "Re: size limitation to a .java file?"
- In reply to: ak: "Re: Java library for geometric?"
- Next in thread: Norman Barker: "Re: Java library for geometric?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Roedy Green: "Re: size limitation to a .java file?"
- Previous message: Flip: "Re: size limitation to a .java file?"
- In reply to: ak: "Re: Java library for geometric?"
- Next in thread: Norman Barker: "Re: Java library for geometric?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|