<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/pattern.xsl"?>
<pattern id="">
  <name>Increment</name>
  <relatedPatterns>
    <relatedPattern ref="" >
       <patternLink>Organized Collection of Points</patternLink>
    </relatedPattern>
    <relatedPattern ref="">
       <patternLink>Mapping</patternLink>
   </relatedPattern> 
 </relatedPatterns>
  <!-- The diagram is a graphic representation of the pattern.-->
  <diagram>
    <web>
	<img src="DiagramIncrementSm.jpg" width="400" />
	</web>
  	<latex>
    <img src="DiagramIncrement.png" width="400" />
	</latex>
  </diagram>
  <what>
    <paragraph>
      Drive change through a series of closely related values.
    </paragraph>
  </what>
  <when>
    <paragraph>
      Parts may be similar in structure but vary in their inputs. Very
      often, input variations are gradual from part to part and parts
      in sequences or other arrangements are similar to their
      neighbours. Use this pattern when you are making collections of
      related parts.
    </paragraph>
  </when>
  <why>
    <paragraph>
      Being able to change one part to another through a gradual
      transformation of inputs lends surety and control. As a
      form-making strategy, gradual change can provide a background
      against which a strong figure can play.
    </paragraph>
  </why>
  <how>
    <paragraph>
      Gradual change has two most simple forms. The first is the
      integers, stepping in units of one from low to high, <math
      latex="$\ldots-1,0,1,2,3,\ldots$">...-1,0,1,2,3,...</math> The
      second is the reals, varying continuously (infinitely
      divisible). Taken by themselves, the integers and reals can
      express only limited kinds of change. Functions transform
      sequences of integers and sampled reals into new sequences that
      may be dramatically different from the originals. 
    </paragraph>
    <paragraph>
     In turn, the <patternName>Increment</patternName> uses the
     output of a function to drive change in a variety of ways,
     limited only by imagination. Length, size, angle, distance,
     orientation, colour, transparency and surface texture can all be
     changed in orderly (and disorderly) ways through incrementing
     along squences of integers or reals.
    </paragraph>
    <paragraph>
      The samples in this pattern develop increasingly complex curves<latex>\index{curve|(}</latex>
      <latex>\index{point|(}</latex>
      traced by a single point moving through space. Successive
      samples increase both the number of parameters on which an increment
      applies and the complexity of the incrementing
      functions. Throughout each sample, the structure of the model
      remains constant, only the values of the parameters change.
    </paragraph>
    <paragraph>
      Even a single point can demonstrate the basic structure of an
      increment. Start with a point in space, located as it
      must be with respect to a coordinate system.
    </paragraph>
    <paragraph>
      <latex>
	\begin{bodyNote} 
	  \pbOneCol[c]{ 
	    \begin{dr}
	      \drCSOpt{0}{0}{1}{thick}
	      \node [point, modelPointo] at  (2,0) {}; 
	    \end{dr} 
	  } 
	\end{bodyNote}
      </latex>
    </paragraph>
    <paragraph>
      The point can be thought of having either Cartesian<latex>\index{coordinates!Cartesian}</latex> <math
      latex="(x,y,z)">(x,y,z)</math> coordinates or cylindrical<latex>\index{coordinates!cylindrical}</latex> <math
      latex="(r,\theta,z)">(r,a,z)</math>, where <math>r</math> is the
      radius, <math latex ="\theta">a</math> is the azimuth angle and
      <math>z</math> is the height of the point. Using cylindrical
      coordinates and incrementing the azimuth angle makes the point
      trace out an arc. If the azimuth angle goes from <math
      latex="0^\circ">0 degrees</math> to <math latex="360^\circ">360
      degrees</math> the arc becomes a circle<latex>\index{circle}</latex>. Incrementing the radius
      turns the arc into a spiral<latex>\index{spiral|(}</latex>.
    </paragraph>
    <paragraph>
      <latex>
	\begin{bodyNote}
	\pbTwoCol
	  {\input{\GCFigsPath/Patterns/IncrementCircle0.tex}}
	  {\currentWidth/2}
	  {\input{\GCFigsPath/Patterns/IncrementSpiral0.tex}}
	  {\currentWidth/2}
	\end{bodyNote}
      </latex>
    </paragraph>
    <paragraph>
      Incrementing the height of the point turns the arc into a helix<latex>\index{helix|(}</latex>
      and brings us to the first sample below.
    </paragraph>
  </how>
  <samples>
    <sample id="">
      <name>Circular Helix</name>
      <when>
	<paragraph>
	  Move a point uniformly around a centre and upward in space.
	</paragraph>
      </when>
      <how>
	<paragraph>
	  As a point moves around the circle, increment its height
	  by a uniform amount. The result is to trace out a simple
	  circular helix.
	</paragraph>
      </how>
      <file href="Samples/IncrCircularHelix/IncrCircularHelix.gct" />
      <animation src="Samples/IncrCircularHelix/AnimationCircularHelix.swf"/>
    </sample>
    <latex>\renewcommand{\sampleNewPage}[0]{false}</latex>
	<sample id="">
      <name>Conic Helix</name>
      <when>
	<paragraph>
	  Add a reducing radius increment to change a circular to a conic helix.
	</paragraph>
      </when>
      <how>
	<paragraph>
	  In addition to the two increments (angle and height) for a
	  circular helix, reducing the radius incrementally from
	  an initial value to a minimum value produces a conic helix,
	  that is a helix whose points lie on a cone<latex>\index{conic section!cone}</latex>.
	</paragraph>
      </how>
      <file href="Samples/IncrConicHelix/IncrConicHelix.gct" />
      <animation src="Samples/IncrConicHelix/AnimationIncrConicHelix.swf"/>
    </sample>
	
	<sample id="">
      <name>Tapered Radius Spiral</name>
      <when>
	<paragraph>
	  Taper the radius of conic helix to produce a spiral.
	</paragraph>
      </when>
      <how>
	<paragraph>
	  As a point on a conic helix moves upward its radius reduces
	  incrementally. The point can be imagined to have a parameter
	  that is <math>1</math> at the helix base and <math>0</math>
	  at the top. Squaring this parameter will still result in a
	  series that goes from <math>1</math> to <math>0</math>, but
	  the series will taper across this interval. Mathematically, the curve changes from a helix to a spiral.
	</paragraph>
      </how>
      <file href="Samples/IncrCompHelixA/IncrTaperedRadiusSpiral.gct" />
      <animation src="Samples/IncrCompHelixA/AnimationIncrTaperedRadiusSpiral.swf"/>
    </sample>
    <latex>\renewcommand{\sampleNewPage}[0]{false}</latex>
	<sample id="">
      <name>Tapered Height Spiral</name>
      <when>
	<paragraph>
	  Taper the height of a conic helix to produce a spiral.
	</paragraph>
      </when>
      <how>
	<paragraph>
	  Instead of tapering the radius, taper the height with the
	  same device, by squaring the parameter. In this case, the
	  parameter is <math>0</math> at the helix base and
	  <math>1</math> at the top. The helix<latex>\index{helix|)}</latex>, now a spiral, appears to have been
	  differentially stretched from its base to its top.
	</paragraph>
      </how>
      <file href="Samples/IncrCompHelixB/IncrTaperedHeightSpiral.gct" />
      <animation src="Samples/IncrCompHelixB/AnimationIncrTaperedHeightSpiral.swf"/>
    </sample>
	
	<sample id="">
      <name>Tapered Radius and Height Spiral</name>
      <when>
	<paragraph>
	  Combining increments yields unpredictable forms.
	</paragraph>
      </when>
      <how>
	<paragraph>
	  Combining both radius and height tapers can be done
	  independently in the model. They do not affect each other
	  computationally, but combine in the geometric result. They
	  produce a spiral that would be hard to conceive of itself, but
	  naturally emerges from the parameterization.
	</paragraph>
      </how>
      <file href="Samples/IncrCompHelixC/IncrTaperedRadiusAndHeightSpiral.gct" />
      <animation src="Samples/IncrCompHelixC/AnimationIncrTaperedRadiusAndHeightSpiral.swf"/>
    </sample>
    <latex>\renewcommand{\sampleNewPage}[0]{false}</latex>
	<sample id="">
      <name>Elliptical Tapered Radius and Height Spiral</name>
      <when>
	<paragraph>
	  Change a circular spiral <latex>\index{spiral|)}</latex>to an elliptical one. 
	  <latex>\index{curve|)}</latex>
	  <latex>\index{point|)}</latex>
	</paragraph>
      </when>
      <how>
	<paragraph>
	  In the prior samples, the radius, angle and height
	  parameters were independent in the model. In this sample,
	  the radius becomes a function of the angle, by using a polar
	  equation for the radius of an ellipse<latex>\index{conic section!ellipse}</latex>. If an ellipse has
	  major axis of <math>r=1</math>, minor axis of
	  <math>s=0.5</math>, the radius as a function of <math
	  latex="\theta">a</math> is 
	</paragraph>
	<paragraph>
	  <latex>\[\frac{rs}{\sqrt{{r^2}{\cos^2}\theta + {s^2}{\sin^2}\theta}} = \frac{0.5}{\sqrt{{\cos^2}\theta + {0.25}{\sin^2}\theta}}\]</latex>
	  <web>(<em>r</em>*<em>s</em>)/(sqrt(<em>r<sup>2</sup></em>cos<em><sup>2</sup>a + s<sup>2</sup></em>sin<em><sup>2</sup>a)</em>)=(<em>0.5</em>)/(sqrt(cos<em><sup>2</sup>a + 0.25</em>sin<em><sup>2</sup>a</em>)).</web> 
	</paragraph>
      </how>
      <file href="Samples/IncrCompHelixD/IncrEllipticalTaperedRadiusAndHeightSpiral.gct" />
      <animation src="Samples/IncrCompHelixD/AnimationIncrEllipticalTaperedRadiusAndHeightSpiral.swf"/>
    </sample>
  <web>
     <sample id="">
      <name>Snail Curve</name>
      <when>
	<paragraph>
	  Context of the sample
	</paragraph>
      </when>
      <how>
	<diagram>
	  <img src="ImgIncrNautilus.jpg" width="400"/>
	</diagram>
	<paragraph>
	  Details of the sample
	</paragraph>
      </how>
      <file href="Samples/IncrSnailCurve/IncrSnailCurve.gct" />
      <animation src="Samples/IncrSnailCurve/AnimationSnailCurve.swf"/>
    </sample>
    
    <sample id="">
      <name>Sin Wave</name>
      <when>
	<paragraph>
	  Context of the sample
	</paragraph>
      </when>
      <how>
	<paragraph>
	  Details of the sample
	</paragraph>
      </how>
      <file href="Samples/IncrSinWave/IncrSinWave.gct" />
      <animation src="Samples/IncrSinWave/AnimationSinWave.swf"/>
    </sample>
    
    <sample id="">
      <name>Drill</name>
      <when>
	<paragraph>
	  Context of the sample
	</paragraph>
      </when>
      <how>
	<paragraph>
	  Details of the sample
	</paragraph>
      </how>
      <file href="Samples/IncrDrill/IncrDrill.gct" />
      <animation src="Samples/IncrDrill/AnimationDrill.swf"/>
    </sample>
  </web>
  </samples>
</pattern>

