gle(3GLE)

πŸ’– gle β€” the GLE Tubing & Extrusions Library, explained bestie to bestie πŸ’–

okay so. welcome to gle, from the GLE manual section (that's the 3GLE part, iykyk). this is the intro page to the GLE Tubing & Extrusions Library and honestly? it's giving art class meets linear algebra. let's go. ✨


🌸 NAME 🌸

gle β€” an introduction to the GLE Tubing & Extrusions Library. that's it, that's the name, no notes. πŸŽ€


✨ SYNOPSIS ✨

the whole vibe starts with one line, bestie:

#include <GL/gle.h>

that's the door. you walk through it, you get tubing. πŸšͺπŸ¦‹


πŸ’… DESCRIPTION πŸ’…

so the GLE Tubing and Extrusion Library is a graphics application programming interface (API). periodt. it's a bunch of "C" language subroutines for drawing tubing and extrusions, and it ships in source code form in a package that includes documentation, a VRML proposal, Makefiles, and full source code and header files. the whole thing uses the OpenGL (TM) programming API to do the actual drawing of the tubing and extrusions. it does not do the drawing itself, it outsources. iconic behavior honestly. πŸ’…

a "sweep" or "extrusion" is a 2D contour (polyline) that gets swept or extruded along a 3D path (polyline). for example:

  • sweep a circle along a straight line β†’ you get a cylinder
  • sweep a circle along a circular path β†’ you get a doughnut (torus)

like?? that's so satisfying. geometry ate. 🍩

the library also comes with a set of utility routines for drawing some of the more common extruded shapes:

  • a polycylinder
  • a polycone
  • a generalized torus (circle swept along a helical path)
  • a "helix" (arbitrary contour swept along a helical path)
  • a "lathe" (arbitrary contour swept along a helical path, with torsion used to keep the contour aligned)

the most general extrusion this library supports lets an arbitrary 2D contour be swept around an arbitrary 3D path. that's the main character feature, no cap. πŸ†

now here's the tea. you can also specify:

  • a set of normal vectors to go along with the contour β€” and these determine the appearance of the contour when lighting is turned on. so like, if you want it to look good in the light, this is your moment. πŸ’‘
  • a set of colors and affine matrices to go along with the 3D path. the colors are used to color along the path. the affine matrices are used to operate on the contour as it is swept along.

if no affine matrices are specified, the contour is extruded using the mathematical concept of "parallel translation" or "Gaussian translation". that means the contour is moved (and drawn) along the extrusion path in a "straight" manner. simple. clean. lowkey elegant.

if there are affine matrices, they get applied to the contour at each extrusion segment before the segment is drawn. order matters bestie, don't come for me.

the affine matrices allow work in a quasi-non-Euclidean space. yes, that's a real phrase in this manpage and yes, it's a whole mood. πŸŒ€ they essentially allow the contour to be distorted as it is swept along. they allow the contour to be rotated, translated and rescaled as it is drawn. for example:

  • a rescaling will turn a polycylinder into a poly-cone, since the circle that's being extruded is scaled to a different size at each extrusion vertex
  • a rotation allows the contour to be spun around while it's being extruded, which for instance allows drill-bit type shapes to be drawn
  • a translation allows the appearance of shearing in real space β€” that is, taking a contour and displacing it, without otherwise bending it
🚨 important technical note, do not skip this: the affines are 2x3 matrices, not 3x4 matrices, since they apply to the 2D contour as it's being extruded. don't @ me with a 3x4, it's not that.

🌈 WEB SITE 🌈

go be nosy, bestie:

http://linas.org/gle/index.html

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, in the exact order the manpage says it:

  • gleExtrusion
  • gleHelicoid
  • gleLathe
  • glePolyCone
  • glePolyCylinder
  • gleScrew
  • gleSetJoinStyle
  • gleSpiral
  • gleSuperExtrusion
  • gleTextureMode
  • gleToroid
  • gleTwistExtrusion
  • gleTwistExtrusion
  • gleSuperExtrusion

(yes, gleTwistExtrusion and gleSuperExtrusion each show up twice at the end. that's what the original says, so that's what you get. they're just that iconic. πŸ‘―)


🫢 AUTHOR 🫢

Linas Vepstas (linas@linas.org) β€” the legend, the icon, the moment. thank you for the tubing king. πŸ’œ


okay that's the whole page!! go sweep something cute. πŸ¦‹

this was GLE version 3.0, and it's the gle(3GLE) page β€” that's the source/version/date sign-off, folded into a lil goodbye instead of a boring footer line. mwah. 😘