Click here to Skip to main content
Licence 
First Posted 1 Sep 2004
Views 149,372
Bookmarked 73 times

Polygon Triangulation

By | 29 Jul 2005 | Article
An article on sample code for triangulation of complex polygons.

Introduction

HGRD is a code for triangulation of a polygon with or without holes. It can triangulate and also deal with many disconnected polygons treated as a single one (see figure with the triangulation of Norway border line). The algorithm is based on Delaunay triangulation. One of the main problems was to keep complexity order as low as possible (N log N) so tree structures (i.e., STL map) are used in critical parts. Thanks to this, it was possible to triangulate a complex polygon with around 40000 nodes within 6s (Athlon 1.4GHz DDR 266).

Using the code

The class HPolygon encapsulates functionality of a class HGrd which is responsible for triangulation. HPolygon provides also simple import and output of data (the syntax of input and output files are described inside 'readme' attached to the zip file with the code). Hopefully, this should make usage of the triangulator quite easily especially if you want to build the code into your application.

The demo is a console application which takes as arguments the names of input and output files. The output file can be used in Amtec Tecplot visualization software (not so readily available) but can be easily transformed to other formats.

Any feedback will be highly appreciated.

History

  • July 28, 2005: I have decided to release the hgrd under GNU Lesser General Public License.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

_qqq_

Researcher

Poland Poland

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Questionerror c2440 Pinmemberdavood_m22:12 16 Aug '11  
AnswerRe: error c2440 Pinmember_qqq_11:28 8 Sep '11  
Questionvolume calulation between two surfaces Pinmemberaser34trw341:40 5 Jul '11  
GeneralVC2008 Compiler Errors PinmemberMeriInssi0:17 17 Aug '09  
GeneralAnother uninitialized variable Pinmemberultimatenexus23:48 23 Apr '08  
QuestionIt doesent work "out of the box"? PinmemberThrored3:41 29 Jan '08  
GeneralCompile Errors (GCC 4.1.1) Pinmemberpmacko12:31 25 Sep '07  
GeneralRe: Compile Errors (GCC 4.1.1) Pinmembercodecack4:56 7 Nov '09  
Generali am just a biginer Pinmemberpushn7:11 10 Jul '07  
QuestionCompile Errors VS2005 [modified] Pinmemberarkuhl17:43 23 Apr '07  
AnswerRe: Compile Errors VS2005 Pinmember_qqq_21:28 24 Apr '07  
GeneralRe: Compile Errors VS2005 : A solution PinmemberDevRX9:33 30 Jul '07  
AnswerRe: Compile Errors VS2005 PinmemberDevGisRX9:36 30 Jul '07  
General3d fragmentation PinmemberShokker122:32 11 Jan '07  
GeneralRe: 3d fragmentation Pinmember_qqq_3:13 11 Jan '07  
Questionhow to insert one point ? Pinmembere_ilite16:09 19 Dec '06  
AnswerRe: how to insert one point ? Pinmember_qqq_3:10 11 Jan '07  
GeneralErrors in vect.h Pinmemberaunghtet6:00 3 Aug '06  
GeneralCo-linear line segments PinmemberJon Evans22:48 27 Jul '05  
GeneralNice code :).. to bad it's GPL. PinPopularsussAnonymous4:14 13 Jun '05  
GeneralRe: Nice code :).. to bad it's GPL. Pinmembertsohg10:43 15 Jun '05  
GeneralRe: Nice code :).. to bad it's GPL. Pinmember_qqq_23:09 3 Jul '05  
GeneralRe: Nice code :).. to bad it's GPL. PinsussDuduff6:44 27 Jul '05  
GeneralRe: Nice code :).. to bad it's GPL. PinmemberArmel Asselin22:51 2 Aug '05  
GeneralRe: Nice code :).. to bad it's GPL. Pinmemberitouh20:26 4 Aug '05  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120528.1 | Last Updated 29 Jul 2005
Article Copyright 2004 by _qqq_
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid