Test: Constrained Delaunay Triangulation

YouTube Preview Image

Features

  • Opengl based application showing constrained delaunay triangulation of a given string by the user, using Triangle library and Freetype library.

Downloads:

Report

The test is composed of two projects: a simple application just testing the use of triangle library and an application that triangulates and renders a string given by the user.

The second application uses triangle library for the constrained delaunay triangulation and freetype for getting the glyph’s outline. Triangle is fairly easy to use so no remarkable things to note. The most remarkable thing is how extract hole information from a contour in freetype library. You will have to take into account the orientation of the contour (you can use the area method to get it) and the orientation convention of the font.

Technology

  • C++
  • Opengl
  • Glut for Win32
  • Triangle
  • Freetype
  • Microsoft Visual Studio 2008 Professional Edition
  • Subversion
  • Redmine

Develop/Build/Test Machine Specs

  • Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz
  • 3072 Mb RAM
  • GeForce GTX 260GS (256 MB)
  • Nvidia Driver Version: 181.20
  • Microsoft Windows XP Professional SP3 x86

Resources

2 Responses to “Test: Constrained Delaunay Triangulation”

  1. Dorfe says:

    Hey, I found bug with holes (try to enter “8” and on triangles), here is quick fix:
    int k = 0;
    for(int i = 0; i < triangleHolesCount; ++i)
    {
    triangleHoles[k] = holes[i][0];
    triangleHoles[k + 1] = holes[i][1];
    k += 2;
    }

  2. Ruben Penalva says:

    Hi,
    thank you. I’ll take a look at it and upload a fixed version.

    Regards,
    Ruben Penalva