<?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>glEvalMesh</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-GL.xml" title="GL"/><link rel="previous" href="glEvalCoord.3G.xml" title="glEvalCoord"/><link rel="next" href="glEvalPoint.3G.xml" title="glEvalPoint"/></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">glEvalMesh</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glEvalCoord.3G.xml">Prev</a> </td><th width="60%" align="center">GL</th><td width="20%" align="right"> <a accesskey="n" href="glEvalPoint.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glEvalMesh.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glEvalMesh.3G-name"/><h2>Name</h2><p>glEvalMesh1, glEvalMesh2 &#8212; compute a one- or two-dimensional grid of points or lines</p></div><div class="refsynopsisdiv"><a name="glEvalMesh.3G-c_spec-1"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glEvalMesh1</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum <i><tt>mode</tt></i>, GLint <i><tt>i1</tt></i>, GLint <i><tt>i2</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glEvalMesh.3G-python_spec-1"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glEvalMesh1</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>mode</tt></i>, <i><tt>i1</tt></i>, <i><tt>i2</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glEvalMesh.3G-parameters-1"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>mode</tt></i></span></dt><dd>
						In <tt>glEvalMesh1</tt>, specifies whether to compute a one-dimensional mesh of points or
						lines. Symbolic constants <tt>GL_POINT</tt> and <tt>GL_LINE</tt> are accepted.
					</dd><dt><span class="term"><i><tt>i1</tt></i>, <i><tt>i2</tt></i></span></dt><dd>
						Specify the first and last integer values for grid domain variable <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>i</mml:mi>
							</mml:math>.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glEvalMesh.3G-c_spec-2"/><h2>C Specification</h2><p>
			void <tt>glEvalMesh2</tt>( GLenum <i><tt>mode</tt></i>, GLint <i><tt>i1</tt></i>, GLint
			<i><tt>i2</tt></i>, GLint <i><tt>j1</tt></i>, GLint <i><tt>j2</tt></i> )
		</p></div><div class="refsect1" lang="en"><a name="glEvalMesh.3G-parameters-2"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>mode</tt></i></span></dt><dd>
						In <tt>glEvalMesh2</tt>, specifies whether to compute a two-dimensional mesh of points, lines,
						or polygons. Symbolic constants <tt>GL_POINT</tt>, <tt>GL_LINE</tt>, and
						<tt>GL_FILL</tt> are accepted.
					</dd><dt><span class="term"><i><tt>i1</tt></i>, <i><tt>i2</tt></i></span></dt><dd>
						Specify the first and last integer values for grid domain variable <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>i</mml:mi>
							</mml:math>.
					</dd><dt><span class="term"><i><tt>j1</tt></i>, <i><tt>j2</tt></i></span></dt><dd>
						Specify the first and last integer values for grid domain variable <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>j</mml:mi>
							</mml:math>.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glEvalMesh.3G-description"/><h2>Description</h2><p>
			<tt>glMapGrid</tt> and <tt>glEvalMesh</tt> are used in
			tandem to efficiently generate and evaluate a series of evenly-spaced map domain values. <tt>glEvalMesh</tt> steps through the integer domain of a one- or two-dimensional grid, whose
			range is the domain of the evaluation maps specified by <tt>glMap1</tt> and <tt>glMap2</tt>. <i><tt>mode</tt></i> determines whether the resulting vertices are
			connected as points, lines, or filled polygons.
		</p><p>
			In the one-dimensional case, <tt>glEvalMesh1</tt>, the mesh is generated as if the following code fragment
			were executed:
		</p><pre class="programlisting">glBegin( type );
for ( i = i1; i &lt;= i2; i += 1 )
    glEvalCoord1( i*delta_u + u1 );
glEnd();</pre><p>
			where
		</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
				<mml:mi>delta_u</mml:mi>
				<mml:mo>=</mml:mo>
				<mml:mfrac>
					<mml:mfenced separator=",">
						<mml:mrow>
							<mml:mi>u2</mml:mi>
							<mml:mo>-</mml:mo>
							<mml:mi>u1</mml:mi>
						</mml:mrow>
					</mml:mfenced>
					<mml:mi>n</mml:mi>
				</mml:mfrac>
			</mml:math></div><p>
			and <i><tt>n</tt></i>, <i><tt>u1</tt></i>, and <i><tt>u2</tt></i> are the arguments to the most
			recent <tt>glMapGrid1</tt> command. <i><tt>type</tt></i> is
			<tt>GL_POINTS</tt> if <i><tt>mode</tt></i> is <tt>GL_POINT</tt>, or
			<tt>GL_LINES</tt> if <i><tt>mode</tt></i> is <tt>GL_LINE</tt>.
		</p><p>
			The one absolute numeric requirement is that if <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mi>i</mml:mi>
					<mml:mo>=</mml:mo>
					<mml:mi>n</mml:mi>
				</mml:math>, then the value computed from <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mi>i</mml:mi>
					<mml:mo>·</mml:mo>
					<mml:mi>&#916;</mml:mi>
					<mml:mi>u</mml:mi>
					<mml:mo>+</mml:mo>
					<mml:msub>
						<mml:mi>u</mml:mi>
						<mml:mn>1</mml:mn>
					</mml:msub>
				</mml:math> is exactly <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:msub>
						<mml:mi>u</mml:mi>
						<mml:mn>2</mml:mn>
					</mml:msub>
				</mml:math>.
		</p><p>
			In the two-dimensional case, <tt>glEvalMesh2</tt>, let
		</p><p>
			<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>u</mml:mi>
						<mml:mo>=</mml:mo>
						<mml:mo>(</mml:mo>
						<mml:msub>
							<mml:mi>u</mml:mi>
							<mml:mn>2</mml:mn>
						</mml:msub>
						<mml:mo>-</mml:mo>
						<mml:msub>
							<mml:mi>u</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
						<mml:mo>)</mml:mo>
						<mml:mo>/</mml:mo>
						<mml:mi>n</mml:mi>
					</mml:mrow>
				</mml:math> <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>v</mml:mi>
						<mml:mo>=</mml:mo>
						<mml:mo>(</mml:mo>
						<mml:msub>
							<mml:mi>v</mml:mi>
							<mml:mn>2</mml:mn>
						</mml:msub>
						<mml:mo>-</mml:mo>
						<mml:msub>
							<mml:mi>v</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
						<mml:mo>)</mml:mo>
						<mml:mo>/</mml:mo>
						<mml:mi>m</mml:mi>
					</mml:mrow>
				</mml:math>,
		</p><p>
			where <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mi>n</mml:mi>
				</mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:msub>
						<mml:mi>u</mml:mi>
						<mml:mn>1</mml:mn>
					</mml:msub>
				</mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:msub>
						<mml:mi>u</mml:mi>
						<mml:mn>2</mml:mn>
					</mml:msub>
				</mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mi>m</mml:mi>
				</mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:msub>
						<mml:mi>v</mml:mi>
						<mml:mn>1</mml:mn>
					</mml:msub>
				</mml:math>, and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:msub>
						<mml:mi>v</mml:mi>
						<mml:mn>2</mml:mn>
					</mml:msub>
				</mml:math> are the arguments to the most recent <tt>glMapGrid2</tt> command.
			Then, if <i><tt>mode</tt></i> is <tt>GL_FILL</tt>, the <tt>glEvalMesh2</tt> command is
			equivalent to:
		</p><p>
			for ( j = <i><tt>j1</tt></i>; j &lt; <i><tt>j2</tt></i>; j += 1 ) { glBegin( GL_QUAD_STRIP ); for ( i =
			<i><tt>i1</tt></i>; i &lt;= <i><tt>i2</tt></i>; i += 1 ) { glEvalCoord2( i<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mo>·</mml:mo>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>u</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:msub>
							<mml:mi>u</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
					</mml:mrow>
				</mml:math>, j<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mo>·</mml:mo>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>v</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:msub>
							<mml:mi>v</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
					</mml:mrow>
				</mml:math> ); glEvalCoord2( i<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mo>·</mml:mo>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>u</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:msub>
							<mml:mi>u</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
					</mml:mrow>
				</mml:math>, (j+1)<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mo>·</mml:mo>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>v</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:msub>
							<mml:mi>v</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
					</mml:mrow>
				</mml:math> ); } glEnd(); }
		</p><p>
			If <i><tt>mode</tt></i> is <tt>GL_LINE</tt>, then a call to <tt>glEvalMesh2</tt> is
			equivalent to:
		</p><p>
			for ( j = <i><tt>j1</tt></i>; j &lt;= <i><tt>j2</tt></i>; j += 1 ) { glBegin( GL_LINE_STRIP ); for ( i =
			<i><tt>i1</tt></i>; i &lt;= <i><tt>i2</tt></i>; i += 1 ) glEvalCoord2( i<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mo>·</mml:mo>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>u</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:msub>
							<mml:mi>u</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
					</mml:mrow>
				</mml:math>, j<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mo>·</mml:mo>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>v</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:msub>
							<mml:mi>v</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
					</mml:mrow>
				</mml:math> ); glEnd(); } for ( i = <i><tt>i1</tt></i>; i &lt;= <i><tt>i2</tt></i>; i += 1 ) {
			glBegin( GL_LINE_STRIP ); for ( j = <i><tt>j1</tt></i>; j &lt;= <i><tt>j1</tt></i>; j += 1 )
			glEvalCoord2( i<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mo>·</mml:mo>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>u</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:msub>
							<mml:mi>u</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
					</mml:mrow>
				</mml:math>, j<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mo>·</mml:mo>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>v</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:msub>
							<mml:mi>v</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
					</mml:mrow>
				</mml:math> ); glEnd(); }
		</p><p>
			And finally, if <i><tt>mode</tt></i> is <tt>GL_POINT</tt>, then a call to
			<tt>glEvalMesh2</tt> is equivalent to:
		</p><p>
			glBegin( GL_POINTS ); for ( j = <i><tt>j1</tt></i>; j &lt;= <i><tt>j2</tt></i>; j += 1 ) for ( i =
			<i><tt>i1</tt></i>; i &lt;= <i><tt>i2</tt></i>; i += 1 ) glEvalCoord2( i<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mo>·</mml:mo>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>u</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:msub>
							<mml:mi>u</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
					</mml:mrow>
				</mml:math>, j<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mo>·</mml:mo>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>v</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:msub>
							<mml:mi>v</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
					</mml:mrow>
				</mml:math> ); glEnd();
		</p><p>
			In all three cases, the only absolute numeric requirements are that if <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mi>i</mml:mi>
						<mml:mo>=</mml:mo>
						<mml:mi>n</mml:mi>
					</mml:mrow>
				</mml:math>, then the value computed from <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mi>i</mml:mi>
						<mml:mo>·</mml:mo>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>u</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:msub>
							<mml:mi>u</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
					</mml:mrow>
				</mml:math> is exactly <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:msub>
						<mml:mi>u</mml:mi>
						<mml:mn>2</mml:mn>
					</mml:msub>
				</mml:math>, and if <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mi>j</mml:mi>
						<mml:mo>=</mml:mo>
						<mml:mi>m</mml:mi>
					</mml:mrow>
				</mml:math>, then the value computed from <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mi>j</mml:mi>
						<mml:mo>·</mml:mo>
						<mml:mi>&#916;</mml:mi>
						<mml:mi>v</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:msub>
							<mml:mi>v</mml:mi>
							<mml:mn>1</mml:mn>
						</mml:msub>
					</mml:mrow>
				</mml:math> is exactly <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:msub>
						<mml:mi>v</mml:mi>
						<mml:mn>2</mml:mn>
					</mml:msub>
				</mml:math>.
		</p></div><div class="refsect1" lang="en"><a name="glEvalMesh.3G-errors"/><h2>Errors</h2><p>
			<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>mode</tt></i> is not an accepted value.
		</p><p>
			<tt>GL_INVALID_OPERATION</tt> is generated if <tt>glEvalMesh</tt> is
			executed between the execution of <a href="glBegin.3G.xml"><tt>glBegin</tt></a> and the corresponding execution of
			<a href="glBegin.3G.xml"><tt>glEnd</tt></a>.
		</p></div><div class="refsect1" lang="en"><a name="glEvalMesh.3G-associated_gets"/><h2>Associated Gets</h2><p>
			<tt>glGet</tt> with argument <tt>GL_MAP1_GRID_DOMAIN</tt>
		</p><p>
			<tt>glGet</tt> with argument <tt>GL_MAP2_GRID_DOMAIN</tt>
		</p><p>
			<tt>glGet</tt> with argument <tt>GL_MAP1_GRID_SEGMENTS</tt>
		</p><p>
			<tt>glGet</tt> with argument <tt>GL_MAP2_GRID_SEGMENTS</tt>
		</p></div><div class="refsect1" lang="en"><a name="glEvalMesh.3G-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="glBegin.3G.xml">glBegin</a>, <a href="glEvalCoord.3G.xml">glEvalCoord</a>, <a href="glEvalPoint.3G.xml">glEvalPoint</a>, <a href="glMap1.3G.xml">glMap1</a>, <a href="glMap2.3G.xml">glMap2</a>, <a href="glMapGrid.3G.xml">glMapGrid</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="glEvalCoord.3G.xml">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-GL.xml">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="glEvalPoint.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glEvalCoord </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> glEvalPoint</td></tr></table></div></body></html>
