About gluNewQuadric
gluNewQuadric demonstrates the use of several quadrics calls in OpenGL. The strategy is to call gluNewQuadric to create a new quadric. With the new quadric, call one or more setup calls, gluQuadricCallback, gluQuadricDrawStyle, gluQuadricNormals, gluQuadricOrientation or gluQuadricTexture, then call one of the quadric rendering calls, gluCylinder, gluDisk, gluPartialDisk or gluSphere. Finally, call gluDeleteQuadric to delete the quadric to conserve memory.
The application gluNewQuadric creates several OpenGL textures and uses one of these textures while rendering one of the above quadrics. gluNewQuadric responds to the following key-presses:
if (firstCharacter == 'a') [self toggleDrawAxes:theEvent]; // draw axes
if (firstCharacter == 'b') [self updateBackground:theEvent]; // next background color
if (firstCharacter == 'c') [self updateCullFace:theEvent]; // next cull face
if (firstCharacter == 'd') [self updateDrawStyle:theEvent]; // next draw style
if (firstCharacter == 'n') [self updateNormals:theEvent]; // next normal choice
if (firstCharacter == 'o') [self updateOrientation:theEvent]; // next orientation
if (firstCharacter == 'p') [self toggleDepthTestEnabled:theEvent]; // enable / disable depth testing
if (firstCharacter == 'q') [self updateQuadric:theEvent]; // next quadric
if (firstCharacter == 't') [self updateCurrentTexture:theEvent]; // next texture
if (firstCharacter == 'z') [self toggleZRotationAnimation:theEvent]; // z rotation on / off
Credits
Engineering:
Tom Bernard
Human Interface Design:
Tom Bernard
Testing:
Tom Bernard, Chris Newman
Documentation:
Tom Bernard
Photo Credits:
DSC0355.w taken by Tom Bernard while flying over California, June 2007.
DSC-040504-00044.w2 taken by Tom Bernard looking at the Ten Mile Range behind Breckenridge, Colorado.
land_shallow_topo_2048 courtesy NASA Visible Earth, Visible Earth: Blue Marble: Land Surface, Shallow Water, and Shaded Topography. Used by permission.
M101 courtesy NASA and ESA, K.D. Kuntz (GSFC), F. Bresolin (University of Hawaii), J. Trauger (JPL), J. Mould (NOAO), and Y.-H. Chu (University of Illinois, Urbana), Canada-France-Hawaii Telescope/ J.-C. Cuillandre/Coelum, G. Jacoby, B. Bohannan, M. Hanna/ NOAO/AURA/NSF, HubbleSite - NewsCenter - Hubble's Largest Galaxy Portrait Offers a New High-Definition View (02/28/2006) - Release Images. Used by permission.
Education Credit:
gluNewQuadric reflects knowledge gained while attending Rocco Bowling's OpenGL Bootcamp at the Big Nerd Ranch. Thanks again, Rocco!
gluNewQuadric also reflects knowledge gained while studying Brian Nenninger's open sourced Assimilator screen saver, available at Dozing Cat Software. While none of Brian's code was included in gluNewQuadric, the availability of Brian's image flipping routine saved me time in writing my own image flipping routine. Thanks, Brian!
Legal
Copyright © 2007 - 2008 Bersearch Information Services
All rights reserved, except as noted below.
Open source license is granted with respect to the source code, excluding images. Licensee may use, modify and redistribute all or part of the source code and may incorporate all or part of the source code into derivative work provided that licensee credits Bersearch Information Services by including this notice with any distribution of said source code, and that licensee releases Bersearch Information Services from liability with respect to the source code.
All images are excluded from this license. (See HubbleSite - Copyright and Visible Earth: Terms of Use regarding the use of NASA images.)
History
1/17/2007 gluNewQuadric 1.0d1 released.
1/31/2007 gluNewQuadric 1.0d2 released. Added facet culling control. Abandoned image flipping via matrix transformation and implemented flipImage() function.