12,819,140 members (27,087 online)
alternative version

#### Stats

174.2K views
22 bookmarked
Posted 6 Feb 2002

# 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

## About the Author

 United States
No Biography provided

 Pro

## Comments and Discussions

 View All Threads First Prev Next
 Problem in CPolyTri::ComputeNormal Torsten B8-Jun-04 2:43 Torsten B 8-Jun-04 2:43
 Re: Problem in CPolyTri::ComputeNormal Sebastien Maraux13-Dec-04 4:52 Sebastien Maraux 13-Dec-04 4:52
 Re: Problem in CPolyTri::ComputeNormal Sébastien Maraux14-Dec-04 0:45 Sébastien Maraux 14-Dec-04 0:45
 Area computation is bugged :you should add in CPolyTriView::OnDraw()existing : // for( int i=0 ; i < m_nPoints ; i++ ){ points[i][0] = m_points[i].x; points[i][1] = m_points[i].y; if( i ) Area+= ( m_points[i].x * m_points[i-1].y - m_points[i-1].x * m_points[i].y) * 0.5f; } //// added after for loop : Area += ( m_points[0].x * m_points[i-1].y - m_points[i-1].x * m_points[0].y) * 0.5f;Also, if area computation is only used for normal deduction, you can avoid *0.5f as it will not change area sign.
 Last Visit: 31-Dec-99 19:00     Last Update: 25-Mar-17 0:02 Refresh 1

General    News    Suggestion    Question    Bug    Answer    Joke    Praise    Rant    Admin

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