Converting lines to polygons?
-
Hello, I am working on an application where I get passed a list of line segments. I want to convert the line segments into polygons. Anybody have a reference to an algorithm or code fragment that can do this? Anybody have a quick sketch of an algorithm to do this. Thanks for any ideas. Craig
-
Hello, I am working on an application where I get passed a list of line segments. I want to convert the line segments into polygons. Anybody have a reference to an algorithm or code fragment that can do this? Anybody have a quick sketch of an algorithm to do this. Thanks for any ideas. Craig
BOOL Polygon( HDC hdc, // handle to DC CONST POINT *lpPoints, // polygon vertices int nCount // count of polygon vertices ); or am I missing something? INTP
-
BOOL Polygon( HDC hdc, // handle to DC CONST POINT *lpPoints, // polygon vertices int nCount // count of polygon vertices ); or am I missing something? INTP
John R. Shaw wrote: or am I missing something? Nope. That would be my suggestion as well :)
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
BOOL Polygon( HDC hdc, // handle to DC CONST POINT *lpPoints, // polygon vertices int nCount // count of polygon vertices ); or am I missing something? INTP
-
If only it were that ease...:) Yup, you are missing something. The lines are from a wire mesh drawing, there are thousands of lines and they make up hundereds of polygons. The trick is to figure out what lines grouped together make up a polygon. Craig
Search for "3D Graph ActiveX Control" at codeprject. I have not studied the code but it should help. There is no lack of graphics related sites on the www. INTP