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=
"gluCylinder">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>gluCylinder
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>gluCylinder
</refname>
17 <refpurpose>draw a cylinder
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>gluCylinder
</function></funcdef>
23 <paramdef>GLUquadric*
<parameter>quad
</parameter></paramdef>
24 <paramdef>GLdouble
<parameter>base
</parameter></paramdef>
25 <paramdef>GLdouble
<parameter>top
</parameter></paramdef>
26 <paramdef>GLdouble
<parameter>height
</parameter></paramdef>
27 <paramdef>GLint
<parameter>slices
</parameter></paramdef>
28 <paramdef>GLint
<parameter>stacks
</parameter></paramdef>
32 <!-- eqn: ignoring delim $$ -->
33 <refsect1 id=
"parameters"><title>Parameters
</title>
36 <term><parameter>quad
</parameter></term>
39 Specifies the quadrics object (created with
<citerefentry><refentrytitle>gluNewQuadric
</refentrytitle></citerefentry>).
44 <term><parameter>base
</parameter></term>
47 Specifies the radius of the cylinder at
<emphasis>z
</emphasis> =
0.
52 <term><parameter>top
</parameter></term>
55 Specifies the radius of the cylinder at
<emphasis>z
</emphasis> =
<parameter>height
</parameter>.
60 <term><parameter>height
</parameter></term>
63 Specifies the height of the cylinder.
68 <term><parameter>slices
</parameter></term>
71 Specifies the number of subdivisions around the
<emphasis>z
</emphasis> axis.
76 <term><parameter>stacks
</parameter></term>
79 Specifies the number of subdivisions along the
<emphasis>z
</emphasis> axis.
85 <refsect1 id=
"description"><title>Description
</title>
87 <function>gluCylinder
</function> draws a cylinder oriented along the
<emphasis>z
</emphasis> axis. The base of the cylinder
88 is placed at
<emphasis>z
</emphasis> =
0 and the top at
89 <inlineequation><mml:math>
90 <!-- eqn: z = height:-->
92 <mml:mi mathvariant=
"italic">z
</mml:mi>
94 <mml:mi mathvariant=
"italic">height
</mml:mi>
96 </mml:math></inlineequation>.
98 a cylinder is subdivided around the
<emphasis>z
</emphasis> axis into slices and along the
99 <emphasis>z
</emphasis> axis into stacks.
102 Note that if
<parameter>top
</parameter> is set to
0.0, this routine generates a cone.
105 If the orientation is set to
<constant>GLU_OUTSIDE
</constant>
106 (with
<citerefentry><refentrytitle>gluQuadricOrientation
</refentrytitle></citerefentry>), then any generated normals
107 point away from the
<emphasis>z
</emphasis> axis. Otherwise, they point toward the
108 <emphasis>z
</emphasis> axis.
111 If texturing is turned on (with
<citerefentry><refentrytitle>gluQuadricTexture
</refentrytitle></citerefentry>), then texture
112 coordinates are generated so that
<emphasis>t
</emphasis> ranges linearly from
0.0
113 at
<emphasis>z
</emphasis> =
0 to
1.0 at
<emphasis>z
</emphasis> =
<parameter>height
</parameter>, and
<emphasis>s
</emphasis>
114 ranges from
0.0 at the +
<emphasis>y
</emphasis> axis, to
0.25 at the +
<emphasis>x
</emphasis> axis,
115 to
0.5 at the -
<emphasis>y
</emphasis> axis, to
0.75 at the \-
<emphasis>x
</emphasis> axis,
116 and back to
1.0 at the +
<emphasis>y
</emphasis> axis.
119 <refsect1 id=
"seealso"><title>See Also
</title>
121 <citerefentry><refentrytitle>gluDisk
</refentrytitle></citerefentry>,
122 <citerefentry><refentrytitle>gluNewQuadric
</refentrytitle></citerefentry>,
123 <citerefentry><refentrytitle>gluPartialDisk
</refentrytitle></citerefentry>,
124 <citerefentry><refentrytitle>gluQuadricTexture
</refentrytitle></citerefentry>,
125 <citerefentry><refentrytitle>gluSphere
</refentrytitle></citerefentry>
128 <refsect1 id=
"Copyright"><title>Copyright
</title>
130 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
131 Silicon Graphics, Inc. This document is licensed under the SGI
132 Free Software B License. For details, see
133 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.