1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id=
"gluSphere">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>gluSphere
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>gluSphere
</refname>
17 <refpurpose>draw a sphere
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>gluSphere
</function></funcdef>
23 <paramdef>GLUquadric*
<parameter>quad
</parameter></paramdef>
24 <paramdef>GLdouble
<parameter>radius
</parameter></paramdef>
25 <paramdef>GLint
<parameter>slices
</parameter></paramdef>
26 <paramdef>GLint
<parameter>stacks
</parameter></paramdef>
30 <!-- eqn: ignoring delim $$ -->
31 <refsect1 id=
"parameters"><title>Parameters
</title>
34 <term><parameter>quad
</parameter></term>
37 Specifies the quadrics object (created with
<citerefentry><refentrytitle>gluNewQuadric
</refentrytitle></citerefentry>).
42 <term><parameter>radius
</parameter></term>
45 Specifies the radius of the sphere.
50 <term><parameter>slices
</parameter></term>
53 Specifies the number of subdivisions around the
<emphasis>z
</emphasis> axis
54 (similar to lines of longitude).
59 <term><parameter>stacks
</parameter></term>
62 Specifies the number of subdivisions along the
<emphasis>z
</emphasis> axis
70 <refsect1 id=
"description"><title>Description
</title>
72 <function>gluSphere
</function> draws a sphere of the given radius centered around the origin. The
73 sphere is subdivided around the
<emphasis>z
</emphasis> axis into slices and along the
74 <emphasis>z
</emphasis> axis
75 into stacks (similar to lines of longitude and latitude).
78 If the orientation is set to
<constant>GLU_OUTSIDE
</constant>
79 (with
<citerefentry><refentrytitle>gluQuadricOrientation
</refentrytitle></citerefentry>), then any normals generated
80 point away from the center of the sphere.
81 Otherwise, they point toward the center of the sphere.
84 If texturing is turned on (with
<citerefentry><refentrytitle>gluQuadricTexture
</refentrytitle></citerefentry>), then texture
86 generated so that
<emphasis>t
</emphasis> ranges from
0.0 at
87 <inlineequation><mml:math>
88 <!-- eqn: z = -radius:-->
90 <mml:mi mathvariant=
"italic">z
</mml:mi>
94 <mml:mi mathvariant=
"italic">radius
</mml:mi>
97 </mml:math></inlineequation>
99 <inlineequation><mml:math>
100 <!-- eqn: z = radius:-->
102 <mml:mi mathvariant=
"italic">z
</mml:mi>
104 <mml:mi mathvariant=
"italic">radius
</mml:mi>
106 </mml:math></inlineequation>
107 (
<emphasis>t
</emphasis> increases linearly along longitudinal
109 and
<emphasis>s
</emphasis> ranges from
0.0 at the +
<emphasis>y
</emphasis> axis, to
0.25 at the
110 +
<emphasis>x
</emphasis> axis,
111 to
0.5 at the \-
<emphasis>y
</emphasis> axis, to
0.75 at the \-
<emphasis>x
</emphasis> axis, and back to
1.0
112 at the +
<emphasis>y
</emphasis> axis.
115 <refsect1 id=
"seealso"><title>See Also
</title>
117 <citerefentry><refentrytitle>gluCylinder
</refentrytitle></citerefentry>,
118 <citerefentry><refentrytitle>gluDisk
</refentrytitle></citerefentry>,
119 <citerefentry><refentrytitle>gluNewQuadric
</refentrytitle></citerefentry>,
120 <citerefentry><refentrytitle>gluPartialDisk
</refentrytitle></citerefentry>,
121 <citerefentry><refentrytitle>gluQuadricOrientation
</refentrytitle></citerefentry>,
122 <citerefentry><refentrytitle>gluQuadricTexture
</refentrytitle></citerefentry>
125 <refsect1 id=
"Copyright"><title>Copyright
</title>
127 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
128 Silicon Graphics, Inc. This document is licensed under the SGI
129 Free Software B License. For details, see
130 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.