jburkardt

TRIANGULATION_DISPLAY_OPENGL\ Display a Triangulation Using OpenGL {#triangulation_display_opengl-display-a-triangulation-using-opengl align=”center”} ====================================


TRIANGULATION_DISPLAY_OPENGL is a C++ program which reads the name of two data files defining a triangulation, reads the data, and displays the triangulation using OpenGL.

The files defining the triangulation consist of one file containing the coordinates of the points, and a second file that lists the indices of the nodes making up each triangle. Either 3-node or 6-node triangles may be used.

Usage: {#usage align=”center”}

triangulation_display_opengl prefix

where prefix is the common filename prefix:

Licensing: {#licensing align=”center”}

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages: {#languages align=”center”}

TRIANGULATION_DISPLAY_OPENGL is available in a C++ version.

CAUSTIC_OPENGL, a C++ program which computes a caustic curve and displays it using OpenGL.

FEM_BASIS_T3_DISPLAY, a MATLAB program which displays a basis function associated with a linear triangle (“T3”) mesh.

FEM_BASIS_T6_DISPLAY, a MATLAB program which reads a quadratic triangle mesh and displays any associated basis function.

FERN_OPENGL, a C++ program which uses OpenGL to display the Barnsley fractal fern.

FLOOD_OPENGL, a C program which allows a user to select a region and flood it with color, using OpenGL, by Art Wetzel.

LIFE_OPENGL, a C program which simulates a version of John Conway’s “Game of Life”, displaying the results using OpenGL.

LIGHTS_OUT_OPENGL, a C++ program which sets up a “Lights Out” game and allows the user to solve it, using the OpenGL graphics window.

LISSAJOUS_OPENGL, a C++ program which computes a Lissajous figure and displays it using OpenGL.

MESH_DISPLAY_OPENGL, a C++ program which reads data defining a polygonal mesh and displays it using OpenGL.

OPENGL, C++ programs which illustrate the use of the OpenGL graphics library;

POLYGONAL_SURFACE_DISPLAY_OPENGL, a C++ program which displays a surface in 3D described as a set of polygons, using OpenGL.

ROTATING_CUBE_DISPLAY_OPENGL, a C++ program which displays a rotating color cube in 3D, using OpenGL;

SPHERE_XYZ_DISPLAY_OPENGL, a C++ program which reads XYZ information defining points in 3D, and displays a unit sphere and the points, using OpenGL.

TABLE, a format which is used for the input files to TRIANGULATION_DISPLAY_OPENGL.

TABLE_DELAUNAY, a C++ program which computes the Delaunay triangulation of a set of points.

TABLE_IO, a C++ library which supplies the routines used to read the TABLE file.

TABLE_VORONOI, a C++ program which computes information about the Voronoi diagram of the points.

TRIANGULATION_DISPLAY, a MATLAB program which displays the nodes and elements of a triangulation on the MATLAB graphics screen;

TRIANGULATION_HISTOGRAM, a C++ program which computes histograms of data over a triangulation.

TRIANGULATION_MASK, a C++ program which takes an existing triangulation and deletes triangles and their corresponding nodes as requested by the user.

TRIANGULATION_NODE_TO_ELEMENT, a C++ program which reads files describing a set of nodes, their triangulation, and the value of one or more quantities at each node, and outputs a file that averages the quantities for each element. This operation in effect creates an “order1” finite element model of the data.

TRIANGULATION_ORDER3, a data directory which contains a description and examples of order 3 triangulations.

TRIANGULATION_ORDER6, a data directory which contains a description and examples of order 6 triangulations.

TRIANGULATION_PLOT, a C++ program which reads data defining a triangulation and creates a PostScript image of the nodes and triangles.

TRIANGULATION_QUAD, a C++ program which estimates the integral of a function over a triangulated region.

XY_DISPLAY_OPENGL, a C++ program which reads an XY file of 2D point coordinates, and displays an image of those points using OpenGL.

XYL_DISPLAY_OPENGL, a C++ program which reads XYL information defining points and lines in 2D, and displays an image using OpenGL.

XYZ_DISPLAY_OPENGL, a C++ program which reads an XYZ file of 3D point coordinates, and displays an image of those points using OpenGL.

Reference: {#reference align=”center”}

  1. Edward Angel,\ Interactive Computer Graphics, a Top-Down Approach with OpenGL,\ Addison-Wesley, 2000,\ ISBN: 0-201-38597-X,\ LC: T385.A514.
  2. Renate Kempf, Chris Frazier, editors,\ OpenGL Reference Manual,\ Addison-Wesley, 1997,\ LC: T385.O642.
  3. Mason Woo, Jackie Neider, Tom Davis,\ OpenGL Programming Guide,\ Addison-Wesley, 1997,\ LC: T385.N435.
  4. Richard Wright, Michael Sweet,\ OpenGL Superbible,\ Waite Group Press, 1996,\ LC: T385.W73.
  5. http://www.opengl.org/\ The official OpenGL site.

Source Code: {#source-code align=”center”}

Examples and Tests: {#examples-and-tests align=”center”}

ELL3 is an L-shaped region, which may be triangulated by order-3 triangles.

ELL6 is an L-shaped region, which may be triangulated by order-6 triangles.

List of Routines: {#list-of-routines align=”center”}

You can go up one level to the C++ source codes.


Last revised on 03 October 2009.