Click here to Skip to main content
Click here to Skip to main content

Tesselation of Mono Connected Non Convex Polygon

, 6 Feb 2002 CPOL
Rate this:
Please Sign up or sign in to vote.
Tesselation of mono connected non convex polygon

Sample Image - PolyTry.jpg

Introduction

A simple alternative to OpenGL polygon tesselation callback. You can focus on file triangle.h that contain the class to evaluate convexity of polygon and tesselate the polygon. No extra points are inserted. You can work only with planar polygon also in 3D.

Every suggestion in order to speed up the class and create better tesselation ('better' triangles) is appreciated.

History

  • 6th February, 2002: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Peppino Sbargzeguti

United States United States
No Biography provided

Comments and Discussions

 
Generalcut object in slicing Pinmemberjoy_nim24-Feb-06 7:01 
GeneralPossible error and fix PinmemberGregDude21-Jul-05 16:34 
GeneralRobust tesselation PinmemberSkavenger1-Jul-05 23:04 
GeneralRe: Robust tesselation [modified] PinmemberLiu Guoping9-Aug-06 16:51 
AnswerRe: Robust tesselation PinmemberSkavenger310-Aug-06 2:42 
GeneralProblem in CPolyTri::ComputeNormal PinmemberTorsten B8-Jun-04 2:43 
GeneralRe: Problem in CPolyTri::ComputeNormal PinmemberSebastien Maraux13-Dec-04 4:52 
GeneralRe: Problem in CPolyTri::ComputeNormal PinmemberSébastien Maraux14-Dec-04 0:45 
GeneralGood Article Pinmembermchapman123422-May-04 12:50 
GeneralFound an index range error in code PinmemberTruePyroman23-Feb-03 15:38 
GeneralRe: Found an index range error in code Pinmembertopus10-Apr-03 3:46 
GeneralBetter tesselation Pinmemberjeckle8-Feb-02 10:00 
GeneralRe: Better tesselation Pinmemberpepito10-Feb-02 23:05 
A more little explanation about my article. In order to tesselate the polygon i use this tecnique:
First compute the normal of polygon (i use the newell method see Graphic Gems..)
For each sequence of three vertex ( i, j, k ) in the polygon compute the vector area (alias normal of triangle).
If the normal go in the opposite direction of polygon normal the triangle is 'concave' and go ahead.
If the area il 0.0 the point j is alligned from i to k and eliminated from the list of vertex.
If the normal of triangle is in the same direction of polygon normal the triangle is convex. In the last case check if any other point is inside the triangle (the IsPointInside function). This function test if the point is on solid angle ik ^ jk. if this is true compute distance of intersection k->point to line ij and test distance. If all is good emit triangle, remove vertex j from list and go to the next triplet....
The reason for wich i posted this article is that i don't find this tecnique in any book or article and ave a doubt about the mathematical basic of my algoritm In other words is true that it work in any case ? (my experience ask yes but is very far from a theorem...)
The Delauney algortim work fine but is 'computational' more expensive than my algortim (using my Delauney implementation) for this reason i try this way. At the end my apologize for my poor english but my sincerly idea is to contribute to codeproject and suggest a way to resolv a problem that i found. Thanks pepito.
GeneralRe: Better tesselation Pinmemberjeckle11-Feb-02 11:46 
GeneralRe: Better tesselation PinmemberRick York11-Feb-02 11:53 
GeneralBetter tesselation PinmemberTim Aidley8-Feb-02 3:45 
GeneralRe: Better tesselation Pinmemberkilowatt8-Feb-02 9:21 
GeneralRe: Better tesselation Pinmemberpepito sbarzeguti10-Feb-02 23:03 
QuestionGuareschiano anche tu? PinmemberAnonymous7-Feb-02 22:19 
AnswerRe: Guareschiano anche tu? PinmemberDieter Hammer8-Feb-02 1:04 
GeneralRe: Guareschiano anche tu? Pinmemberpepito8-Feb-02 2:38 
GeneralRe: Guareschiano anche tu? PinmemberAnonymous10-Feb-02 23:37 
GeneralVery poor article on very interesting subject... PinmemberGeorge7-Feb-02 15:25 
GeneralRe: Very poor article on very interesting subject... PinmemberPepito Sbarzeguti7-Feb-02 22:46 
GeneralRe: Very poor article on very interesting subject... PinmemberAnonymous7-Feb-02 22:47 
GeneralRe: Very poor article on very interesting subject... PinmemberAndy Metcalfe8-Feb-02 0:14 
GeneralRe: Very poor article on very interesting subject... PinmemberAnonymous10-Feb-02 0:26 
GeneralRe: Very poor article on very interesting subject... PinmemberGeorge10-Feb-02 0:53 
GeneralRe: Very poor article on very interesting subject... PinmemberNish [BusterBoy]10-Feb-02 1:21 
GeneralRe: Very poor article on very interesting subject... PinmemberMazdak10-Feb-02 2:02 
GeneralRe: Very poor article on very interesting subject... PinmemberNish [BusterBoy]10-Feb-02 2:04 
GeneralRe: Very poor article on very interesting subject... PinmemberAnonymous10-Feb-02 16:33 
GeneralRe: Very poor article on very interesting subject... PinmemberNish [BusterBoy]10-Feb-02 17:32 
QuestionIs the artical "fill in the blank"? PinmemberJason De Arte7-Feb-02 14:57 
AnswerRe: Is the artical "fill in the blank"? PinmemberNish [BusterBoy]8-Feb-02 0:13 
QuestionWhy? PinmemberAnonymous7-Feb-02 12:24 
AnswerRe: Why? Pinmemberasim_u7-Feb-02 12:57 
AnswerRe: Why? PinmemberJosh Knox8-Feb-02 6:48 
AnswerRe: Why? PinsussAnonymous8-Aug-02 8:55 
AnswerRe: Why? PinsussGernot20-Aug-02 3:09 

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.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141216.1 | Last Updated 7 Feb 2002
Article Copyright 2002 by Peppino Sbargzeguti
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid