[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1589
  • Last Modified:

Polygon\Polygon Intersection

Hi,
Im looking for an algorithm that works out the intersecting polygon
of 2 polygons (a set of points that result in an enclosed shape).
The polygon can be either concave, convex, simple or/and complex.
The prototype for the function is along the lines of:
CAreaFeature* CAreaFeature::Intersect(CAreaFeature*);

If anyone has any C/C++ code that does this, it would be much
appreciated. :)
0
spiffles
Asked:
spiffles
3 Solutions
 
tpanarCommented:
From Graphics Gems

See code @ http://ftp.arl.mil/ftp/pub/Gems/original/RayPolygonIntersect.c

Regards,
-Tammie
0
 
foodlebardleCommented:
If the polygons can be concave, it is possible that the intersection would not be a single polygon.
0
 
spifflesAuthor Commented:
Well for concave, return an array of the polygons formed
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now