MESH_DISPLAY_OPENGL
Display a Polygonal Mesh Using OpenGL


MESH_DISPLAY_OPENGL is a C++ program which reads the name of two data files defining a polygonal mesh, reads the data, and displays the mesh using OPENGL.

The files defining the mesh consist of one file containing the coordinates of the points, and a second file that lists the indices of the nodes making up each element. All the elements in the mesh must have the same order, that is, the number of vertices.

Usage:

mesh_display_opengl prefix
where prefix is the common filename prefix: reads the node data from nodes.txt, the element data from elements.txt and displays a plot of the mesh.

Licensing:

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

Languages:

MESH_DISPLAY_OPENGL is available in a C++ version.

Related Data and Programs:

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

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

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.

opengl_test, C++ codes 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;

SCREENSHOT_OPENGL, a C++ program which shows how a program using the OpenGL graphics library can save a screenshot of the graphics being displayed.

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.

TRI_SURFACE_DISPLAY_OPENGL, a C++ program which displays the 3D graphics information in a TRI_SURFACE file using OpenGL.

TRIANGULATION_DISPLAY_OPENGL, a C++ program which reads data defining a triangulation and creates an image using OpenGL.

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

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

TRIANGULATION_ORDER6, a 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.

Reference:

  1. Edward Angel,
    Interactive Computer Graphics,
    A Top-Down Approach with OpenGL,
    Addison-Wesley, 2000,
    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.

Source Code:

ELL is an L-shaped region covered by triangles.

RECT is a rectangular region covered by quadrilaterals.

Q4 is a rectangular region covered by quadrilaterals, with a hole.

HEX is a mesh of hexagons.


Last revised on 26 March 2020.