polygonal_surface_display_opengl, a C++ code which gets the names of the node and element files defining a polygonal surface, reads the information from the files, and displays the surface on the screen using OpenGL.

The surface is presented in rotation about the X axis. By clicking the mouse button, the axis of rotation will be advanced from X to Y to Z and back to X.


polygonal_surface_display prefix
where prefix is the common filename prefix, so that: reads the information and displays an image of the polygonal surface on the screen.


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


polygonal_surface_display_opengl is available in a C++ version.

Related Data and Programs:


caustic_opengl, a C++ code which computes a caustic curve and displays it using OpenGL.

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

LIFE_OPENGL, a C++ code which simulates a version of John Conway's "Game of Life", displaying the results using OpenGL.

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

LISSAJOUS_OPENGL, a C++ code 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, a data directory which contains examples of polygonal surface files.

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

SCREENSHOT_OPENGL, a C++ code 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++ code which reads XYZ information defining points in 3D, and displays a unit sphere and the points, using OpenGL.

TET_MESH_DISPLAY_OPENGL, a C++ code which reads files defining a tet mesh and displays an image using Open GL.

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

TRIANGULATION_DISPLAY_OPENGL, a C++ code which reads files defining a triangulation and displays an image using Open GL.


  1. Edward Angel,
    Interactive Computer Graphics, a Top-Down Approach with OpenGL,
    Addison-Wesley, 2000,
    ISBN: 0-201-38597-X,
    LC: T385.A514.

Source Code:

Last revised on 18 May 2023.