As seen in this example, the OpenGL utility library glu makes it is easy to create a disk,
even one with a hole. The function signature that we use is
void gluDisk(GLUquadric* quad,
GLdouble inner, GLdouble outer,
GLint slices, GLint loops)
We construct the first parameter, a pointer to a GLUquadric object, with the function
GLUquadric* gluNewQuadric(void)
Since we have no need for the object other than passing its pointer to gluDisk, we simply make the first parameter a call to gluNewQuadric.
The parameter inner sets the radius of the hole and the parameter outer sets the radius of the disk. In turn, inner must be less than outer. Also, we use inner = 0 when we want no hole.
Since the disk is approximated with quadrilaterals, we specify the fineness of the approximation with
the parameters slices and loops. Loops is the number of rings about the center that is used in
partitioning the disk. The value 1 will work most of the time. Slices specifies the number of cuts
made along radial lines similar to cutting a pie into slices. The outer boundary of the disk becomes
smoother as we increase the value of slices. Thinking in degrees, we used 360/5 = 72 slices. This
seems to give a good approximation.