gle ‐ an introduction to the GLE Tubing & Extrusions Library #include <GL/gle.h> The GLE Tubing and Extrusion Library is a graphicsapplication programming interface (API). The libraryconsists of a number of "C" language subroutines for drawingtubing and extrusions. The library is distributed in sourcecode form, in a package that includes documentation, a VRMLproposal, Makefiles, and full source code and header files.It uses the OpenGL (TM) programming API to perform theactual drawing of the tubing and extrusions.A "sweep" or "extrusion" is a 2D contour (polyline) that isswept or extruded along a 3D path (polyline). For example,sweeping a circle along a straight line will generate acylinder. Sweeping a circle along a circular path willgenerate a doughnut (torus). The library also includes a set of utility routines fordrawing some of the more common extruded shapes: apolycylinder, a polycone, a generalized torus (circle sweptalong a helical path), a "helix" (arbitrary contour sweptalong a helical path) and a "lathe" (arbitrary contour sweptalong a helical path, with torsion used to keep the contouraligned). The most general extrusion supported by this library allowsan arbitrary 2D contour to be swept around an arbitrary 3Dpath. A set of normal vectors can be specified to go alongwith the contour; the normal vectors determine theappearance of the contour when lighting is turned on. A setof colors and affine matrices can be specified to go alongwith the 3D path. The colors are used to color along thepath. The affine matrices are used to operate on thecontour as it is swept along. If no affine matrices arespecified, the contour is extruded using the mathematicalconcept of "parallel translation" or "Gaussian translation".That is, the contour is moved (and drawn) along theextrusion path in a "straight" manner. If there are affinematrices, they are applied to the contour at each extrusionsegment before the segment is drawn. The affine matrices allow work in a quasi‐non‐Euclideanspace. They essentially allow the contour to be distorted asit is swept along. The allow the contour to be rotated,translated and rescaled as it is drawn. For example, arescaling will turn a polycylinder into a poly‐cone, sincethe circle that is being extruded is scaled to a differentsize at each extrusion vertex. A rotation allows the contourto be spun around while it is being extruded, thus forinstance allowing drill‐bit type shapes to be drawn. A ‐2‐ translation allows the appearance of shearing in real space;that is, taking a contour and displacing it, withoutotherwise bending it. Note that the affines are 2x3matrices, not 3x4 matrices, since they apply to the 2Dcontour as it is being extruded. http://linas.org/gle/index.html gleExtrusion, gleHelicoid, gleLathe, glePolyCone,glePolyCylinder, gleScrew, gleSetJoinStyle, gleSpiral,gleSuperExtrusion, gleTextureMode, gleToroid,gleTwistExtrusion, gleTwistExtrusion, gleSuperExtrusionLinas Vepstas (linas@linas.org)