1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
|
<?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>gleSpiral</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-GLE.xml" title="GLE"/><link rel="previous" href="gleSetNumSides.3GLE.xml" title="gleSetNumSides"/><link rel="next" href="gleSuperExtrusion.3GLE.xml" title="gleSuperExtrusion"/></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">gleSpiral</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gleSetNumSides.3GLE.xml">Prev</a></td><th width="60%" align="center">GLE</th><td width="20%" align="right"><a accesskey="n" href="gleSuperExtrusion.3GLE.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="gleSpiral.3GLE"/><div class="titlepage"/><div class="refnamediv"><a name="gleSpiral.3GLE-name"/><h2>Name</h2><p>gleSpiral — Sweep an arbitrary contour along a helical path.</p></div><div class="refsynopsisdiv"><a name="gleSpiral.3GLE-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void<tt>gleSpiral</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>int<i><tt>ncp</tt></i>, gleDouble<i><tt>contour</tt></i>[][2], gleDouble<i><tt>cont_normal</tt></i>[][2], gleDouble<i><tt>up</tt></i>[3], gleDouble<i><tt>startRadius</tt></i>, gleDouble<i><tt>drdTheta</tt></i>, gleDouble<i><tt>startZ</tt></i>, gleDouble<i><tt>dzdTheta</tt></i>, gleDouble<i><tt>startXform</tt></i>[2][3], gleDouble<i><tt>dXformdTheta</tt></i>[2][3], gleDouble<i><tt>startTheta</tt></i>, gleDouble<i><tt>sweepTheta</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="gleSpiral.3GLE-python_specification"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>gleSpiral</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>contour</tt></i>[][2], <i><tt>cont_normal</tt></i>[][2], <i><tt>up</tt></i>[3], <i><tt>startRadius</tt></i>, <i><tt>drdTheta</tt></i>, <i><tt>startZ</tt></i>, <i><tt>dzdTheta</tt></i>, <i><tt>startXform</tt></i>[2][3], <i><tt>dXformdTheta</tt></i>[2][3], <i><tt>startTheta</tt></i>, <i><tt>sweepTheta</tt></i>) →<tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="gleSpiral.3GLE-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>ncp</tt></i></span></dt><dd>
number of contour points
</dd><dt><span class="term"><i><tt>contour</tt></i></span></dt><dd>
2D contour
</dd><dt><span class="term"><i><tt>cont_normal</tt></i></span></dt><dd>
2D contour normals
</dd><dt><span class="term"><i><tt>up</tt></i></span></dt><dd>
up vector for contour
</dd><dt><span class="term"><i><tt>startRadius</tt></i></span></dt><dd>
spiral starts in x-y plane
</dd><dt><span class="term"><i><tt>drdTheta</tt></i></span></dt><dd>
change in radius per revolution
</dd><dt><span class="term"><i><tt>startZ</tt></i></span></dt><dd>
starting z value
</dd><dt><span class="term"><i><tt>dzdTheta</tt></i></span></dt><dd>
change in Z per revolution
</dd><dt><span class="term"><i><tt>startXform</tt></i></span></dt><dd>
starting contour affine transformation
</dd><dt><span class="term"><i><tt>dXformdTheta</tt></i></span></dt><dd>
tangent change xform per revolution
</dd><dt><span class="term"><i><tt>startTheta</tt></i></span></dt><dd>
start angle in x-y plane
</dd><dt><span class="term"><i><tt>sweepTheta</tt></i></span></dt><dd>
degrees to spiral around
</dd></dl></div></div><div class="refsect1" lang="en"><a name="gleSpiral.3GLE-description"/><h2>Description</h2><p>
Sweep an arbitrary contour along a helical path.
</p><p>
The axis of the helix lies along the modeling coordinate z-axis.
</p><p>
An affine transform can be applied as the contour is swept. For most ordinary usage, the affines should be given as
<tt>NULL</tt>.
</p><p>
The <i><tt>startXform</tt></i> is an affine matrix applied to the contour to deform the contour. Thus,
<i><tt>startXform</tt></i> of the form
</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
<mml:mfenced separator=",">
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mi>cos</mml:mi>
</mml:mtd>
<mml:mtd>
<mml:mi>sin</mml:mi>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mo>-</mml:mo>
<mml:mo>sin</mml:mo>
</mml:mtd>
<mml:mtd>
<mml:mi>cos</mml:mi>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mfenced>
</mml:math></div><p>
will rotate the contour (in the plane of the contour), while
</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
<mml:mfenced separator=",">
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mn>1</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mi>tx</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>1</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mi>ty</mml:mi>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mfenced>
</mml:math></div><p>
will translate the contour, and
</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
<mml:mfenced separator=",">
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mi>sx</mml:mi>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mi>sy</mml:mi>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mfenced>
</mml:math></div><p>
scales along the two axes of the contour. In particular, note that
</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
<mml:mfenced separator=",">
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mn>1</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>1</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mfenced>
</mml:math></div><p>
is the identity matrix. The <i><tt>dXformdTheta</tt></i> is a differential affine matrix that is integrated
while the contour is extruded. Note that this affine matrix lives in the tangent space, and so it should have the form
of a generator. Thus, dx/dt's of the form
</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
<mml:mfenced separator=",">
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mi>r</mml:mi>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mo>-</mml:mo>
<mml:mi>r</mml:mi>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mfenced>
</mml:math></div><p>
rotate the the contour as it is extruded (<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:mi>r</mml:mi>
<mml:mo>≡</mml:mo>
<mml:mn>0</mml:mn>
</mml:math> implies no rotation, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:mi>r</mml:mi>
<mml:mo>≡</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>π</mml:mi>
</mml:math> implies that the contour is rotated once, etc.), while
</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
<mml:mfenced separator=",">
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mi>tx</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mi>ty</mml:mi>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mfenced>
</mml:math></div><p>
translates the contour, and
</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
<mml:mfenced separator=",">
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mi>sx</mml:mi>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mi>sy</mml:mi>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mfenced>
</mml:math></div><p>
scales it. In particular, note that
</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
<mml:mfenced separator=",">
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mfenced>
</mml:math></div><p>
is the identity matrix — i.e. the derivatives are zero, and therefore the integral is a constant.
</p></div><div class="refsect1" lang="en"><a name="gleSpiral.3GLE-see_also"/><h2>See Also</h2><p>
<a href="gleLathe.3GLE.xml">gleLathe</a>
</p></div><div class="refsect1" lang="en"><a name="gleSpiral.3GLE-author"/><h2>Author</h2><p>
Linas Vepstas
</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gleSetNumSides.3GLE.xml">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="reference-GLE.xml">Up</a></td><td width="40%" align="right"><a accesskey="n" href="gleSuperExtrusion.3GLE.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gleSetNumSides</td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top">gleSuperExtrusion</td></tr></table></div></body></html>
|