GLUSPHERE(3G)

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

✨ GLUSPHERE(3G) ✨

okay bestie, welcome to the GLUSPHERE page of the 3G manual πŸ’– this one is short, sweet, and literally just draws you a whole entire sphere. no cap.


NAME πŸŽ€

gluSphere β€” draw a sphere


C SPECIFICATION πŸ’…

void gluSphere( GLUquadric* quad,
                GLdouble radius,
                GLint slices,
                GLint stacks )

PARAMETERS πŸ¦‹

  • quad β€” the quadrics object you're working with. it's the one you made earlier with gluNewQuadric, so like… you already know her πŸ‘‘
  • radius β€” how big the sphere is. the radius, babe, that's the whole vibe.
  • slices β€” how many subdivisions go around the z axis. think lines of longitude 🌐
  • stacks β€” how many subdivisions go along the z axis. think lines of latitude 🌸

DESCRIPTION 🌈

so gluSphere draws a sphere of the given radius, centered around the origin. periodt. ✨

the sphere gets subdivided around the z axis into slices, and along the z axis into stacks β€” which is giving lines of longitude and latitude, exactly like you'd expect 🧚

if the orientation is set to GLU_OUTSIDE (which you do with gluQuadricOrientation), then any normals it generates point away from the center of the sphere. otherwise? they point toward the center. lowkey important, don't skip this one πŸ™ˆ

if texturing is turned on (with gluQuadricTexture), then texture coordinates get generated so that:

  • t ranges from 0.0 at z=βˆ’radius to 1.0 at z=radius β€” and t increases linearly along the longitudinal lines πŸ“ˆ
  • s ranges from 0.0 at the +y axis, to 0.25 at the +x axis, to 0.5 at the -y axis, to 0.75 at the -x axis, and back to 1.0 at the +y axis πŸ”₯

so yeah, she wraps all the way around and comes home. iconic behavior tbh 🫢


SEE ALSO πŸ‘€

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

and that's the whole page, bestie πŸ’œ this was the <b>GLUSPHERE(3G)</b> manual page β€” go forth and render spheres, you absolute main character πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from