gleSpiral(3GLE)
β¨ gleSpiral β it's in the GLE manual, bestie β¨
okay so real talk, this page lives in section 3GLE of the GLE manual, and it's about gleSpiral, which is the function you call when you want to yeet a contour around and around in a lil helix. group-chat summary: contour goes in, spiral comes out. iconic. π«
π NAME π
gleSpiral β sweep an arbitrary contour along a helical path.
like⦠literally just take a shape and swirl it. no cap.
πΈ SYNTAX πΈ
void gleSpiral (int ncp,
gleDouble contour[][2],
gleDouble cont_normal[][2],
gleDouble up[3],
gleDouble startRadius, /* spiral starts in x-y plane */
gleDouble drdTheta, /* change in radius per revolution */
gleDouble startZ, /* starting z value */
gleDouble dzdTheta, /* change in Z per revolution */
gleDouble startXform[2][3], /* starting contour affine xform */
gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
gleDouble startTheta, /* start angle in x-y plane */
gleDouble sweepTheta); /* degrees to spiral around */
twelve arguments. twelve. she's high maintenance but she SERVES π
π ARGUMENTS π
ncpβ number of contour points. how many lil dots make up your shape, bestie.contourβ 2D contour. the shape itself.cont_normalβ 2D contour normals. the shape's lil perpendiculars. she's got opinions about direction β¨upβ up vector for contour.startRadiusβ spiral starts in x-y plane. this is where the swirl begins, radius-wise.drdThetaβ change in radius per revolution.startZβ starting z value.dzdThetaβ change in Z per revolution.startXformβ starting contour affine transformation.dXformdThetaβ tangent change xform per revolution.startThetaβ start angle in x-y plane.sweepThetaβ degrees to spiral around.
π¦ DESCRIPTION π¦
Sweep an arbitrary contour along a helical path. that's the whole vibe. π
The axis of the helix lies along the modeling coordinate z-axis. so she spirals up the z-axis, no detours, no side quests.
An affine transform can be applied as the contour is swept. For most ordinary usage, the affines should be given as NULL. like fr, if you're just doing normal stuff, pass NULL and keep it moving. don't make it weird. π
The "startXform[][]" is an affine matrix applied to the contour to deform the contour. Thus, "startXform" of the form
| cos sin 0 |
| -sin cos 0 |
will rotate the contour (in the plane of the contour), while
| 1 0 tx |
| 0 1 ty |
will translate the contour, and
| sx 0 0 |
| 0 sy 0 |
scales along the two axes of the contour. In particular, note that
| 1 0 0 |
| 0 1 0 |
is the identity matrix. yes bestie, the "do nothing" matrix. the chill one. the one that just vibes. π
The "dXformdTheta[][]" is a differential affine matrix that is integrated while the contour is extruded. Note that this affine matrix lives in the tangent space, and so it should have the form of a generator. β οΈ important, don't skip this part.
Thus, dx/dt's of the form
| 0 r 0 |
| -r 0 0 |
rotate the the contour as it is extruded (r == 0 implies no rotation, r == 2*PI implies that the contour is rotated once, etc.), while
| 0 0 tx |
| 0 0 ty |
translates the contour, and
| sx 0 0 |
| 0 sy 0 |
scales it. In particular, note that
| 0 0 0 |
| 0 0 0 |
is the identity matrix β i.e. the derivatives are zero, and therefore the integral is a constant. all zeros, all calm, nothing moves. the "leave me alone" of matrices π
π SEE ALSO π
gleLathe
(the sibling function. different swirl technique, same chaotic energy. iykyk)
π AUTHOR π
Linas Vepstas (linas@linas.org)
okay that's the whole page, bestie. go forth and spiral. π«Ά
kisses from the GLE manual, version 3.0, page gleSpiral(3GLE). slay, drink water, pass NULL for the affines unless you're being fancy πβ¨ππ¦πΈπ
π¦ 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