# 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

 View All Threads First Prev Next
 Problem in CPolyTri::ComputeNormal Torsten B 8-Jun-04 2:43
 Re: Problem in CPolyTri::ComputeNormal Sebastien Maraux 13-Dec-04 4:52
 Re: Problem in CPolyTri::ComputeNormal 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-Dec-14 2:26 Refresh 1