XYZF_DISPLAY_OPENGL
XYZF_DISPLAY_OPENGL,
a C++ code which
reads XYZF information defining 3D points and faces,
and displays an image using OPENGL.
The program displays the data, and slowly rotates it.
SXYZ_VORONOI, which computes the Voronoi diagram for a set of points
on a sphere, is an example of the programs whose output can be displayed
by XYZF_DISPLAY_OPENGL.
Usage:
xyzf_display_opengl prefix
where
-
prefix is the common file prefix,
reads the XYZ coordinate data in prefix.xyz and
the face information in prefix.xyzf, and displays a plot of the points
and faces. The image will slowly rotate. Successive mouse clicks alternate the
axis of rotation from the X, to the Y, to the Z axis and back again.
Licensing:
The information on this web page is distributed under the MIT license.
Languages:
xyzf_display_opengl is available in
a C++ version.
Related Data and Programs:
FERN_OPENGL,
a C++ program which
uses OpenGL to display the Barnsley fractal fern.
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;
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_VORONOI,
a Fortran90 library which
reads an XYZ file of 3D points on the unit sphere, and
computes and plots Delaunay triangulations and Voronoi diagrams.
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.
TRIANGULATION_DISPLAY_OPENGL,
a C++ program which
reads files defining a triangulation and displays an image
using Open GL.
XYF_DISPLAY_OPENGL,
a C++ program which
reads XYF information defining points and faces in 2D, and displays
an image using OpenGL.
XYZ,
a data directory which
contains some examples of 3D pointsets.
XYZ_DISPLAY_OPENGL,
a C++ program which
reads an XYZ file of 3D point coordinates, and displays
an image of those points using OpenGL.
XYZF,
a data directory which
contains some examples of sets of 3D points and faces.
XYZL,
a data directory which
contains some examples of sets of 3D points and lines.
XYZL_DISPLAY_OPENGL,
a C++ program which
reads XYZL information defining points and lines in 3D, and displays
an image in a MATLAB graphics window.
Reference:
-
Edward Angel,
Interactive Computer Graphics,
a Top-Down Approach with OpenGL,
Addison-Wesley, 2000,
ISBN: 0-201-38597-X,
LC: T385.A514.
-
Renate Kempf, Chris Frazier, editors,
OpenGL Reference Manual,
Fourth Edition,
Addison-Wesley, 2004,
ISBN: 032117383X,
LC: T385.O642
-
Mason Woo, Jackie Neider, Tom Davis,
OpenGL Programming Guide,
Addison-Wesley, 1997,
ISBN: 0-201-46138-2,
LC: T385.N435
-
Richard Wright, Michael Sweet,
OpenGL Superbible,
Third Edition,
Sams, 2004,
ISBN: 0672326019,
LC: T385.W73
-
https://www.opengl.org/
The official OpenGL site.
Source Code:
Examples and Tests:
-
sphere.xyz, the vertices of a Voronoi diagram on the unit sphere.
-
sphere.xyzf, the vertices that must be joined to make the faces.
-
sphere.png,
a PNG image of
the screen generated by Open GL.
List of Routines:
-
MAIN is the main program for XYZF_DISPLAY_OPENGL.
-
CH_EQI is true if two characters are equal, disregarding case.
-
CH_TO_DIGIT returns the integer value of a base 10 digit.
-
DISPLAY generates the graphics output.
-
I4VEC_MAX returns the value of the maximum element in an I4VEC.
-
I4VEC_MIN returns the value of the minimum element in an I4VEC.
-
MOUSE determines the response to mouse input.
-
MYINIT initializes OpenGL state variables dealing with viewing and attributes.
-
MYRESHAPE determines the window mapping.
-
R8_MAX returns the maximum of two R8's.
-
R8_MIN returns the minimum of two R8's.
-
R83VEC_MAX returns the maximum value in an R83VEC.
-
R83VEC_MIN returns the minimum value in an R83VEC.
-
S_LEN_TRIM returns the length of a string to the last nonblank.
-
S_TO_I4 reads an I4 from a string.
-
S_TO_I4VEC reads an I4VEC from a string.
-
S_TO_R8 reads an R8 from a string.
-
S_TO_R8VEC reads an R8VEC from a string.
-
S_WORD_COUNT counts the number of "words" in a string.
-
SPIN_IMAGE adjusts the angle of rotation and redisplays the picture.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
XYZ_DATA_PRINT prints the data for an XYZ file.
-
XYZ_DATA_READ reads the data in an XYZ file.
-
XYZ_HEADER_PRINT prints the header of an XYZ file.
-
XYZ_HEADER_READ reads the header of an XYZ file.
-
XYZF_DATA_PRINT prints the data of an XYZF file.
-
XYZF_DATA_READ reads the data in an XYZF file.
-
XYZF_HEADER_PRINT prints the header of an XYZF file.
-
XYZF_HEADER_READ determines the number of face items in an XYZF file.
You can go up one level to
the C++ source codes.
Last revised on 01 March 2011.