GLUPARTIALDISK(3G)

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

✨ GLUPARTIALDISK(3G) ✨

okay bestie, welcome to the GLU corner of the manual β€” this one's from the 3G pages, and it's literally about drawing a lil slice of a disk. like, pizza, but make it OpenGL πŸ’…


πŸŽ€ NAME πŸŽ€

gluPartialDisk β€” draw an arc of a disk


πŸ’– C SPECIFICATION πŸ’–

void gluPartialDisk( GLUquadric* quad,
                     GLdouble inner,
                     GLdouble outer,
                     GLint slices,
                     GLint loops,
                     GLdouble start,
                     GLdouble sweep )

🌸 PARAMETERS 🌸

  • quad β€” the quadrics object you're working with, aka the one you made with gluNewQuadric. it's giving "your blank canvas" 🎨
  • inner β€” the inner radius of the partial disk. yes, it can be 0. no hole, no problem πŸ•³οΈ
  • outer β€” the outer radius of the partial disk. the big boundary, the outer circle, the moment ✨
  • slices β€” how many subdivisions you want around the z axis.
  • loops β€” how many concentric rings about the origin the partial disk gets chopped into. think ripples πŸŒ€
  • start β€” the starting angle of the disk portion, measured in degrees.
  • sweep β€” the sweep angle of the disk portion, also in degrees. this is how much arc you're actually getting 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

gluPartialDisk renders a partial disk on the z=0 plane. lowkey it's exactly like a full disk, except you only get the subset of the disk from start through start + sweep. (and heads up, the angle mapping is a whole vibe: 0 degrees is along the +y axis, 90 degrees along the +x axis, 180 degrees along the -y axis, and 270 degrees along the -x axis.) πŸ“

The partial disk has a radius of outer, and it contains a concentric circular hole with a radius of inner. If inner is 0, then no hole is generated β€” it's a solid slice, periodt. The partial disk is subdivided around the z axis into slices (like pizza slices πŸ•), and also about the z axis into rings β€” that's what slices and loops are for, respectively.

Now, orientation. With respect to orientation, the +z side of the partial disk is considered to be outside (see gluQuadricOrientation). So bestie, this means that if the orientation is set to GLU_OUTSIDE, then any normals generated point along the +z axis. Otherwise, they point along the -z axis. no in-between, it's one or the other 😌

And if texturing is turned on (with gluQuadricTexture), texture coordinates are generated linearly such that where r=outer, the value at (r, 0, 0) is (1.0, 0.5), at (0, r, 0) it is (0.5, 1.0), at (-r, 0, 0) it is (0.0, 0.5), and at (0, -r, 0) it is (0.5, 0.0). write that down, it's on the exam πŸ“


🌈 SEE ALSO 🌈

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

and that's the whole page, angel πŸ’œ this one lives in the GLUPARTIALDISK(3G) section of the 3G manual β€” go forth and draw your arcs, you're gonna slay πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from