GLUPWLCURVE(3G)

πŸ“¦ version 1.1, in centos-stream 9, fedora 43, fedora 44

✨ GLUPWLCURVE ✨

okay bestie, welcome to the 3G manual section, this is the glow-up guide to gluPwlCurve β€” the lil function that describes a piecewise linear NURBS trimming curve πŸ’…


πŸŽ€ NAME πŸŽ€

gluPwlCurve β€” describe a piecewise linear NURBS trimming curve

like literally that's the whole job. describe a trimming curve. but make it piecewise. and linear. πŸ’–


🌸 C SPECIFICATION 🌸

void gluPwlCurve( GLUnurbs* nurb,
                  GLint count,
                  GLfloat* data,
                  GLint stride,
                  GLenum type )

no cap, that's the exact signature, don't @ me 🫢


πŸ¦‹ PARAMETERS πŸ¦‹

  • nurb β€” the NURBS object in question. you know, the one you made with gluNewNurbsRenderer. your main character ✨
  • count β€” how many points are on the curve. the headcount. the guest list 🌸
  • data β€” an array holding the curve points. the actual coordinates. the receipts πŸ“
  • stride β€” the offset between points on the curve, measured in single-precision floating-point values. so like, how far apart your points are sitting in that array. it's giving personal space πŸ’«
  • type β€” what kind of curve this is. it must be either GLU_MAP1_TRIM_2 or GLU_MAP1_TRIM_3. those are the only two options, bestie. no substitutes πŸ”₯

πŸ‘‘ DESCRIPTION πŸ‘‘

so gluPwlCurve describes a piecewise linear trimming curve for a NURBS surface. and what even is a piecewise linear curve? it's a list of coordinates β€” points sitting in the parameter space of the NURBS surface that's getting trimmed. then those points get connected with line segments to form a curve. connect-the-dots but make it graphics 🎨

and here's the tea: if your curve is an approximation of a curve that is not piecewise linear, then your points need to be close enough together in parameter space that the resulting path looks curved at whatever resolution your application is using. so like, pack those points in. density is the vibe. πŸ¦‹

now, about type:

  • if type is GLU_MAP1_TRIM_2, the curve lives in two-dimensional parameter space β€” that's u and v.
  • if type is GLU_MAP1_TRIM_3, the curve lives in two-dimensional homogeneous parameter space β€” that's u, v, and w.

and if you want more info about trimming curves in general, go check the gluBeginTrim reference page. it's linked down below, i gotchu πŸ’œ


πŸ’€ NOTES πŸ’€

if you wanna describe a trim curve that closely follows the contours of a NURBS surface? call gluNurbsCurve instead. different tool, different job, know the difference bestie ✨


🌈 SEE ALSO 🌈

  • gluBeginCurve(3G)
  • gluBeginTrim(3G)
  • gluNewNurbsRenderer(3G)
  • gluNurbsCurve(3G)

go read those, i promise they're worth it 🫢


okay that's the whole page, you ate that, go trim some NURBS surfaces responsibly πŸ’…βœ¨

that's a wrap on GLUPWLCURVE(3G) β€” straight outta the 3G manual, love u, bye πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from