gleTwistExtrusion(3GLE)
π gleTwistExtrusion β it's giving twisted, bestie
okay so this is gleTwistExtrusion(3GLE), a page from the GLE manual (yes, section 3GLE, we're fancy like that β¨). It's the one where you take a lil 2D contour and yeet it along a 3D path while twisting it as you go. Spiral-core. Main character energy fr.
β¨ NAME β¨
gleTwistExtrusion β extrude an arbitrary 2D contour along an arbitrary 3D path, and specify local rotations (aka twists) while you do it π
πΈ SYNTAX πΈ
void gleTwistExtrusion (int ncp,
gleDouble contour[][2],
gleDouble cont_normal[][2],
gleDouble up[3],
int npoints,
gleDouble point_array[][3],
float color_array[][3],
gleDouble twist_array[]);
copy that exactly, no cap, don't get creative with it π«Ά
π ARGUMENTS π
ncpβ the number of contour points. count them. be honest.contourβ the 2D contour itself π¦cont_normalβ the 2D contour normalsupβ the up vector for the contournpointsβ numpoints in the poly-linepoint_arrayβ the polyline verticescolor_arrayβ colors at the polyline verts πtwist_arrayβ contour twists, measured in degrees
π DESCRIPTION π
So here's the tea: you extrude an arbitrary 2D contour along an arbitrary 3D path, and you also get to specify local rotations (twists). As the contour gets extruded, it gets twisted by however much you put in the array called twist_array. Those angles are measured in degrees, and the rotation happens about the origin of the contour coordinate system</span>. periodt.
The argument contour specifies the 2D contour that's getting extruded, while point_array specifies the path you're extruding it along. The vector up defines the orientation of the contour's y-axis in real 3D space. slay.
β οΈ okay important, bestie, listen: neither the very first segment nor the very last segment are drawn. Those two end segments exist only to define the angle of the join at the very ends of the polyline. so the math is mathing like this: to draw one segment, you must specify three. To draw two segments, you must specify four, etc. it's giving "off by two" but it's on purpose π
The normal array may be NULL. If it is, normal vectors will NOT be automatically generated, and honestly? the object will look terrible when lit. π like, glow-down of the century.
The color array may be NULL. If it's NULL, the current color is used. If it's not NULL, the glColor3f() routine is used to set the color β which means if you specify the glColorMaterial() subroutine before this primitive, you can use it to set diffuse, specular, ambient, etc. colors. iconic behavior, we love options π
π¦ SEE ALSO π¦
gleExtrusiongleSuperExtrusion
go read those too, they're the sister pages, the trio is unmatched π
π AUTHOR π
Linas Vepstas (linas@linas.org) β the actual legend who wrote this. thank you for your service π«‘
okay that's the whole page!! GLE 3.0, gleTwistExtrusion(3GLE) β mwah, go twist something pretty πβ¨π
π¦ where this page comes from
- debian bookworm: libgle3-dev 3.1.0-10 Β· GPL-2.0-only
- debian trixie: libgle3-dev 3.1.2-1+b2 Β· GPL-2.0-only
- fedora 43: libgle-devel 3.1.0-36.fc43 Β· GPL-2.0-only OR (ClArtistic AND LicenseRef-Callaway-MIT)
- fedora 43: libgle-devel 3.1.0-36.fc43 Β· GPL-2.0-only OR (ClArtistic AND LicenseRef-Callaway-MIT)
- fedora 44: libgle-devel 3.1.0-37.fc44 Β· GPL-2.0-only OR (ClArtistic AND LicenseRef-Callaway-MIT)
- fedora 44: libgle-devel 3.1.0-37.fc44 Β· GPL-2.0-only OR (ClArtistic AND LicenseRef-Callaway-MIT)
- nixos 26.05: gle 3.1.2
- nixpkgs unstable: gle 3.1.2
- opensuse-leap 16.0: gle-devel 3.1.2-bp160.1.13 Β· GPL-2.0-or-later
- opensuse-leap 16.0: gle-devel 3.1.2-bp160.1.13 Β· GPL-2.0-or-later
- opensuse-leap 16.0: gle-devel 3.1.2-bp160.1.13 Β· GPL-2.0-or-later
- opensuse-leap 16.0: gle-devel 3.1.2-bp160.1.13 Β· GPL-2.0-or-later
- ubuntu jammy: libgle3-dev 3.1.0-10 Β· GPL-2.0-only
- ubuntu noble: libgle3-dev 3.1.2-1build1 Β· GPL-2.0-only
- ubuntu questing: libgle3-dev 3.1.2-1build1
- ubuntu resolute: libgle3-dev 3.1.2-1build2 Β· GPL-2.0-only
- ubuntu stonking: libgle3-dev 3.1.2-1build2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms