12,629,314 members (33,376 online)
alternative version

172.9K 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...

 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: 6-Dec-16 23:47 Refresh 1