GLUPARTIALDISK(3G)
β¨ 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 withgluNewQuadric. it's giving "your blank canvas" π¨innerβ the inner radius of the partial disk. yes, it can be0. 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
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- fedora 43: gl-manpages 1.1-34.20190306.fc43 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- fedora 44: gl-manpages 1.1-35.20190306.fc44 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms