11,928,919 members (44,723 online)
alternative version

167K views
21 bookmarked
Posted

# Tesselation of Mono Connected Non Convex Polygon

, 6 Feb 2002 CPOL
 Rate this:
Tesselation of mono connected non convex polygon

## 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

## Share

 United States
No Biography provided

## You may also be interested in...

 FirstPrev Next
 Good Article mchapman123422-May-04 12:50 mchapman1234 22-May-04 12:50
 Found an index range error in code TruePyroman23-Feb-03 15:38 TruePyroman 23-Feb-03 15:38
 Re: Found an index range error in code topus10-Apr-03 3:46 topus 10-Apr-03 3:46
 Another litle improvement: Use previus code and change the line while( nVertex > 3 && bNoErrors ) with the line while( nVertex >= 3 && bNoErrors ) Also to solve the problem with degenerate points (alligned or sub-alligned) replace the test in function Triangle Area (that work fine for planar 2D polygon's) // // j is alligned from i to k ? // if( (-FLT_EPSILON) < m_A && m_A < FLT_EPSILON ) return degenerate; with: // // j is alligned from i to k ? // if( (-FLT_EPSILON) < m_A && m_A < FLT_EPSILON && (-FLT_EPSILON) < m_N[0] && m_N[0] < FLT_EPSILON && (-FLT_EPSILON) < m_N[1] && m_N[1] < FLT_EPSILON && (-FLT_EPSILON) < m_N[2] && m_N[2] < FLT_EPSILON ) return degenerate; Last (but not least) if some consecutive triangles as the same origin vertex you can optimizing opengl drawing code collecting the common side (from two consecutive triangles) and using triangle fan (example triangle vertex 0,1,2 && 0,2,3 etc.. can be collected in a triangle fan 0,1,2,3 etc..) Thanks very much for this very speedy code
 Better tesselation jeckle8-Feb-02 10:00 jeckle 8-Feb-02 10:00
 Re: Better tesselation pepito10-Feb-02 23:05 pepito 10-Feb-02 23:05
 Re: Better tesselation jeckle11-Feb-02 11:46 jeckle 11-Feb-02 11:46
 Re: Better tesselation Rick York11-Feb-02 11:53 Rick York 11-Feb-02 11:53
 Better tesselation Tim Aidley8-Feb-02 3:45 Tim Aidley 8-Feb-02 3:45
 Re: Better tesselation kilowatt8-Feb-02 9:21 kilowatt 8-Feb-02 9:21
 Re: Better tesselation pepito sbarzeguti10-Feb-02 23:03 pepito sbarzeguti 10-Feb-02 23:03
 Guareschiano anche tu? Anonymous7-Feb-02 22:19 Anonymous 7-Feb-02 22:19
 Re: Guareschiano anche tu? Dieter Hammer8-Feb-02 1:04 Dieter Hammer 8-Feb-02 1:04
 Re: Guareschiano anche tu? pepito8-Feb-02 2:38 pepito 8-Feb-02 2:38
 Re: Guareschiano anche tu? Anonymous10-Feb-02 23:37 Anonymous 10-Feb-02 23:37
 Very poor article on very interesting subject... George7-Feb-02 15:25 George 7-Feb-02 15:25
 Re: Very poor article on very interesting subject... Pepito Sbarzeguti7-Feb-02 22:46 Pepito Sbarzeguti 7-Feb-02 22:46
 Re: Very poor article on very interesting subject... Anonymous7-Feb-02 22:47 Anonymous 7-Feb-02 22:47
 Re: Very poor article on very interesting subject... Andy Metcalfe8-Feb-02 0:14 Andy Metcalfe 8-Feb-02 0:14
 Re: Very poor article on very interesting subject... Anonymous10-Feb-02 0:26 Anonymous 10-Feb-02 0:26
 Re: Very poor article on very interesting subject... George10-Feb-02 0:53 George 10-Feb-02 0:53
 Re: Very poor article on very interesting subject... Nish [BusterBoy]10-Feb-02 1:21 Nish [BusterBoy] 10-Feb-02 1:21
 Re: Very poor article on very interesting subject... Mazdak10-Feb-02 2:02 Mazdak 10-Feb-02 2:02
 Re: Very poor article on very interesting subject... Nish [BusterBoy]10-Feb-02 2:04 Nish [BusterBoy] 10-Feb-02 2:04
 Re: Very poor article on very interesting subject... Anonymous10-Feb-02 16:33 Anonymous 10-Feb-02 16:33
 Re: Very poor article on very interesting subject... Nish [BusterBoy]10-Feb-02 17:32 Nish [BusterBoy] 10-Feb-02 17:32
 Is the artical "fill in the blank"? Jason De Arte7-Feb-02 14:57 Jason De Arte 7-Feb-02 14:57
 Re: Is the artical "fill in the blank"? Nish [BusterBoy]8-Feb-02 0:13 Nish [BusterBoy] 8-Feb-02 0:13
 Why? Anonymous7-Feb-02 12:24 Anonymous 7-Feb-02 12:24
 Re: Why? asim_u7-Feb-02 12:57 asim_u 7-Feb-02 12:57
 Re: Why? Josh Knox8-Feb-02 6:48 Josh Knox 8-Feb-02 6:48
 Re: Why? Anonymous8-Aug-02 8:55 Anonymous 8-Aug-02 8:55
 Re: Why? Gernot20-Aug-02 3:09 Gernot 20-Aug-02 3:09
 Last Visit: 31-Dec-99 19:00     Last Update: 28-Nov-15 18:46 Refresh 1