GlGeomShapes is a collection of C++ programs generating triangular meshes for some simple geometric objects. It presently supports:

GlGeomShapes also includes code for rendering them in Modern OpenGL, allowing them to be easily included in other programs. These are part of a set of programs introducing the use of Modern OpenGL, which are intended to accompany a possible second edition of the book 3D Computer Graphics: A mathematical approach with OpenGL, Cambridge University Press, 2003.

GlGeomShapes currently supports spheres, cylinders, cones, tori, cubes, Bezier patches, and the Utah teapot. The entire code package can be downloaded in a zip file from the URL below. All shapes need to use the two base files GlGeomBase[.cpp,.h]. Spheres need to use GlGeomSphere[.cpp,.h]. Cylinders need to use GlGeomCylinder[.cpp,.h]. Cones need to use GlGeomCone[.cpp,.h]. Tori need to use GlGeomTorus[.cpp,.h]. Cubes need to use GlGeomCube[.cpp,.h]. Bezier patches need to use GlGeomBezier[.cpp,.h]. Utah teapots are built from Bezier patches and need to use the four files GlGeomBezier[.cpp,.h] and GlGeomTeapot[.cpp,.h].

The code uses GLEW (Opengl Extension Wrangler) for the interface to OpenGL.

Thanks to Derrick Yao for contributing GlGeomCube to the package.

Version 1.3/1.4 of GlGeomShapes, last revision July 24, 2023. Copyright 2020, 2022, 2023.