2d Polygon Intersection

bizimCity
Unregistered
 
Post: #1
I have two and more polygon.. Other polygon intersec with these polygons. I want to intersection points of the other points.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Member
Posts: 320
Joined: 2003.06
Post: #3
hmmm... I have a cat and there are other cats. Other cats fight with my cat. I want to intersection dogs with other dogs.

huh?

Chopper, iSight Screensavers, DuckDuckDuck: http://majicjungle.com
Quote this message in a reply
Moderator
Posts: 771
Joined: 2003.04
Post: #4
reubert Wrote:huh?
Quote:Location: turkey

I've seen native speakers with less clear posts, cut the guy some slack. Wink
Quote this message in a reply
Member
Posts: 161
Joined: 2005.07
Post: #5
reubert Wrote:hmmm... I have a cat and there are other cats. Other cats fight with my cat. I want to intersection dogs with other dogs.
A point is a part of a polygon, but a dog is not part of a cat. Your analogy is therefore flawed. If you're going to slam someone for not making sense, at least make sense while doing it. Wink
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #6
As a general answer to the question, if your polygons can be described as a set of line segments ( where a line is a->b ) it can be very simple to determine which intersect and where, simply by checking each segment against each segment.

Now, making that run quickly is an exercise up to the reader. Obvious approaches involve spatial partitioning ( to minimize the set of which lines *might* intersect others ) and boundary-box checks.

Also, if your polygons involve bezier curves, or splines or the like, it would be best to have -- if performance is an issue -- a high quality subdivision for rendering, and a low quality version for collision detection.

I have some code, if you want to see ( mine only handles beziers, though, and it's very ugly since I wrote it 6 or 7 years ago and was screwing around, but it works ).
Quote this message in a reply
Member
Posts: 320
Joined: 2003.06
Post: #7
points taken guys, my apologies bizimCity.

Chopper, iSight Screensavers, DuckDuckDuck: http://majicjungle.com
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Polygon budgets Kerome 1 2,956 Mar 7, 2010 04:55 AM
Last Post: mikey
  glut polygon winding strangeness OptimisticMonkey 2 3,135 Sep 7, 2009 06:27 PM
Last Post: OptimisticMonkey
  Need ray-sphere intersection code MattDiamond 23 15,334 Aug 31, 2009 02:28 PM
Last Post: Gengar003
  Getting the Normal for a polygon. Jaden 3 5,913 May 1, 2009 01:47 PM
Last Post: Nosredna
  Is there anything like polygon offset for GL_LINES? TomorrowPlusX 2 3,750 Jan 24, 2007 02:57 PM
Last Post: TomorrowPlusX