GLUDISK(3G)

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

πŸ’– GLUDISK(3G) πŸ’–

okay bestie, welcome to the gluDisk page β€” it's a 3G manual page, it lives in the GLU family, and it's literally just about drawing a disk. a whole page. for a disk. iconic.


✨ NAME ✨

gluDisk β€” draw a disk πŸ’Ώ


🌸 C SPECIFICATION 🌸

here's the whole thing, copy it exactly, no cap:

void gluDisk( GLUquadric* quad,
              GLdouble inner,
              GLdouble outer,
              GLint slices,
              GLint loops )

πŸŽ€ PARAMETERS πŸŽ€

  • quad β€” the quadrics object, fr. you make it with gluNewQuadric.
  • inner β€” the inner radius of the disk. it can be 0, and yes that's allowed, that's the whole point.
  • outer β€” the outer radius of the disk. the big one. the main character radius.
  • slices β€” how many subdivisions around the z axis.
  • loops β€” how many concentric rings around the origin the disk gets chopped into.

πŸ¦‹ DESCRIPTION πŸ¦‹

so gluDisk renders a disk, and it does it on the z = 0 plane. the disk's radius is outer, and inside it there's a concentric circular hole with radius inner. if inner is 0? no hole. solid disk. we love a solid disk. 🍩

the disk gets subdivided around the z axis into slices (think pizza slices, genuinely) and also about the z axis into rings β€” those two things are slices and loops respectively, in that order, don't mix them up bestie.

now the orientation tea β˜•: the +z side of the disk is considered "outside" β€” check gluQuadricOrientation for that whole situation. what this means is: if the orientation is set to GLU_OUTSIDE, then any normals that get generated point along the +z axis. otherwise, they point along the -z axis. periodt.

and if texturing is turned on (via gluQuadricTexture), texture coordinates get generated linearly, like this, where r=outer:

  • at (r, 0, 0) β†’ (1, 0.5)
  • at (0, r, 0) β†’ (0.5, 1)
  • at (-r, 0, 0) β†’ (0, 0.5)
  • at (0, -r, 0) β†’ (0.5, 0)

slay. ✨


πŸ‘‘ SEE ALSO πŸ‘‘

  • gluCylinder(3G)
  • gluNewQuadric(3G)
  • gluPartialDisk(3G)
  • gluQuadricOrientation(3G)
  • gluQuadricTexture(3G)
  • gluSphere(3G)

okay that's the whole page, you're officially a disk girlie now πŸ’…πŸ«Ά this was GLUDISK(3G), same name at the top and at the bottom because that's how manual pages do, mwah, bye bestie πŸ’œπŸŒΈ

πŸ“¦ where this page comes from