<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:mml="http://www.w3.org/1998/Math/MathML"
><head><title>gluNurbsSurface</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"/><link rel="home" href="index.xml" title="PyOpenGL 2.0.1.07 Man Pages"/><link rel="up" href="reference-GLU.xml" title="GLU"/><link rel="previous" href="gluNurbsProperty.3G.xml" title="gluNurbsProperty"/><link rel="next" href="gluOrtho2D.3G.xml" title="gluOrtho2D"/></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gluNurbsSurface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gluNurbsProperty.3G.xml">Prev</a> </td><th width="60%" align="center">GLU</th><td width="20%" align="right"> <a accesskey="n" href="gluOrtho2D.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="gluNurbsSurface.3G"/><div class="titlepage"/><div class="refnamediv"><a name="gluNurbsSurface.3G-name"/><h2>Name</h2><p>gluNurbsSurface &#8212; define the shape of a NURBS surface</p></div><div class="refsynopsisdiv"><a name="gluNurbsSurface.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>gluNurbsSurface</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLUnurbs* <i><tt>nurb</tt></i>, GLint <i><tt>sKnotCount</tt></i>, GLfloat* <i><tt>sKnots</tt></i>, GLint <i><tt>tKnotCount</tt></i>, GLfloat* <i><tt>tKnots</tt></i>, GLint <i><tt>sStride</tt></i>, GLint <i><tt>tStride</tt></i>, GLfloat* <i><tt>control</tt></i>, GLint <i><tt>sOrder</tt></i>, GLint <i><tt>tOrder</tt></i>, GLenum <i><tt>type</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="gluNurbsSurface.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>gluNurbsSurface</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>nurb</tt></i>, <i><tt>sKnots</tt></i>[], <i><tt>tKnots</tt></i>[], <i><tt>control</tt></i>[][], <i><tt>type</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="gluNurbsSurface.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>nurb</tt></i></span></dt><dd>
						Specifies the NURBS object (created with <a href="gluNewNurbsRenderer.3G.xml"><tt>gluNewNurbsRenderer</tt></a>).
					</dd><dt><span class="term"><i><tt>sKnotCount</tt></i></span></dt><dd>
						Specifies the number of knots in the parametric <i><tt>u</tt></i> direction.
					</dd><dt><span class="term"><i><tt>sKnots</tt></i></span></dt><dd>
						Specifies an array of <i><tt>sKnotCount</tt></i> nondecreasing knot values in the parametric
						<i><tt>u</tt></i> direction.
					</dd><dt><span class="term"><i><tt>tKnotCount</tt></i></span></dt><dd>
						Specifies the number of knots in the parametric <i><tt>v</tt></i> direction.
					</dd><dt><span class="term"><i><tt>tKnots</tt></i></span></dt><dd>
						Specifies an array of <i><tt>tKnotCount</tt></i> nondecreasing knot values in the parametric
						<i><tt>v</tt></i> direction.
					</dd><dt><span class="term"><i><tt>sStride</tt></i></span></dt><dd>
						Specifies the offset (as a number of single-precision floating point values) between successive control
						points in the parametric <i><tt>u</tt></i> direction in <i><tt>control</tt></i>.
					</dd><dt><span class="term"><i><tt>tStride</tt></i></span></dt><dd>
						Specifies the offset (in single-precision floating-point values) between successive control points in the
						parametric <i><tt>v</tt></i> direction in <i><tt>control</tt></i>.
					</dd><dt><span class="term"><i><tt>control</tt></i></span></dt><dd>
						Specifies an array containing control points for the NURBS surface. The offsets between successive control
						points in the parametric <i><tt>u</tt></i> and <i><tt>v</tt></i> directions are given by
						<i><tt>sStride</tt></i> and <i><tt>tStride</tt></i>.
					</dd><dt><span class="term"><i><tt>sOrder</tt></i></span></dt><dd>
						Specifies the order of the NURBS surface in the parametric <i><tt>u</tt></i> direction. The order is
						one more than the degree, hence a surface that is cubic in <i><tt>u</tt></i> has a
						<i><tt>u</tt></i> order of 4.
					</dd><dt><span class="term"><i><tt>tOrder</tt></i></span></dt><dd>
						Specifies the order of the NURBS surface in the parametric <i><tt>v</tt></i> direction. The order is
						one more than the degree, hence a surface that is cubic in <i><tt>v</tt></i> has a
						<i><tt>v</tt></i> order of 4.
					</dd><dt><span class="term"><i><tt>type</tt></i></span></dt><dd>
						Specifies type of the surface. <i><tt>type</tt></i> can be any of the valid two-dimensional
						evaluator types (such as <tt>GL_MAP2_VERTEX_3</tt> or <tt>GL_MAP2_COLOR_4</tt>).
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="gluNurbsSurface.3G-description"/><h2>Description</h2><p>
			Use <tt>gluNurbsSurface</tt> within a NURBS (Non-Uniform Rational B-Spline) surface definition to describe
			the shape of a NURBS surface (before any trimming). To mark the beginning of a NURBS surface definition, use the
			<a href="gluBeginSurface.3G.xml"><tt>gluBeginSurface</tt></a> command. To mark the end of a NURBS surface definition, use
			the <a href="gluBeginSurface.3G.xml"><tt>gluEndSurface</tt></a> command. Call <tt>gluNurbsSurface</tt> within a
			NURBS surface definition only.
		</p><p>
			Positional, texture, and color coordinates are associated with a surface by presenting each as a separate
			<tt>gluNurbsSurface</tt> between a <a href="gluBeginSurface.3G.xml"><tt>gluBeginSurface</tt></a>/<a href="gluBeginSurface.3G.xml"><tt>gluEndSurface</tt></a> pair. No more than one call to <tt>gluNurbsSurface</tt> for
			each of color, position, and texture data can be made within a single <a href="gluBeginSurface.3G.xml"><tt>gluBeginSurface</tt></a>/<a href="gluBeginSurface.3G.xml"><tt>gluEndSurface</tt></a> pair. Exactly one
			call must be made to describe the position of the surface (a <i><tt>type</tt></i> of
			<tt>GL_MAP2_VERTEX_3</tt> or <tt>GL_MAP2_VERTEX_4</tt>).
		</p><p>
			A NURBS surface can be trimmed by using the commands <a href="gluNurbsCurve.3G.xml"><tt>gluNurbsCurve</tt></a> and
			<a href="gluPwlCurve.3G.xml"><tt>gluPwlCurve</tt></a> between calls to <a href="gluBeginTrim.3G.xml"><tt>gluBeginTrim</tt></a> and <a href="gluBeginTrim.3G.xml"><tt>gluEndTrim</tt></a>.
		</p><p>
			Note that a <tt>gluNurbsSurface</tt> with <i><tt>sKnotCount</tt></i> knots in the
			<i><tt>u</tt></i> direction and <i><tt>tKnotCount</tt></i> knots in the <i><tt>v</tt></i>
			direction with orders <i><tt>sOrder</tt></i> and <i><tt>tOrder</tt></i> must have
			(<i><tt>sKnotCount</tt></i> - <i><tt>sOrder</tt></i>) <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mo>×</mml:mo>
				</mml:math> (<i><tt>tKnotCount</tt></i> - <i><tt>tOrder</tt></i>) control points.
		</p></div><div class="refsect1" lang="en"><a name="gluNurbsSurface.3G-example"/><h2>Example</h2><p>
			The following commands render a textured NURBS surface with normals; the texture coordinates and normals are also NURBS
			surfaces: gluBeginSurface(nobj); gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2); gluNurbsSurface(nobj, ...,
			GL_MAP2_NORMAL); gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4); gluEndSurface(nobj);
		</p></div><div class="refsect1" lang="en"><a name="gluNurbsSurface.3G-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="gluBeginSurface.3G.xml">gluBeginSurface</a>, <a href="gluBeginTrim.3G.xml">gluBeginTrim</a>, <a href="gluNewNurbsRenderer.3G.xml">gluNewNurbsRenderer</a>, <a href="gluNurbsCurve.3G.xml">gluNurbsCurve</a>, <a href="gluPwlCurve.3G.xml">gluPwlCurve</a></span>
		</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gluNurbsProperty.3G.xml">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-GLU.xml">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gluOrtho2D.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gluNurbsProperty </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> gluOrtho2D</td></tr></table></div></body></html>
