0

Possible Duplicate:
A simple algorithm for polygon intersection

How to find out intersection points of cutting polygon and polygon to be cut with their line segments in clock-wise or counter clock-wise in C#.

Any suggestions are appreciated.

Thanks in advance.

Community
  • 1
  • 1
hemanth kumar
  • 3,068
  • 10
  • 41
  • 64

1 Answers1

-2

Sounds more like a homework or an interview problem.

  1. There is no C# api either to represent lines, polygons or to find points of intersection. You need to implement these classes.

  2. Refer to some vector algebra text on how to represent line segments as vectors and using vector algebra to compute points of intersection.

    • you will need to represent polygons as collections of line vectors
    • calculating points of intersection of polygons is simply computing points of intersection of line segments of one polygon with those from another
  3. refer to any computer graphics for better algorithms to compute polygon intersections.

Sesh
  • 5,993
  • 4
  • 30
  • 39