<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Riotstories</title>
	
	<link>http://www.riotstories.co.uk</link>
	<description>Steve Sinclair online</description>
	<lastBuildDate>Wed, 22 Feb 2012 15:20:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<image>
<title>Riotstories Posts</title>
<url>http://riotstories.co.uk/wp-content/themes/child2011//images/feedimage.png</url>
<link>http://riotstories.co.uk/</link>
<width>1000</width>
<height>288</height>
<description>Riotstories Blog Posts</description>
</image>		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/riotstories" /><feedburner:info uri="riotstories" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /><feedburner:emailServiceId>riotstories</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Modelling Seashells</title>
		<link>http://feedproxy.google.com/~r/riotstories/~3/u_B2sDj_Rcs/</link>
		<comments>http://www.riotstories.co.uk/science/seashells/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 14:28:22 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[3D Surface]]></category>
		<category><![CDATA[Geometry]]></category>
		<category><![CDATA[Parametric Equation]]></category>
		<category><![CDATA[Polar Co-ordinates]]></category>
		<category><![CDATA[Seashells]]></category>
		<category><![CDATA[Spiral]]></category>

		<guid isPermaLink="false">http://www.riotstories.co.uk/?p=975</guid>
		<description><![CDATA[Some ideas, concepts and examples for modelling the shapes of seashells are worked through for fun. <a href="http://www.riotstories.co.uk/science/seashells/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>I thought it would be fun to investigate the shapes of seashells and try to understand the factors that shape them. </p>
<p>In this post I&#8217;ve recorded what I&#8217;ve learned with examples for future reference. I&#8217;ve tried to make this post sufficiently complete that it could be used in the future as a reasonably comprehensive refresher in case I decide to come back to the subject and try playing with it further. In the course of thinking about this topic other ideas become important and the first part of this post summarises them (e.g. parametric surfaces, polar co-ordinates, ideas from Euclidean geometry). Where a particular subject requires it I&#8217;ve added a separate post to go into more detail and included a link to it in this post.<span id="more-975"></span></p>
<h2>Background ideas</h2>
<p>This section just outlines some of the background ideas that are necessary for this particular investigation.</p>
<h3 class="sectionheading">1. Cartesian Co-ordinates</h3>
<p>Everything that follows in this post assumed Euclidean space i.e. the flat space that we&#8217;re all used to in everyday life where the rules of geometry we were taught in school apply. Nothing written in this post is relevant if you&#8217;re thinking about curved space where different rules of geometry apply.</br><br />
In 2D geometry it&#8217;s usual to think of the co-ordinates of a point as being specified on a so called &#8220;Cartesian Co-ordinate System&#8221;. That&#8217;s just a fancy way of saying &#8220;imagine a flat plane where conventionally we call the direction stretching from left to right i.e. running horizontally from left to right the x-axis and the direction running vertically the y-axis&#8221;. The x and y axes define 1 Cartesian co-ordinate system. This is shown in Figure 1.</br></p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/2D-Cartesian-coordinate-system.jpg" alt="2D Cartesian Co-ordinate System" /></p>
<p class="captiontext">Figure 1: Axes in a 2D Cartesian Co-ordinate System</p>
<p>A point, call it &#8220;P&#8221;, in that co-ordinate system would be specified as (x,y). In this co-ordinate system the point &#8220;P&#8221; has 2 properties: a length measured from the origin, call it &#8220;r&#8221; and an angle with the positive x-axis, conventioanlly this angle is labelled <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta' title='\theta' class='latex' /> (the letter &#8220;Theta&#8221; in the Greek alphabet (pronounced &#8220;Thee-ta&#8221; or &#8220;Thay-ta&#8221;). It&#8217;s conventional for science and maths to label variables with letters in the Greek alphabet. The point &#8220;P&#8221; and the properties are shown in Figure 2.</br></p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/Polar Co-ordinates.jpg" alt="Properties of a point "P" in the Cartesian Plane" /></p>
<p class="captiontext">Figure 2: Properties r and <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta' title='\theta' class='latex' /> of the point &#8220;P&#8221;</p>
<p>One of the interesting features of this geometry is that the properties r and <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta' title='\theta' class='latex' /> can be calculated from the co-ordinates (x,y) using Pythagoras&#8217;s Theorem from which we find:</br><br />
<img src='http://s.wordpress.com/latex.php?latex=r%5E2%3Dx%5E2%2By%5E2&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='r^2=x^2+y^2' title='r^2=x^2+y^2' class='latex' /></br><br />
<img src='http://s.wordpress.com/latex.php?latex=%5Ctheta%3D%5Carctan%5Cleft%28%5Cdfrac%7By%7D%7Bx%7D%5Cright%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta=\arctan\left(\dfrac{y}{x}\right)' title='\theta=\arctan\left(\dfrac{y}{x}\right)' class='latex' /></p>
<p>So far so good. We have learned how to specify the position of a point in a 2D Cartesian plan comprising a co-ordinate system denoted by an x-axis and a y-axis. Working in a 2D Cartesian plane like this is very useful as we will see but it is useful to extend this concept to a 3D co-ordinate system as follows</br></p>
<h3 class="sectionheading">2. 3D Cartesian Co-ordinates</h3>
<p>The 2D co-ordinate system described so far allows us to specify the position of a point on a flat plane. By introducing a 3rd co-ordinate axis we can specifiy the position of a point in 3D space. Conventionally this 3rd axis is denoted &#8220;z&#8221; and the position of our point &#8220;P&#8221; is then given as (x, y, z).</br><br />
Much can be written about the co-ordinate systems discussed so far but it would distract too much from the point of this post &#8211; plenty of good reference material can be found online.</br><br />
Our new z-axis is orthogonal (i.e. at right angles) to our existing x-y plane, but that means there are two possible orientations for the positive z-axis. How do we decide which one to choose?</br><br />
Conventionally we choose a left-handed or a right-handed co-ordinate system. The direction of increasing z is determined by imagining you rotate the x-axis onto the y-axis using the curled fingers of the left hand for a left-handed co-ordinate system or the right hand for a right-handed co-ordinate system. In either case the thumb of the chosen hand will point in the direction of increasing z for that co-ordinate system. This is shown in Figure 3.</p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/handedness.jpg" alt="Left and Right Handed Cartesian Co-ordinate Systems" /></p>
<p class="captiontext">Figure 3: Left and Right Handed Cartesian Co-ordinate Systems</p>
<p>We now have a 3D Cartesian co-ordinate system like the one shown in Figure 4 (which happens to be a right handed system &#8211; I usually end up choosing a right handed system for whatever reason).</p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/3D Cartesian.jpg" alt="Right-Handed 3D Cartesian Co-ordinate System" /></p>
<p class="captiontext">Figure 4: Right-Handed 3D Cartesian Co-ordinate System</p>
<h3 class="sectionheading">3. Distance in 3D Co-ordinate Systems</h3>
<p>In the 2D Co-ordinate system discussed above Pythagoras&#8217;s Theorem was used to show the length of the line from the origin (the point (0,0)) of the co-ordinate system to the point &#8220;P&#8221; (denoted by r) is related to the (x, y) co-ordinates of &#8220;P&#8221; through the relationship:</p>
<p><img src='http://s.wordpress.com/latex.php?latex=r%5E2%3Dx%5E2%2By%5E2&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='r^2=x^2+y^2' title='r^2=x^2+y^2' class='latex' /></br></p>
<p>Imagine now that we have 2 points on the x-y plane with co-ordinates (x2, y2) and (x1, y1) instead of the origin (0, 0) and a single point (x, y). The distance between these 2 points is just an extension of result already quoted from Pythagoras&#8217;s Theorem and that distance is:</p>
<p><img src='http://s.wordpress.com/latex.php?latex=d%5E2%3D%28x2-x1%29%5E2%2B%28y2-y1%29%5E2&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='d^2=(x2-x1)^2+(y2-y1)^2' title='d^2=(x2-x1)^2+(y2-y1)^2' class='latex' /> or <img src='http://s.wordpress.com/latex.php?latex=d%3D%5Csqrt%7B%28x2-x1%29%5E2%2B%28y2-y1%29%5E2%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='d=\sqrt{(x2-x1)^2+(y2-y1)^2}' title='d=\sqrt{(x2-x1)^2+(y2-y1)^2}' class='latex' /></p>
<p>See the similarity between this and the previous result ? This is shown in Figure 5.</p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/distance 2D.jpg" alt="Distance Between (x2,y2) and (x1,y1) in the 2D Cartesian Plane" /></p>
<p class="captiontext">Figure 5: Distance Between (x2,y2) and (x1,y1) in the 2D Cartesian Plane</p>
<p>This idea can be extended into our 3D Cartesian co-ordinate system to give the following general result for 2 points (x1, y1, z1) and (x2, y2, z2).</p>
<p><img src='http://s.wordpress.com/latex.php?latex=d%5E2%3D%28x2-x1%29%5E2%2B%28y2-y1%29%5E2%2B%28z2-z1%29%5E2&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='d^2=(x2-x1)^2+(y2-y1)^2+(z2-z1)^2' title='d^2=(x2-x1)^2+(y2-y1)^2+(z2-z1)^2' class='latex' /></br><br />
or</br><br />
<img src='http://s.wordpress.com/latex.php?latex=d%3D%5Csqrt%7B%28x2-x1%29%5E2%2B%28y2-y1%29%5E2%2B%28z2-z1%29%5E2%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='d=\sqrt{(x2-x1)^2+(y2-y1)^2+(z2-z1)^2}' title='d=\sqrt{(x2-x1)^2+(y2-y1)^2+(z2-z1)^2}' class='latex' /></br></p>
<p>Applying this result to the specific case where one of the points in our 3D system is located at the origin (0,0,0) and the other point &#8220;P&#8221; is at the general position (a,b,c) we can calculate the distance (call it &#8220;d&#8221;) from the origin to the point &#8220;P&#8221; as follows:</p>
<p><img src='http://s.wordpress.com/latex.php?latex=d%3D%5Csqrt%7Ba%5E2%2Bb%5E2%2Bc%5E2%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='d=\sqrt{a^2+b^2+c^2}' title='d=\sqrt{a^2+b^2+c^2}' class='latex' /></br><br />
This is shown in Figurer 6.</br><br />
<img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/3d distance.gif" alt="Distance in 3D" /></p>
<p class="captiontext">Figure 6: Distance in 3D Co-ordinate System</p>
<h3 class="sectionheading">The Story So Far&#8230;</h3>
<p>So far we&#8217;ve established:</p>
<ul>
<li>How to define a 2D Cartesian co-ordinate System</li>
<li>How to specifiy the location of a point in a 2D co-ordinate system</li>
<li>How to calculate the distance between points in a 2D co-ordinate system</li>
<li>How to define a 3D Cartesian co-ordinate system</li>
<li>How to define the location of a point in a 3D Cartesian co-ordinate system</li>
<li>How to calculate the distance between points in the 3D co-ordinate system</li>
</ul>
<h3 class="sectionheading">4. Polar Co-ordinate Systems</h3>
<p>We&#8217;ve discussed how to represent a point on the x-y plane using Cartesian co-ordinates. Howevere, that&#8217;s just 1 co-ordinate system that is useful. There are others. For our purposes in this investigation into the shapes of seashells another co-ordinate system is equally useful &#8211; the &#8220;Polar Co-ordinate&#8221; system. We&#8217;ve already touched upon the conept of polar co-ordinates indirectly in the previous sections.</br><br />
We showed in Figure 2 that a point in the x-y plan can be represented as a distance from the origin (we labelled the distance &#8220;r&#8221;) and an angle in a counterclockwise direction from the positive x-axis which we labelled <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta' title='\theta' class='latex' /></br><br />
In the polar co-ordinate system of Figure 2 the point P has the polar co-ordinates (r, <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta' title='\theta' class='latex' />)</br><br />
The point P(x,y) or P(r, <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta' title='\theta' class='latex' />) is actually the same point and any fundamental behaviour associated with P must be the same regardless of co-ordinate system (this is &#8220;invariance&#8221; is a fundamental concept in relativity theory). this means there must be a transformation between the x-y and polar co-ordinate systems.</br><br />
From Figure 2 we can establish the following relationship between (x,y) and (r, <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta' title='\theta' class='latex' />):</br><br />
<img src='http://s.wordpress.com/latex.php?latex=x%3Dr%7B%5Ccos%5Ctheta%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='x=r{\cos\theta}' title='x=r{\cos\theta}' class='latex' /></br><br />
<img src='http://s.wordpress.com/latex.php?latex=y%3Dr%7Bsin%5Ctheta%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='y=r{sin\theta}' title='y=r{sin\theta}' class='latex' /></br><br />
allowing transformation from polar to Cartesian</br><br />
and</br><br />
<img src='http://s.wordpress.com/latex.php?latex=r%5E2%3Dx%5E2%2By%5E2&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='r^2=x^2+y^2' title='r^2=x^2+y^2' class='latex' /></br><br />
<img src='http://s.wordpress.com/latex.php?latex=%5Ctheta%3D%5Carctan%5Cleft%28%5Cdfrac%7By%7D%7Bx%7D%5Cright%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta=\arctan\left(\dfrac{y}{x}\right)' title='\theta=\arctan\left(\dfrac{y}{x}\right)' class='latex' /></br><br />
allowing transformation from Cartesian to polar</br><br />
This idea of using Cartesian and polar co-ordinates to represent a position on plane will be useful in what follows and leads naturally onto the next piece of background information that is necessary, that of parameteric curves.</p>
<h3 class="sectionheading">The Story So Far&#8230;</h3>
<p>So far we&#8217;ve established:</p>
<ul>
<li>The concept of 2D &#038; 3D Cartesian co-ordinate Systems</li>
<li>How to calculate the distance between points in a 2D &#038; 3D co-ordinate system</li>
<li>How to define the position of a point in a 2D polar co-ordinate system</li>
<li>How to translate the co-ordinates of a point between 2D Cartesian and polar co-ordinate systems in either &#8220;direction&#8221;</li>
</ul>
<h3 class="sectionheading">5. Parametric Curves</h3>
<p>Instead of defining y in terms of x i.e. y= f(x) or x in terms of y i.e. x= f(y) we define both x and y in terms of a third variable called a parameter as follows:</p>
<p>x=f(t)<br />
y=g(t)</p>
<p>Here we have introduced a new variable (which is usally) denoted by &#8220;t&#8221; &#8211; naturally, it doesn’t have to be called &#8220;t&#8221;, you can call it anything you want.</p>
<p>Sometimes the values that &#8220;t&#8221; can take will be restricted, sometimes they won’t.  Whether it is restricted or not depends on the situation and what we are trying to do. Most of the time it will be reasonably clearwhether &#8220;t&#8221; needs to be restricted or not. In what follows you will see instances where the parameter is restricted and others where it isn&#8217;t.</p>
<p>Each value of &#8220;t&#8221; defines a point in the x-y plane that can be plotted, each point x or y being the value of a function f(t) or g(t) evaluated for that particular value of &#8220;t&#8221;. The collection of (x,y) points that results from letting &#8220;t&#8221; take on all possible or allowed values is the graph of the parametric equations x=f(t) and y=g(t) and is called the parametric curve.</p>
<p>Here are some examples:</p>
<p>Example1: Parametric Equation of a Circle</p>
<p><img src='http://s.wordpress.com/latex.php?latex=x%3DR%7B%5Ccos%20t%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='x=R{\cos t}' title='x=R{\cos t}' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=y%3DR%7Bsin%20t%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='y=R{sin t}' title='y=R{sin t}' class='latex' /></p>
<p>If we set R=2 and allow t to take on values in the range <img src='http://s.wordpress.com/latex.php?latex=0%5Cle%7Bt%7D%5Cle%202%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le{t}\le 2\pi' title='0\le{t}\le 2\pi' class='latex' /> we get the following curve:</p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/2circle.png" alt="Circle of radius 2" /></p>
<p>I haven&#8217;t shown it on this diagram but the points on this diagram evolve in a counter-clockwise direction &#8211; to see this just evaluate the (x,y) pairs for various values of the parameter &#8220;t&#8221; in the allowed range, below I&#8217;ve shows the (x,y) pairs for a given value of &#8220;t&#8221; in the format t=value: (x,y)</p>
<p><img src='http://s.wordpress.com/latex.php?latex=t%3D0%5Cvdots%28R%2C0%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='t=0\vdots(R,0)' title='t=0\vdots(R,0)' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=t%3D%5Cleft%28%5Cdfrac%7B%5Cpi%7D%7B2%7D%5Cright%29%5Cvdots%280%2CR%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='t=\left(\dfrac{\pi}{2}\right)\vdots(0,R)' title='t=\left(\dfrac{\pi}{2}\right)\vdots(0,R)' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=t%3D%7B%5Cpi%7D%5Cvdots%28-R%2C0%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='t={\pi}\vdots(-R,0)' title='t={\pi}\vdots(-R,0)' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=t%3D%5Cleft%28%5Cdfrac%7B3%5Cpi%7D%7B2%7D%5Cright%29%5Cvdots%280%2C-R%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='t=\left(\dfrac{3\pi}{2}\right)\vdots(0,-R)' title='t=\left(\dfrac{3\pi}{2}\right)\vdots(0,-R)' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=t%3D%7B2%5Cpi%7D%5Cvdots%28R%2C0%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='t={2\pi}\vdots(R,0)' title='t={2\pi}\vdots(R,0)' class='latex' /></p>
<p>If we wanted the curve to go in the opposite direction we would set different boundaries on the parameter &#8220;t&#8221; so that it was in the range: <img src='http://s.wordpress.com/latex.php?latex=-2%5Cpi%5Cle%7Bt%7D%5Cle%200&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='-2\pi\le{t}\le 0' title='-2\pi\le{t}\le 0' class='latex' /> and we will find that the arithmetic signs of the &#8220;R&#8221; parameter in the above results reverses for the values of <img src='http://s.wordpress.com/latex.php?latex=%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\pi' title='\pi' class='latex' /> different from 0 or <img src='http://s.wordpress.com/latex.php?latex=2%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='2\pi' title='2\pi' class='latex' /> showing that the radial line sweeps out the circle in a clockwise direction starting in the horizontal position lying along the positive x-axis.</p>
<p>Example 2: parametric Equation of an Elipse</p>
<p><img src='http://s.wordpress.com/latex.php?latex=x%3DR%7B%5Ccos%20t%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='x=R{\cos t}' title='x=R{\cos t}' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=y%3D2R%7Bsin%20t%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='y=2R{sin t}' title='y=2R{sin t}' class='latex' /></p>
<p>If we set R=2 and allow t to take on values in the range <img src='http://s.wordpress.com/latex.php?latex=0%5Cle%7Bt%7D%5Cle%202%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le{t}\le 2\pi' title='0\le{t}\le 2\pi' class='latex' /> we get the following curve:</p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/2ellipse.png" alt="Parametric equation for an ellipse" /></p>
<p>There are many other curves occuring in mathematics and in nature that govern physical behaviour and interactions, some alternatives that can exhibit interesting behaviour are:</p>
<h4 class="curve">Astroid</h4>
<p><img src='http://s.wordpress.com/latex.php?latex=x%3D%5Ccos%5E3t&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='x=\cos^3t' title='x=\cos^3t' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=y%3D%5Csin%5E3t&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='y=\sin^3t' title='y=\sin^3t' class='latex' /></p>
<p><img src='http://s.wordpress.com/latex.php?latex=0%5Cle%7Bt%7D%5Cle%202%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le{t}\le 2\pi' title='0\le{t}\le 2\pi' class='latex' /></br></p>
<h4 class="curve">Astroid Pedal Curve</h4>
<p><img src='http://s.wordpress.com/latex.php?latex=x%3D%5Ccos%20t%5Csin%5E2t&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='x=\cos t\sin^2t' title='x=\cos t\sin^2t' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=y%3D%5Cleft%281%2B%5Ccos2t%5Cright%29%5Cdfrac%7B%5Csin%5E2t%7D%7B2%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='y=\left(1+\cos2t\right)\dfrac{\sin^2t}{2}' title='y=\left(1+\cos2t\right)\dfrac{\sin^2t}{2}' class='latex' /></p>
<p><img src='http://s.wordpress.com/latex.php?latex=0%5Cle%7Bt%7D%5Cle%202%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le{t}\le 2\pi' title='0\le{t}\le 2\pi' class='latex' /></br></p>
<h4 class="curve">Bifoliate</h4>
<p><img src='http://s.wordpress.com/latex.php?latex=x%3D%5Cdfrac%7B8%5Ccos%5E2t%5Csin%5E2t%7D%7B3%2B%5Ccos4t%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='x=\dfrac{8\cos^2t\sin^2t}{3+\cos4t}' title='x=\dfrac{8\cos^2t\sin^2t}{3+\cos4t}' class='latex' /></br><br />
<img src='http://s.wordpress.com/latex.php?latex=y%3D%5Cdfrac%7B8%5Ccos%20t%5Csin%5E3t%7D%7B3%2B%5Ccos4t%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='y=\dfrac{8\cos t\sin^3t}{3+\cos4t}' title='y=\dfrac{8\cos t\sin^3t}{3+\cos4t}' class='latex' /></p>
<p><img src='http://s.wordpress.com/latex.php?latex=0%5Cle%7Bt%7D%5Cle%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le{t}\le\pi' title='0\le{t}\le\pi' class='latex' /></br></p>
<h2>2D Spirals</h2>
<p>We can now use the ideas that we&#8217;ve learned about so far to take the first step towards modelling teh shape of seashells. Most people if asked would probably agree that seashells appear to exhibit a spiral type structure so that&#8217;s where I&#8217;ll start.</p>
<p>Spirals are an interesting geometric shape and it can be fun to study their properties for its own sake. There ar many different spiral structures but to get started I&#8217;ll look at a simple one and a more realistic one. at the end of this section I&#8217;ll list some others that you can have a play with if intrested.</p>
<p>Referring back to the previous discussion on polar co-ordinates the spirals have the property that the radial parameter r is a function of the angle so:</p>
<p><img src='http://s.wordpress.com/latex.php?latex=r%3Df%5Cleft%28%5Ctheta%5Cright%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='r=f\left(\theta\right)' title='r=f\left(\theta\right)' class='latex' /></br></p>
<h3 class="sectionheading">Archimedean Spiral</h3>
<p>A common class of spiral is the so called &#8220;Archimedean spiral&#8221;, the general form of which is:</p>
<p><img src='http://s.wordpress.com/latex.php?latex=r%3Da%2Bb%5Ctheta%5E%7B%5Cfrac%7B1%7D%7Bx%7D%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='r=a+b\theta^{\frac{1}{x}}' title='r=a+b\theta^{\frac{1}{x}}' class='latex' /></br><br />
The form of this spiral that we will use here is the case where x=1 giving:</br><br />
<img src='http://s.wordpress.com/latex.php?latex=r%3Da%2Bb%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='r=a+b\theta' title='r=a+b\theta' class='latex' /></p>
<p>The parametric equations we will use can now be written for the spiral in the x-y plane as follows:</p>
<p><img src='http://s.wordpress.com/latex.php?latex=x%3Dr%7B%5Ccos%20t%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='x=r{\cos t}' title='x=r{\cos t}' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=y%3Dr%7Bsin%20t%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='y=r{sin t}' title='y=r{sin t}' class='latex' /></p>
<p>where<br />
<img src='http://s.wordpress.com/latex.php?latex=r%3Da%2Bb%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='r=a+b\theta' title='r=a+b\theta' class='latex' /> and initially <img src='http://s.wordpress.com/latex.php?latex=0%5Cle%7Bt%7D%5Cle%202%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le{t}\le 2\pi' title='0\le{t}\le 2\pi' class='latex' /></p>
<p>The parametric equations can now be re-written as follows by substituting for r:</p>
<p><img src='http://s.wordpress.com/latex.php?latex=x%3D%5Cleft%28a%2Bbt%5Cright%29%5Ccos%20t&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='x=\left(a+bt\right)\cos t' title='x=\left(a+bt\right)\cos t' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=y%3D%5Cleft%28a%2Bbt%5Cright%29%5Csin%20t&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='y=\left(a+bt\right)\sin t' title='y=\left(a+bt\right)\sin t' class='latex' /></p>
<p>with a, b constants and <img src='http://s.wordpress.com/latex.php?latex=0%5Cle%7Bt%7D%5Cle%202%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le{t}\le 2\pi' title='0\le{t}\le 2\pi' class='latex' /></p>
<p>Using the previous formula for calulating distances in a 2D cartesian co-ordinate system we can show that the distance between points on the successive turns of this spiral along a given angle is equal to <img src='http://s.wordpress.com/latex.php?latex=2%7B%5Cpi%7Db&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='2{\pi}b' title='2{\pi}b' class='latex' /> (clue: a turn means that along a given angle the value of &#8220;t&#8221; has increased by <img src='http://s.wordpress.com/latex.php?latex=2%7B%5Cpi%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='2{\pi}' title='2{\pi}' class='latex' />). Since &#8220;b&#8221; is a constant for any given instacne of this spiral the distance between successive turns is also a constant. We will see that this is different from the next spiral we look at (which is also more realistic in that it occurs frequently in nature).</p>
<p>The figure below shows this spiral plotted for a=2 and b=4 and <img src='http://s.wordpress.com/latex.php?latex=0%5Cle%7Bt%7D%5Cle%204%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le{t}\le 4\pi' title='0\le{t}\le 4\pi' class='latex' /></p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/archimedes-spiral.png" alt="Archimedes spiral with a=2 and b=4" /></p>
<p>The parameter &#8220;a&#8221; determines the starting radius of the spiral on the x-axis (i.e. it&#8217;s the radius of the circle that would result if b=0) and is shown in the figure below where we have increased &#8220;a&#8221; from 2 in the previous diagram to 5 and b=4 as previously</p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/5archimedes.png" alt="Archimedes spiral with a=5 and b=4" /></p>
<p>As derived previously the separation between turns of this spiral is a constant and is proportional to &#8220;b&#8221; so bigger &#8220;b&#8221; means arcs that are further apart.</p>
<h3 class="sectionheading">Logarithmic Spiral</h3>
<p></br><br />
Another spiral form that is important because it is a form that occurs in nature in many places is the so called &#8220;Logarithmic Spiral&#8221;. The polar form of the logarithmic spiral is:</p>
<p><img src='http://s.wordpress.com/latex.php?latex=r%3Dae%5E%7Bbt%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='r=ae^{bt}' title='r=ae^{bt}' class='latex' /></br><br />
where once again &#8220;a&#8221; and &#8220;b&#8221; are constants. An interesting property of this spiral is that it is self-similar, for example if the spiral is scaled by a factor of <img src='http://s.wordpress.com/latex.php?latex=e%5E%7B2%7B%5Cpi%7Db%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='e^{2{\pi}b}' title='e^{2{\pi}b}' class='latex' /> then is the same as the original without rotation, just bigger. It turns out many shells in nature follow growth patterns defined by logarithmic spirals which allows the animal to grow physically bigger but without changing shape.</p>
<p>The parametric equations for the logairthmic spiral in the x-y plane are given by:</p>
<p><img src='http://s.wordpress.com/latex.php?latex=x%3D%7Bae%5E%7Bb%20t%7D%7D%5Ccos%20t&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='x={ae^{b t}}\cos t' title='x={ae^{b t}}\cos t' class='latex' /></br><br />
<img src='http://s.wordpress.com/latex.php?latex=x%3D%7Bae%5E%7Bb%20t%7D%7D%5Csin%20t&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='x={ae^{b t}}\sin t' title='x={ae^{b t}}\sin t' class='latex' /></br></p>
<p>In the same way as we calculated the distance between points on successive curls along a given angle for the Archimedes spiral we can do so for the logarithmic spiral. The result obtained is:</br></p>
<p><img src='http://s.wordpress.com/latex.php?latex=d%3Dae%5E%7Bb%28t%2Bn2%5Cpi%29%7D%5Cleft%28e%5E%7B2b%5Cpi%7D-1%5Cright%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='d=ae^{b(t+n2\pi)}\left(e^{2b\pi}-1\right)' title='d=ae^{b(t+n2\pi)}\left(e^{2b\pi}-1\right)' class='latex' /></br><br />
For increasing &#8220;n&#8221; these values form a geometric series with scale factor <img src='http://s.wordpress.com/latex.php?latex=e%5E%7B2%7B%5Cpi%7Db%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='e^{2{\pi}b}' title='e^{2{\pi}b}' class='latex' />. Compare this with the equivalent for the Archimedes spiral where the successive differences form an arithmetic sequence with difference given by <img src='http://s.wordpress.com/latex.php?latex=b%202%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='b 2\pi' title='b 2\pi' class='latex' /></br></p>
<p>The figure below shows a logarithmic spiral with &#8220;a&#8221;=0.15 and &#8220;b&#8221;=0.2 plotted over the range <img src='http://s.wordpress.com/latex.php?latex=0%5Cle%7Bt%7D%5Cle%7B6%7D%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le{t}\le{6}\pi' title='0\le{t}\le{6}\pi' class='latex' /></p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/logspiral.png" alt="Logarithmic Spiral" /></p>
<h2>3D Spirals</h2>
<p>We&#8217;ve now got the details of 2 common spiral shapes in 2D (the x-y plane). To use these spirals to model seashell shapes we need to extend them into 3D. </p>
<p>Essentially, extending into 2D is a logical extension of what we&#8217;ve already covered for 2D, this time the z co-ordinate becomes a function on our angle <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta' title='\theta' class='latex' /> so we have:</p>
<p><img src='http://s.wordpress.com/latex.php?latex=r%3Df%28%5Ctheta%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='r=f(\theta)' title='r=f(\theta)' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=z%3Dg%28%5Ctheta%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='z=g(\theta)' title='z=g(\theta)' class='latex' /></p>
<h3 class="sectionheading">3D Archimedian Spiral</h3>
<p>for the Archimedes Spiral used previously we already know <img src='http://s.wordpress.com/latex.php?latex=r%28%5Ctheta%29%3Da%2Bb%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='r(\theta)=a+b\theta' title='r(\theta)=a+b\theta' class='latex' />.</p>
<p>Initially we assume a linear variation of z as a function of <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta' title='\theta' class='latex' /> so we have</p>
<p><img src='http://s.wordpress.com/latex.php?latex=z%3Dc%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='z=c\theta' title='z=c\theta' class='latex' /> where c is a constant, giving </p>
<p><img src='http://s.wordpress.com/latex.php?latex=r%3Da%2Bb%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='r=a+b\theta' title='r=a+b\theta' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=z%3Dc%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='z=c\theta' title='z=c\theta' class='latex' /></p>
<p>We can plot example spirals using these relationships and various values of a, b, c. An example of the Archimedes spiral with a=0.2, b=3, c=3 is shown below. It is interesting to experiment with different values of a,b,c to understand the effect these individual parametrs have on the shape of the spiral.</p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/Archimedes3D.png" alt="3D Archimedes Spiral" /></p>
<h3 class="sectionheading">3D Logarithmic Spiral</h3>
<p>We can adopt a similar approach when using the Logarithmic spiral, this time we can use <img src='http://s.wordpress.com/latex.php?latex=z%3De%5E%7Bc%5Ctheta%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='z=e^{c\theta}' title='z=e^{c\theta}' class='latex' /> giving the parameteric equations for the spiral as</p>
<p><img src='http://s.wordpress.com/latex.php?latex=x%3Da%20e%5E%7Bb%5Ctheta%7D%20Cos%5Cleft%28%5Ctheta%5Cright%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='x=a e^{b\theta} Cos\left(\theta\right)' title='x=a e^{b\theta} Cos\left(\theta\right)' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=y%3Da%20e%5E%7Bb%5Ctheta%7D%20Sin%5Cleft%28%5Ctheta%5Cright%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='y=a e^{b\theta} Sin\left(\theta\right)' title='y=a e^{b\theta} Sin\left(\theta\right)' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=z%3Dc%20e%5E%7Bd%5Ctheta%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='z=c e^{d\theta}' title='z=c e^{d\theta}' class='latex' /></p>
<p>Notice we&#8217;ve given the general form for <img src='http://s.wordpress.com/latex.php?latex=z%5Cleft%28%5Ctheta%5Cright%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='z\left(\theta\right)' title='z\left(\theta\right)' class='latex' /> and used c and d for the parameters. We could of course choose values so that c=a and d=b, in which case the z=r. Generally a,b,c,d are constants. </p>
<p>An example of a Logarithmic spiral with a=0.1, b=0.2, c=0.3, d=0.14</p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/Log3D.png" alt="3D Logarithmic Spiral" /></p>
<h2>Model Seashells</h2>
<p>Now we can use the spirals above to generate some sample seashell shapes. To do this we need to treat the spirals we&#8217;ve generated as a path in space. This gives a line not a 3D surface with extent which is what a physical seashell is. We call the 3D spiral a &#8220;helico spiral&#8221; and the way we create a 3D surface is to move a generating curve along the helico-spiral pathway &#8211; a bit like moving a hoop through the air by hand to create a pattern of soap bubbles. Part of the fun is in creating different generating curves. To start with I&#8217;ll use a simple semi-circle to illustrate the idea. The figure below is an attempt to show the geometry and illustrate how we use it.</p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/GeneratingCurve.png" alt="Generating Curve" /></p>
<p>From the image you can see that the generating curve has a radius &#8220;R&#8221; and that radius creates an angle <img src='http://s.wordpress.com/latex.php?latex=%5Cphi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\phi' title='\phi' class='latex' /></p>
<p>A point on the surface we will create by moving the generating curve along the helico spiral is defined in terms of 2 angles <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta' title='\theta' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%5Cphi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\phi' title='\phi' class='latex' />. As before <img src='http://s.wordpress.com/latex.php?latex=0%5Cle%5Ctheta%5Cle%202%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le\theta\le 2\pi' title='0\le\theta\le 2\pi' class='latex' /> but <img src='http://s.wordpress.com/latex.php?latex=0%5Cle%5Cphi%5Cle%20%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le\phi\le \pi' title='0\le\phi\le \pi' class='latex' /></p>
<p>From the figure showing the generating curve you can see that the position on the new surface i.e. &#8220;r&#8221; is now increased as a result of the shape of the generating curve. You can do some straightforward trigonometry to show that</p>
<img src='http://s.wordpress.com/latex.php?latex=r%5Cto%20r%2BR%5Csin%5Cleft%28%5Cphi%5Cright%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='r\to r+R\sin\left(\phi\right)' title='r\to r+R\sin\left(\phi\right)' class='latex' />
<p>In addition, the z co-ordinate is also increased by the amount of the R vector on the generating curve that is projected onto the z-axis (i.e. R-the component of R on the baseline of the semi-circle for a given angle). Again some straightforward trig will show you that</p>
<img src='http://s.wordpress.com/latex.php?latex=z%5Cto%20z%2BR%5Cleft%281-%5Ccos%5Cphi%5Cright%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='z\to z+R\left(1-\cos\phi\right)' title='z\to z+R\left(1-\cos\phi\right)' class='latex' />
<p>Using these modified expressions for &#8220;r&#8221; and &#8220;z&#8221; we can write the parametric equations using an Archimedian spiral as the helico spiral as follows:</p>
<p><img src='http://s.wordpress.com/latex.php?latex=x%3D%28a%2Bb%5Ctheta%2BR%5Csin%5Cphi%29%5Ccos%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='x=(a+b\theta+R\sin\phi)\cos\theta' title='x=(a+b\theta+R\sin\phi)\cos\theta' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=y%3D%28a%2Bb%5Ctheta%2BR%5Csin%5Cphi%29%5Csin%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='y=(a+b\theta+R\sin\phi)\sin\theta' title='y=(a+b\theta+R\sin\phi)\sin\theta' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=z%3Dc%2Bd%5Ctheta%2BR%281-%5Ccos%5Cphi%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='z=c+d\theta+R(1-\cos\phi)' title='z=c+d\theta+R(1-\cos\phi)' class='latex' /></p>
<p><img src='http://s.wordpress.com/latex.php?latex=0%5Cle%5Ctheta%5Cle%202%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le\theta\le 2\pi' title='0\le\theta\le 2\pi' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=0%5Cle%5Cphi%5Cle%20%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le\phi\le \pi' title='0\le\phi\le \pi' class='latex' /></p>
<p>Here are some examples:</p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/shell1.png" alt="Shell Example 1" /></p>
<p>Increase the number of rotations of the spiral by increasing the upper limit of <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta' title='\theta' class='latex' /> and make the shape of the generating curve a circle instead of a semi-circle by changing the uppere limit of <img src='http://s.wordpress.com/latex.php?latex=%5Cphi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\phi' title='\phi' class='latex' /> from <img src='http://s.wordpress.com/latex.php?latex=%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\pi' title='\pi' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=2%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='2\pi' title='2\pi' class='latex' /> to get something like this:</p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/shell2.png" alt="Example Shell 2" /></p>
<p>You can now play around with ideas. for example you could let the radius of the generating curve change as the curve rotates, make it a linear growth with angle along the lines</p>
<p><img src='http://s.wordpress.com/latex.php?latex=R%5Cleft%28%5Ctheta%5Cright%29%3Df%5Cleft%281%2Bg%5Ctheta%5Cright%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='R\left(\theta\right)=f\left(1+g\theta\right)' title='R\left(\theta\right)=f\left(1+g\theta\right)' class='latex' /> where f and g are constants and f=R when <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta%7B%3D%7D%7B0%7D&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='\theta{=}{0}' title='\theta{=}{0}' class='latex' />. With this modification to R, The parametric equtions become</p>
<p><img src='http://s.wordpress.com/latex.php?latex=x%3D%28a%2Bb%5Ctheta%2BR%281%2Bg%5Ctheta%29%5Csin%5Cphi%29%5Ccos%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='x=(a+b\theta+R(1+g\theta)\sin\phi)\cos\theta' title='x=(a+b\theta+R(1+g\theta)\sin\phi)\cos\theta' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=y%3D%28a%2Bb%5Ctheta%2BR%281%2Bg%5Ctheta%29%5Csin%5Cphi%29%5Csin%5Ctheta&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='y=(a+b\theta+R(1+g\theta)\sin\phi)\sin\theta' title='y=(a+b\theta+R(1+g\theta)\sin\phi)\sin\theta' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=z%3Dc%2Bd%5Ctheta%2BR%281%2Bg%5Ctheta%29%281-%5Ccos%5Cphi%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='z=c+d\theta+R(1+g\theta)(1-\cos\phi)' title='z=c+d\theta+R(1+g\theta)(1-\cos\phi)' class='latex' /></p>
<p>and here&#8217;s an example of what you get</p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/fat.png" alt="Example Shell When R grows with Rotation angle" /></p>
<p>Instead of a semicircle for the generating curve, you could try an ellipse. In that situation you follow the same logic as before but this time you will find that the radius and z component get modified along the following lines:</p>
<p><img src='http://s.wordpress.com/latex.php?latex=r%5Cto%20r%2BR%5Csin%5Cleft%28%5Cphi%5Cright%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='r\to r+R\sin\left(\phi\right)' title='r\to r+R\sin\left(\phi\right)' class='latex' /><br />
<img src='http://s.wordpress.com/latex.php?latex=z%5Cto%20z%2B2R%5Cleft%281-%5Ccos%5Cphi%5Cright%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='z\to z+2R\left(1-\cos\phi\right)' title='z\to z+2R\left(1-\cos\phi\right)' class='latex' /></p>
<p>Here&#8217;s an example of a surface using the parametric equations modified for an ellipse instead of a semi-circle generating curve and using a range of <img src='http://s.wordpress.com/latex.php?latex=0%5Cle%5Cphi%5Cle%7B2%7D%5Cpi&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='0\le\phi\le{2}\pi' title='0\le\phi\le{2}\pi' class='latex' /></p>
<p><img src="http://www.riotstories.co.uk/wp-content/themes/child2011/images/ellipse.png" alt="Ellipse as the generating curve" /></p>
<p>Hopefully that gives you the general idea. The geometries covered in this article have been limited to spirals (which are very interesting in themselves and worth playing with) and circles, semi-circles and ellipses as the generating functions.</p>
<p>If you check out the examples I&#8217;ve used in this article you will notice that most of the shells generated have open tops. I think that&#8217;s because the generating curves I&#8217;ve used mostly had &#8220;R&#8221; = constant. When I used <img src='http://s.wordpress.com/latex.php?latex=R%5Cleft%28%5Ctheta%5Cright%29&#038;bg=0F0F0F&#038;fg=a4bba4&#038;s=0' alt='R\left(\theta\right)' title='R\left(\theta\right)' class='latex' /> the top of the shell seemed to close over. I plan on experimenting further with this.</p>
<p>In addition, an interesting experiment would be to use some sort of rendering software to apply a finish to the generated shells and see how lifelike they can be made. However, I don&#8217;t have any experience (and only moderate interest to be honest) in that sort of thing. Maybe someday <img src='http://www.riotstories.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Have fun.</p>
<div id="crp_related"><h3>Possibly Related Posts:</h3><div id=relposts><ul><li><a href="http://www.riotstories.co.uk/space/eyes-on-the-solar-system/" rel="bookmark" class="crp_title">Eyes on the Solar System</a></li><li><a href="http://www.riotstories.co.uk/wordpress/change-default-header-images-in-twenty-eleven-theme/" rel="bookmark" class="crp_title">Change Default Header Images in Twenty Eleven Theme</a></li><li><a href="http://www.riotstories.co.uk/wordpress/add-rss-subscription-icons-to-the-twenty-eleven-theme/" rel="bookmark" class="crp_title">Add RSS Subscription Icons to the Twenty Eleven Theme</a></li><li><a href="http://www.riotstories.co.uk/wordpress/add-author-biog-after-your-post/" rel="bookmark" class="crp_title">Add Author Biog After Your Post</a></li><li><a href="http://www.riotstories.co.uk/music/chord-sequences/" rel="bookmark" class="crp_title">Guitar Chord Sequences</a></li></ul></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/riotstories?a=u_B2sDj_Rcs:P3ZaAs8mMIk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/riotstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=u_B2sDj_Rcs:P3ZaAs8mMIk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/riotstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=u_B2sDj_Rcs:P3ZaAs8mMIk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/riotstories?i=u_B2sDj_Rcs:P3ZaAs8mMIk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=u_B2sDj_Rcs:P3ZaAs8mMIk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/riotstories?i=u_B2sDj_Rcs:P3ZaAs8mMIk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=u_B2sDj_Rcs:P3ZaAs8mMIk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/riotstories?i=u_B2sDj_Rcs:P3ZaAs8mMIk:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/riotstories/~4/u_B2sDj_Rcs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.riotstories.co.uk/science/seashells/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.riotstories.co.uk/science/seashells/</feedburner:origLink></item>
		<item>
		<title>404 Errors</title>
		<link>http://feedproxy.google.com/~r/riotstories/~3/f8mAQ0qtFdo/</link>
		<comments>http://www.riotstories.co.uk/wordpress/404-errors/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 20:32:56 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[HTTP 404]]></category>

		<guid isPermaLink="false">http://www.riotstories.co.uk/?p=972</guid>
		<description><![CDATA[I&#8217;ve been getting a lot of HTTP 404 errors recently &#8211; mainly from what apear to be search engine bots (they appear to be confirmed as bots via a reverse DNS lookup). these 404s seem to be coming from a &#8230; <a href="http://www.riotstories.co.uk/wordpress/404-errors/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been getting a lot of HTTP 404 errors recently &#8211; mainly from what apear to be search engine bots (they appear to be confirmed as bots via a reverse DNS lookup). these 404s seem to be coming from a series of attempts to crawl old pages that don&#8217;t exist on the site any longer. I&#8217;ve set up 301 redirects to address the specific instances that have cropped up so far &#8211; appraently this could have negative consequences from a SEO point of view though I don&#8217;t understand the details of the argument (the whole SEO malarky seems a bit like black magic and some smoke and mirrors thrown in). I&#8217;ll keep monitoring.</p>
<p>Another class of HTTP 404 errors seems fundamentally different in nature &#8211; they look like attempts to connect directly to plugins that have known vulnerabilities or attempts to connect direct to some of the important files on the site. I&#8217;ve taken different action on those and will continue to monitor carefully. An interesting learning opportunity those!</p>
<div id="crp_related"><h3>Possibly Related Posts:</h3><div id=relposts><ul><li><a href="http://www.riotstories.co.uk/wordpress/how-to-add-a-favicon/" rel="bookmark" class="crp_title">How to add a favicon</a></li><li><a href="http://www.riotstories.co.uk/wordpress/custom-page-title/" rel="bookmark" class="crp_title">Custom Page Title</a></li><li><a href="http://www.riotstories.co.uk/wordpress/replace-small-plugins-with-code/" rel="bookmark" class="crp_title">Replace unnecessary plugins with code</a></li><li><a href="http://www.riotstories.co.uk/web-development/using-wamp-server/" rel="bookmark" class="crp_title">Using WAMP Server on Windows</a></li><li><a href="http://www.riotstories.co.uk/web-development/edit-hosts-file-in-vista/" rel="bookmark" class="crp_title">Edit the .hosts file in Vista</a></li></ul></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/riotstories?a=f8mAQ0qtFdo:EAV5P5CEFGc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/riotstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=f8mAQ0qtFdo:EAV5P5CEFGc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/riotstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=f8mAQ0qtFdo:EAV5P5CEFGc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/riotstories?i=f8mAQ0qtFdo:EAV5P5CEFGc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=f8mAQ0qtFdo:EAV5P5CEFGc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/riotstories?i=f8mAQ0qtFdo:EAV5P5CEFGc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=f8mAQ0qtFdo:EAV5P5CEFGc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/riotstories?i=f8mAQ0qtFdo:EAV5P5CEFGc:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/riotstories/~4/f8mAQ0qtFdo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.riotstories.co.uk/wordpress/404-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.riotstories.co.uk/wordpress/404-errors/</feedburner:origLink></item>
		<item>
		<title>ERROR: PHP Not Running</title>
		<link>http://feedproxy.google.com/~r/riotstories/~3/VsKEm8sweYE/</link>
		<comments>http://www.riotstories.co.uk/web-development/error-php-not-running/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 15:47:33 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Local Dev Environment]]></category>
		<category><![CDATA[PHP Not Running]]></category>
		<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://www.riotstories.co.uk/?p=943</guid>
		<description><![CDATA[What I did to resolve the PHP NOT RUNNING error when re-installing WAMP.  <a href="http://www.riotstories.co.uk/web-development/error-php-not-running/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I decided to tidy things up a little bit and update my local dev environment by upgrading my WAMP installation to the current version (upgrading MySQL,Apache and PHP along the way).</p>
<p>Ever wish you didn&#8217;t bother ?</p>
<p>What a performance. The WAMP stuff looked OK until I actually tried using it! Initially I ended up with a #1045 error on the root user when trying to use phpMyAdmin. Trying to sort that was a joke and a compelte waste of time. Thankfully it was my dev environment so I could easily trash the database and completely uninstal WAMP from the PC (registry, files, database the lot) followed by a quick re-instal of everything including creating a new dev database.</p>
<p>phpMyAdmin worked fine after that carry on &#8211; i.e. back to where I was an hour earlier!!</p>
<p>Now I had to re-install WordPress for my local development purposes and immediately encountered the &#8220;ERROR: PHP IS NOT RUNNING&#8221;. What!!!???? Yes it is! No matter what path direction I have I just couldn&#8217;t get WP to instal. I then had the idea of creating a virtual host for the site in the Apache httpd.conf file. This worked a treat and I installed and configured WordPress locally with a nice new version, copied allmy plugins, configured things the way I&#8217;ve got them on live and it&#8217;s looking good.</p>
<p>Only remaining problem I have is none of the pages in the menu or imported posts work on the local instal &#8211; I probably didn&#8217;t do something correctly related to &#8220;moving wordpress&#8221;. Permalinks are the same structure in my local dev environment as on the live box. I&#8217;ll worry about that later.</p>
<p>All in all this has been a major PITA and a lot of wasted time and effort.</p>
<div id="crp_related"><h3>Possibly Related Posts:</h3><div id=relposts><ul><li><a href="http://www.riotstories.co.uk/web-development/using-wamp-server/" rel="bookmark" class="crp_title">Using WAMP Server on Windows</a></li><li><a href="http://www.riotstories.co.uk/web-development/edit-hosts-file-in-vista/" rel="bookmark" class="crp_title">Edit the .hosts file in Vista</a></li><li><a href="http://www.riotstories.co.uk/wordpress/add-author-biog-after-your-post/" rel="bookmark" class="crp_title">Add Author Biog After Your Post</a></li><li><a href="http://www.riotstories.co.uk/wordpress/change-default-footer-text-in-twenty-eleven-theme/" rel="bookmark" class="crp_title">Change Default Footer Text in Twenty Eleven Theme</a></li><li><a href="http://www.riotstories.co.uk/graphics/data-driven-graphics-in-fireworks-cs4/" rel="bookmark" class="crp_title">Data Driven Graphics in Fireworks CS4</a></li></ul></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/riotstories?a=VsKEm8sweYE:rc9thYX7L8A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/riotstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=VsKEm8sweYE:rc9thYX7L8A:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/riotstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=VsKEm8sweYE:rc9thYX7L8A:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/riotstories?i=VsKEm8sweYE:rc9thYX7L8A:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=VsKEm8sweYE:rc9thYX7L8A:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/riotstories?i=VsKEm8sweYE:rc9thYX7L8A:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=VsKEm8sweYE:rc9thYX7L8A:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/riotstories?i=VsKEm8sweYE:rc9thYX7L8A:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/riotstories/~4/VsKEm8sweYE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.riotstories.co.uk/web-development/error-php-not-running/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.riotstories.co.uk/web-development/error-php-not-running/</feedburner:origLink></item>
		<item>
		<title>Favourite Movies</title>
		<link>http://feedproxy.google.com/~r/riotstories/~3/I7iXsZ6jS_8/</link>
		<comments>http://www.riotstories.co.uk/chitchat/favourite-movies/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 18:41:47 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Chit Chat]]></category>
		<category><![CDATA[Movies]]></category>

		<guid isPermaLink="false">http://www.riotstories.co.uk/?p=925</guid>
		<description><![CDATA[A list of my favourite movies - in no particular order (except the first one) <a href="http://www.riotstories.co.uk/chitchat/favourite-movies/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just thought I&#8217;d jot these down &#8211; for no particular reason <img src='http://www.riotstories.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<ol>
<li>Lost in Translation</li>
<li>Bladerunner</li>
<li>As Good As It Gets</li>
<li>Cast Away</li>
<li>It&#8217;s a Wonderful Life</li>
<li>Gorky Park</li>
</ol>
<div id="crp_related"><h3>Possibly Related Posts:</h3><div id=relposts><ul><li><a href="http://www.riotstories.co.uk/science/seashells/" rel="bookmark" class="crp_title">Modelling Seashells</a></li><li><a href="http://www.riotstories.co.uk/web-development/error-php-not-running/" rel="bookmark" class="crp_title">ERROR: PHP Not Running</a></li><li><a href="http://www.riotstories.co.uk/wordpress/css-hierarchy-in-twenty-eleven-theme/" rel="bookmark" class="crp_title">Note on CSS Hierarchy in Twenty Eleven Theme</a></li><li><a href="http://www.riotstories.co.uk/wordpress/custom-page-title/" rel="bookmark" class="crp_title">Custom Page Title</a></li><li><a href="http://www.riotstories.co.uk/web-development/using-wamp-server/" rel="bookmark" class="crp_title">Using WAMP Server on Windows</a></li></ul></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/riotstories?a=I7iXsZ6jS_8:WBcHPJ5JF5E:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/riotstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=I7iXsZ6jS_8:WBcHPJ5JF5E:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/riotstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=I7iXsZ6jS_8:WBcHPJ5JF5E:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/riotstories?i=I7iXsZ6jS_8:WBcHPJ5JF5E:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=I7iXsZ6jS_8:WBcHPJ5JF5E:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/riotstories?i=I7iXsZ6jS_8:WBcHPJ5JF5E:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=I7iXsZ6jS_8:WBcHPJ5JF5E:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/riotstories?i=I7iXsZ6jS_8:WBcHPJ5JF5E:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/riotstories/~4/I7iXsZ6jS_8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.riotstories.co.uk/chitchat/favourite-movies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.riotstories.co.uk/chitchat/favourite-movies/</feedburner:origLink></item>
		<item>
		<title>Add Author Biog After Your Post</title>
		<link>http://feedproxy.google.com/~r/riotstories/~3/ckXzfPHgXJs/</link>
		<comments>http://www.riotstories.co.uk/wordpress/add-author-biog-after-your-post/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 16:22:43 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Author Biog]]></category>

		<guid isPermaLink="false">http://www.riotstories.co.uk/?p=915</guid>
		<description><![CDATA[Add an author biog box after your post, positioned and styled to suit your own needs. <a href="http://www.riotstories.co.uk/wordpress/add-author-biog-after-your-post/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To add an author biog box after your post you will need to add some new structure into the single.php file and some CSS into your style.css file. Throughout what&#8217;s written here I&#8217;ll assume you&#8217;re using a child theme and using the Twenty Eleven theme for your WordPress site. If you&#8217;re using a different WordPress theme the main things will be the same but you will probably have to tweak the CSS a little &#8211; particularly around any element that has &#8220;float&#8221; or &#8220;clear&#8221; applied and you might also have to use or exclude &#8220;!important&#8221; declarations on elements. The best approach is just use this as is, see how it fits with your theme then start making changes 1 at a time until you get what you&#8217;re after.</p>
<p>Here goes:</p>
<h2>Adjust your &#8220;single.php&#8221; file</h2>
<p>1. Download your single.php file from the default twentyeleven theme folder on your server to make edits locally</br><br />
2. If you&#8217;re running a web server on your local PC with a WordPress instal you will be able to test your changes locally and just upload to your live server at the end when you&#8217;re finished (e.g. WAMP)</br><br />
3. Open your downloaded single.php file and add the following code snippet:</br></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php get_template_part( 'content', 'single' ); ?&gt; // *** Original code in the template as a position marker ***

&lt;!-- ****************************** --&gt;
     &lt;div id=&quot;authorbox&quot;&gt; &lt;!--author box added by me--&gt;
          &lt;div class=&quot;authortext&quot;&gt;
               &lt;?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_email(), '80' ); }?&gt;
               &lt;h4&gt;About &lt;?php the_author_posts_link(); ?&gt;&lt;/h4&gt;
               &lt;p&gt;&lt;?php the_author_description(); ?&gt;&lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
&lt;!-- ****************************** --&gt;	                    

&lt;?php comments_template( '', true ); ?&gt;           // *** Original code in the template as a position marker ***
</pre>
<p></br><br />
4. Test this code insertion to make sure it&#8217;s appearing in a location on your page that you&#8217;re happy with. don&#8217;t worry about how it looks, you&#8217;ll be styling the content next. the mission for now is to make sure it appears in a place you&#8217;re happy with. When I did this I was using the default Twenty Eleven theme so the location above is relevant for that template. I placed my code after the &#8220;get_template_part&#8221; and before the &#8220;comments_template&#8221; tag. You can change the location to suit your own needs but most templates are similar at this level.</br></p>
<h2>Style your new author biog box</h2>
<p>5. Now that you have the author biog box where you want it it&#8217;s time to add some style to it. You can make this as simple or elaborate as you want to.</br><br />
6. Add the following CSS rules to your theme stylesheet (if you&#8217;re using a child theme this will be the stylesheet in your child theme folder):</br></p>
<pre class="brush: css; title: ; notranslate">
/*Style author box*/
#authorbox {background:#fcf8d7; border:1px solid #e2dede; max-width:620px; margin:0 auto; margin-bottom:20px; overflow:hidden; padding:10px;}
#authorbox h4 {font-size:16px; color:#FFF; margin:0; padding:0; clear:inherit !important;}
.authortext {padding-left:10px;}
#authorbox img {margin-right:10px; padding:0; float:left; border:5px solid #e2dede;}
#authorbox p {color: #FFF; margin:0; padding:0px; font-size:12px;}
#authorbox h4 &gt; a {text-decoration:none; color: #FFF;}
#authorbox a {font-weight:bold;}
#authorbox {-moz-border-radius: 9px; border-radius: 9px;}
#authorbox {background: #03f;	background: -moz-linear-gradient( #03F, #036);	background: -o-linear-gradient(#0f0f0f, #2B2B2B); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#0f0f0f), to(#2B2B2B)); /* Older webkit syntax */ background: -webkit-linear-gradient(#0f0f0f, #2B2B2B);}
div.authortext p a {color: #FF3;}
</pre>
<p></br><br />
7. I mentioned in the intro that some of the CSS styling might have to change depending on the theme you&#8217;re using. On line 3 of the CSS snippet you will see a &#8220;clear&#8221; instruction. that&#8217;s one that is likely to need modification in your theme. I had to use it because of previous styling rules applied to the h4 tag in the Twenty Eleven theme (so I had to adjust those rules for this specific addition while leaving them in tact for the rest of the site). There might be similar little quirks in the theme you&#8217;re using. Just play around with the CSS to get what you want. I&#8217;ve used &#8220;max-width&#8221; to get a nice width on the biog box when the browser window is full size, when the browser window is reduced the biog box shrinks dynamically. This setting looks OK on iphones, ipads, tablets etc.</br><br />
8. Change the colours, border radius, link colours etc to suite your needs. Strip the CSS right back to have a basic minimalist author box or make it quite elaborate with background images etc.</br><br />
9. That&#8217;s it. You should now have an author biog box appearing after each post on your site in a location of your choice looking the way you want it to look.</br><br />
<strong>Notes:</strong></p>
<ul>
<li>The code used here assumes the post author has a gravitar set up and that they have completed the user biog section in their user setup with something sensible. If they haven&#8217;t this will be a bit of a waste of time</li>
<li>You could replace the php &#8220;get_avatar&#8221; call with a simple image insert if you only have 1 author for your site and you don&#8217;t want to set up a gravatar</li>
<li>The biog box will only appear at the end of the full post &#8211; not in excerpts or in the post preview (on the front page if you&#8217;re using the Twenty eleven theme). that&#8217;s because you added the code to the single.php template file. You could experiment with other files/locations if you wanted the information to display on other pages etc</li>
<li>You can see the results of this in action if you open any of the posts on this site.</li>
<li>You might find this a bit of overkill and repetition if you are the only poster on your site. I&#8217;d probably agree with that. I use this site to experiment with WordPress and learn how it works so I&#8217;m less concerned with that sort of consideration and more interested in how to achieve a particular result. If you&#8217;re running some sort of commercial site or more professional blog then you might be right in thinking twice about implementing this sort of thing.</li>
</ul>
<p></br><br />
<strong>NOTE:</strong> In the Twenty eleven theme there&#8217;s already an author block included when a post is made in a multi-user site and the author has entered their biog data. You will find the code for this in the Twenty eleven theme file &#8220;content.single.php&#8221;. the div involved is &#8220;author-info&#8221; and there are vaious classesand default styling rules in the default style.css file. Instead of adding new HTML etc to your single.php file as I&#8217;ve done in this post you could just re-style the default div. (I found this out after having done the work because this feature didn&#8217;t appear correctly &#8211; mainly I suspect because only a single publishing author had been sued in my blog until I made a mistake and published using a different user).</p>
<div id="crp_related"><h3>Possibly Related Posts:</h3><div id=relposts><ul><li><a href="http://www.riotstories.co.uk/wordpress/add-rss-subscription-icons-to-the-twenty-eleven-theme/" rel="bookmark" class="crp_title">Add RSS Subscription Icons to the Twenty Eleven Theme</a></li><li><a href="http://www.riotstories.co.uk/wordpress/css-hierarchy-in-twenty-eleven-theme/" rel="bookmark" class="crp_title">Note on CSS Hierarchy in Twenty Eleven Theme</a></li><li><a href="http://www.riotstories.co.uk/wordpress/change-default-footer-text-in-twenty-eleven-theme/" rel="bookmark" class="crp_title">Change Default Footer Text in Twenty Eleven Theme</a></li><li><a href="http://www.riotstories.co.uk/wordpress/twenty-eleven-headings-using-font-face/" rel="bookmark" class="crp_title">Change Twenty Eleven Header Styles Using @font-face</a></li><li><a href="http://www.riotstories.co.uk/wordpress/custom-page-title/" rel="bookmark" class="crp_title">Custom Page Title</a></li></ul></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/riotstories?a=ckXzfPHgXJs:s960gWlUDJk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/riotstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=ckXzfPHgXJs:s960gWlUDJk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/riotstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=ckXzfPHgXJs:s960gWlUDJk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/riotstories?i=ckXzfPHgXJs:s960gWlUDJk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=ckXzfPHgXJs:s960gWlUDJk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/riotstories?i=ckXzfPHgXJs:s960gWlUDJk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=ckXzfPHgXJs:s960gWlUDJk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/riotstories?i=ckXzfPHgXJs:s960gWlUDJk:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/riotstories/~4/ckXzfPHgXJs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.riotstories.co.uk/wordpress/add-author-biog-after-your-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.riotstories.co.uk/wordpress/add-author-biog-after-your-post/</feedburner:origLink></item>
		<item>
		<title>Change Default Header Images in Twenty Eleven Theme</title>
		<link>http://feedproxy.google.com/~r/riotstories/~3/EUoQoMwNEYc/</link>
		<comments>http://www.riotstories.co.uk/wordpress/change-default-header-images-in-twenty-eleven-theme/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 22:23:09 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Header Images]]></category>
		<category><![CDATA[Twenty Eleven Theme]]></category>

		<guid isPermaLink="false">http://www.riotstories.co.uk/?p=888</guid>
		<description><![CDATA[This is a summary of the procedure to change the default headers in the Twenty Eleven Wordpress theme with images of your own. <a href="http://www.riotstories.co.uk/wordpress/change-default-header-images-in-twenty-eleven-theme/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This post describes how to change the default headers in the Twenty Eleven theme and replace them with images of your choice. Throughout this post it is assumed that you&#8217;re working with a child theme &#8211; if not you may have to adjust some paths but the general procedure is the same. I have retained the original sizing of the Twenty Eleven images, namely: 1000 x 288px for the header images and 230 x 66px for the thumbnails. There are essentially 3 steps to switching out the default headers and replacing them with your own:</p>
<p>1. Create your own header images and thumbnails<br />
2. Remove the default header images<br />
3. Add your own header images</p>
<h2>Step 1 &#8211; Create Your Own Images</h2>
<p>1. All the usual caveats apply here regarding copyright on images you plan to use &#8211; make sure you either have it or have permission to use the images</br><br />
2. Create a new image or resize an existing image to dimensions 1000 x 288px for the main header image</br><br />
3. Using the image in step 2 above resize it to 230 x 66px for use as the thumbnail</br><br />
4. Repeate steps 2 and 3 for the images you want to use as header images in your theme</br></p>
<p>This might take you a while depending on how many images you want to use, how complex you want to make them and how accomplished you are with your graphics program of choice (Photoshop etc). Once you&#8217;ve finished that side of it the rest is pretty quick as follows</br></p>
<h2>Step 2 &#8211; Remove the Default Header Images</h2>
<p>5. Out of the box the Twenty Eleven theme comes configured with 8 images named:</br><br />
&#8216;wheel&#8217;,'shore&#8217;,'trolley&#8217;,'pine-cone&#8217;,'chessboard&#8217;,'lanterns&#8217;,'willow&#8217;and &#8216;hanoi&#8217;.</br><br />
 You need to remove any of these that you don&#8217;t want. You can remove all of them or a subset. To do this add the following code snippet to your functions.php file in your child theme:<br />
</br></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
// REMOVE TWENTY ELEVEN DEFAULT HEADER IMAGES
function remove_header_images() {
    unregister_default_headers( array('wheel','shore','trolley','pine-cone','chessboard','lanterns','willow','hanoi')
    );
}
add_action( 'after_setup_theme', 'remove_header_images', 11 );
?&gt;
</pre>
<p></br><br />
In this code I&#8217;ve chosen to remove all of the default headers for completeness. If you wanted to retain some of them you you would just omit the file names of those you wanted to keep from the &#8220;unregister_default_headers&#8221; line.</br><br />
I&#8217;ve called the function that does this work &#8220;remove_header_images&#8221; because that&#8217;s a reasonable description of what it does but you can call it anything you want. Just make sure that the name you give the function also appears in the &#8220;add_action&#8221; instruction at the end.</br><br />
The parameter &#8220;11&#8243; is worth noting. That sets the runtime priority of the action we&#8217;ve set up to remove the headers. The default priority is 10 so having a priority of 11 means runs <strong>after</strong> the default activities, ensuring that we allow the default header images to register and load <strong>before</strong> we try and remove them.</p>
<h2>Step 3 &#8211; Add Your Own Header Images</h2>
<p>6. Now that you&#8217;ve removed the default header images you can add your own. In your child theme folder create a folder to hold your images. I created a folder called &#8220;images&#8221; and use it to hold all the images for my child theme. You don&#8217;t have to do that, you can create as many folders in your child theme as you want and you can call them what you want it doesn&#8217;t matter, just make sure that in what follows the image paths point to the folder <strong>you</strong> choose to hold your header images.</br></p>
<p>7.Drop the header and thumbnail images you created way back in step 1 into the folder you created in step 7 above.</br><br />
You should have a pair of images for every header image: 1 header + 1 thumbnail.</br><br />
A quick note on image file naming conventions. I chose to adopt the following naming convention for my images:</p>
<p>headerimage_filename for the main header image and </br><br />
headerimage_filename-thumbnail for the thumbnail image that appears in the setup panel </br></p>
<p>e.g. &#8220;aceofspades.jpg&#8221; for the main header image and &#8220;aceofspades-thumbnail.jpg&#8221; for the thumbnail.</br><br />
That just made it easy for me to remember what was what. You of course, can choose your own approach or just follow mine.</p>
<p>8. With your images all in place add the following code snippet into your functions.php file:<br />
</br></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
//ADD NEW DEFAULT HEADER IMAGES
function new_header_images() {
    $child2011 = get_bloginfo('stylesheet_directory');
	define( 'HEADER_IMAGE', '/wp-content/themes/child2011/images/aceofspades.jpg' );
    register_default_headers( array (
        'image1' =&gt; array (
            'url' =&gt; &quot;$child2011/images/aceofspades.jpg&quot;, // 1000 x 288px
            'thumbnail_url' =&gt; &quot;$child2011/images/aceofspades-thumbnail.jpg&quot;, // 230 x 66px
            'description' =&gt; __( 'Ace of Spades', 'child2011' )
        ), // note the comma when using multiple images, you don't need this for the last image
        'image2' =&gt; array (
            'url' =&gt; &quot;$child2011/images/band.jpg&quot;,
            'thumbnail_url' =&gt; &quot;$child2011/images/band-thumbnail.jpg&quot;,
            'description' =&gt; __( 'Rock Band', 'child2011' )
        ),
        'image3' =&gt; array (
            'url' =&gt; &quot;$child2011/images/batman.jpg&quot;,
            'thumbnail_url' =&gt; &quot;$child2011/images/batman-thumbnail.jpg&quot;,
            'description' =&gt; __( 'Batman', 'child2011' )
        ),
        'image4' =&gt; array (
            'url' =&gt; &quot;$child2011/images/beetleonflower.jpg&quot;,
            'thumbnail_url' =&gt; &quot;$child2011/images/beetleonflower-thumbnail.jpg&quot;,
            'description' =&gt; __( 'Ladybird on Flower', 'child2011' )
        ),
        'image5' =&gt; array (
            'url' =&gt; &quot;$child2011/images/darkangel.jpg&quot;,
            'thumbnail_url' =&gt; &quot;$child2011/images/darkangel-thumbnail.jpg&quot;,
            'description' =&gt; __( 'Dark Angel', 'child2011' )
        ),
        'image6' =&gt; array (
            'url' =&gt; &quot;$child2011/images/earth.jpg&quot;,
            'thumbnail_url' =&gt; &quot;$child2011/images/earth-thumbnail.jpg&quot;,
            'description' =&gt; __( 'Home Sweet Home', 'child2011' )
        ),
        'image7' =&gt; array (
            'url' =&gt; &quot;$child2011/images/eilidh.jpg&quot;,
            'thumbnail_url' =&gt; &quot;$child2011/images/eilidh-thumbnail.jpg&quot;,
            'description' =&gt; __( 'Eilidh', 'child2011' )
        ),
        'image8' =&gt; array (
            'url' =&gt; &quot;$child2011/images/einstein.jpg&quot;,
            'thumbnail_url' =&gt; &quot;$child2011/images/einstein-thumbnail.jpg&quot;,
            'description' =&gt; __( 'Albert Einstein', 'child2011' )
        ),
        'image9' =&gt; array (
            'url' =&gt; &quot;$child2011/images/figureonglass.jpg&quot;,
            'thumbnail_url' =&gt; &quot;$child2011/images/figureonglass-thumbnail.jpg&quot;,
            'description' =&gt; __( 'Figure', 'child2011' )
        ),
        'image10' =&gt; array (
            'url' =&gt; &quot;$child2011/images/flowers.jpg&quot;,
            'thumbnail_url' =&gt; &quot;$child2011/images/flowers-thumbnail.jpg&quot;,
            'description' =&gt; __( 'Yellow Flowers', 'child2011' )
        ),
        'image11' =&gt; array (
            'url' =&gt; &quot;$child2011/images/kites.jpg&quot;,
            'thumbnail_url' =&gt; &quot;$child2011/images/kites-thumbnail.jpg&quot;,
            'description' =&gt; __( 'Passing Years', 'child2011' )
        ),
        'image12' =&gt; array (
            'url' =&gt; &quot;$child2011/images/musicfreak.jpg&quot;,
            'thumbnail_url' =&gt; &quot;$child2011/images/musicfreak-thumbnail.jpg&quot;,
            'description' =&gt; __( 'Music', 'child2011' )
        ),
        'image13' =&gt; array (
            'url' =&gt; &quot;$child2011/images/redrain.jpg&quot;,
            'thumbnail_url' =&gt; &quot;$child2011/images/redrain-thumbnail.jpg&quot;,
            'description' =&gt; __( 'Red Raindrops', 'child2011' )
        ),
        'image14' =&gt; array (
            'url' =&gt; &quot;$child2011/images/unionflag.jpg&quot;,
            'thumbnail_url' =&gt; &quot;$child2011/images/unionflag-thumbnail.jpg&quot;,
            'description' =&gt; __( 'Union Flag', 'child2011' )
        ) // the last image does not get a comma
    ));
}
add_action( 'after_setup_theme', 'new_header_images' );
?&gt;
</pre>
<p><strong>Notes:</strong><br />
(a) The function to add the new header images is called &#8220;new_header_images&#8221;. You can change this if you want though it&#8217;s a reasonable description of what it does. If you do change it, make sure you change the name in line 79 too.</br></p>
<p>(b) The variable $child2011 in line 4 is just a holder for the path information of your child theme. You can call it anything you want but if you change it make sure you also change it in the image paths from line 8 onwards. If you miss 1 of these you will spot it quickly enough because the relevant image/thumbnail wont appear.</br></p>
<p>(c) All image/thumbnail code blocks are separated by a comma <strong>except</strong> the last code block where there is no comma (see comments in the code snippet). This is important.</br></p>
<p>(d) The code in line 5 defines the default header image to be used if no other header image is set &#8211; courtesy of <a href="http://www.voodoopress.com" target="_blank">http://www.voodoopress.com</a></p>
<p>9. That&#8217;s it, you have now replaced the default Twenty Eleven theme header images with your own handmade images (including thumbnails). Here&#8217;s a snapshot of what my configuration panel looked like when I had finished:</p>
<p><a href="http://www.riotstories.co.uk/wp-content/uploads/2011/12/customheaderimages.png"><img src="http://www.riotstories.co.uk/wp-content/uploads/2011/12/customheaderimages.png" alt="Custom header images and thumbnails added to Twenty eleven WordPress theme" title="customheaderimages" width="800" height="455" class="alignleft size-full wp-image-890" /></a></p>
<p></br><br />
If you&#8217;re interested in changing the sizes of the header images there&#8217;s a great tutorial over on <a href="http://www.voodoopress.com" title="Voodoopress.com is a great site covering useful WordPress tweaks, tips and tutorials especially around Twenty eleven theme customisation" target="_blank">http://www.voodoopress.com</a><br />
</br><br />
Check out this post: <a href="http://voodoopress.com/customizing-twentyeleven-lets-start-with-width-and-smaller-header/" title="Changing twenty eleven header size" target="_blank">http://voodoopress.com/customizing-twentyeleven-lets-start-with-width-and-smaller-header/ </a></p>
<div id="crp_related"><h3>Possibly Related Posts:</h3><div id=relposts><ul><li><a href="http://www.riotstories.co.uk/wordpress/add-rss-subscription-icons-to-the-twenty-eleven-theme/" rel="bookmark" class="crp_title">Add RSS Subscription Icons to the Twenty Eleven Theme</a></li><li><a href="http://www.riotstories.co.uk/wordpress/group-posts-by-category/" rel="bookmark" class="crp_title">Twenty Eleven Theme: Group recent posts by category</a></li><li><a href="http://www.riotstories.co.uk/wordpress/add-a-custom-image-to-your-rss-feed/" rel="bookmark" class="crp_title">Add a Custom Image to Your RSS Feed</a></li><li><a href="http://www.riotstories.co.uk/wordpress/change-default-footer-text-in-twenty-eleven-theme/" rel="bookmark" class="crp_title">Change Default Footer Text in Twenty Eleven Theme</a></li><li><a href="http://www.riotstories.co.uk/wordpress/custom-page-title/" rel="bookmark" class="crp_title">Custom Page Title</a></li></ul></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/riotstories?a=EUoQoMwNEYc:aduKbXqNU3U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/riotstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=EUoQoMwNEYc:aduKbXqNU3U:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/riotstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=EUoQoMwNEYc:aduKbXqNU3U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/riotstories?i=EUoQoMwNEYc:aduKbXqNU3U:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=EUoQoMwNEYc:aduKbXqNU3U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/riotstories?i=EUoQoMwNEYc:aduKbXqNU3U:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=EUoQoMwNEYc:aduKbXqNU3U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/riotstories?i=EUoQoMwNEYc:aduKbXqNU3U:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/riotstories/~4/EUoQoMwNEYc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.riotstories.co.uk/wordpress/change-default-header-images-in-twenty-eleven-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.riotstories.co.uk/wordpress/change-default-header-images-in-twenty-eleven-theme/</feedburner:origLink></item>
		<item>
		<title>Useful Entries for Your Functions.php File</title>
		<link>http://feedproxy.google.com/~r/riotstories/~3/fPltS173qhc/</link>
		<comments>http://www.riotstories.co.uk/wordpress/useful-entries-for-your-functions-php-file/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 22:09:44 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[functions.php]]></category>

		<guid isPermaLink="false">http://www.riotstories.co.uk/?p=886</guid>
		<description><![CDATA[Excellent tips and code snippets for the functions.php file <a href="http://www.riotstories.co.uk/wordpress/useful-entries-for-your-functions-php-file/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This page on <a href="http://www.wpbeginner.com" title="Excellent WP Tips">http://www.wpbeginner.com</a> gives some very useful code snippets to add to your functions.php file:</p>
<p><a href="http://www.wpbeginner.com/wp-tutorials/25-extremely-useful-tricks-for-the-wordpress-functions-file/" title="useful code snippets for functions.php">http://www.wpbeginner.com/wp-tutorials/25-extremely-useful-tricks-for-the-wordpress-functions-file/</a></p>
<div id="crp_related"><h3>Possibly Related Posts:</h3><div id=relposts><ul><li><a href="http://www.riotstories.co.uk/wordpress/add-a-custom-image-to-your-rss-feed/" rel="bookmark" class="crp_title">Add a Custom Image to Your RSS Feed</a></li><li><a href="http://www.riotstories.co.uk/wordpress/add-custom-content-to-your-rss-feed/" rel="bookmark" class="crp_title">Add Custom Content to Your RSS Feed</a></li><li><a href="http://www.riotstories.co.uk/wordpress/replace-small-plugins-with-code/" rel="bookmark" class="crp_title">Replace unnecessary plugins with code</a></li><li><a href="http://www.riotstories.co.uk/wordpress/change-default-header-images-in-twenty-eleven-theme/" rel="bookmark" class="crp_title">Change Default Header Images in Twenty Eleven Theme</a></li><li><a href="http://www.riotstories.co.uk/wordpress/custom-page-title/" rel="bookmark" class="crp_title">Custom Page Title</a></li></ul></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/riotstories?a=fPltS173qhc:5OTi_frEOws:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/riotstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=fPltS173qhc:5OTi_frEOws:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/riotstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=fPltS173qhc:5OTi_frEOws:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/riotstories?i=fPltS173qhc:5OTi_frEOws:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=fPltS173qhc:5OTi_frEOws:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/riotstories?i=fPltS173qhc:5OTi_frEOws:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=fPltS173qhc:5OTi_frEOws:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/riotstories?i=fPltS173qhc:5OTi_frEOws:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/riotstories/~4/fPltS173qhc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.riotstories.co.uk/wordpress/useful-entries-for-your-functions-php-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.riotstories.co.uk/wordpress/useful-entries-for-your-functions-php-file/</feedburner:origLink></item>
		<item>
		<title>Little Dragon</title>
		<link>http://feedproxy.google.com/~r/riotstories/~3/g_JZ7bCWFzA/</link>
		<comments>http://www.riotstories.co.uk/music/little-dragon/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 21:22:37 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Little Dragon]]></category>
		<category><![CDATA[Ritual Union]]></category>

		<guid isPermaLink="false">http://www.riotstories.co.uk/?p=881</guid>
		<description><![CDATA[Little Dragon - "Ritual Union" album, well worth getting <a href="http://www.riotstories.co.uk/music/little-dragon/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just got the album &#8220;Ritual Union&#8221; from <a href="http://little-dragon.net/" title="Little Dragon" target="_blank">Little Dragon</a>.</p>
<p>Excellent!</p>
<p><span style="text-align:center; display: block;"><a href="http://www.riotstories.co.uk/music/little-dragon/"><img src="http://img.youtube.com/vi/dD65vfuNhI8/2.jpg" alt="" /></a></span></br></p>
<div id="crp_related"><h3>Possibly Related Posts:</h3><div id=relposts><ul><li><a href="http://www.riotstories.co.uk/dartmoor/just-below-grimspound/" rel="bookmark" class="crp_title">Just Below Grimspound</a></li><li><a href="http://www.riotstories.co.uk/dartmoor/clapper-bridge-in-postbridge/" rel="bookmark" class="crp_title">Clapper Bridge in Postbridge</a></li><li><a href="http://www.riotstories.co.uk/dartmoor/driving-to-grimspound/" rel="bookmark" class="crp_title">Driving to Grimspound</a></li><li><a href="http://www.riotstories.co.uk/dartmoor/driving-from-widecombe/" rel="bookmark" class="crp_title">Driving from Widecombe</a></li><li><a href="http://www.riotstories.co.uk/wordpress/replace-small-plugins-with-code/" rel="bookmark" class="crp_title">Replace unnecessary plugins with code</a></li></ul></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/riotstories?a=g_JZ7bCWFzA:F_XB2l4M8cM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/riotstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=g_JZ7bCWFzA:F_XB2l4M8cM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/riotstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=g_JZ7bCWFzA:F_XB2l4M8cM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/riotstories?i=g_JZ7bCWFzA:F_XB2l4M8cM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=g_JZ7bCWFzA:F_XB2l4M8cM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/riotstories?i=g_JZ7bCWFzA:F_XB2l4M8cM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=g_JZ7bCWFzA:F_XB2l4M8cM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/riotstories?i=g_JZ7bCWFzA:F_XB2l4M8cM:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/riotstories/~4/g_JZ7bCWFzA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.riotstories.co.uk/music/little-dragon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.riotstories.co.uk/music/little-dragon/</feedburner:origLink></item>
		<item>
		<title>Add Custom Content to Your RSS Feed</title>
		<link>http://feedproxy.google.com/~r/riotstories/~3/ngSxb37C0-A/</link>
		<comments>http://www.riotstories.co.uk/wordpress/add-custom-content-to-your-rss-feed/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 15:39:08 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Custom Content]]></category>
		<category><![CDATA[RSS]]></category>

		<guid isPermaLink="false">http://www.riotstories.co.uk/?p=869</guid>
		<description><![CDATA[Add custom content to your Wordpress feeds - before the main feed content, after the main feed content  or both before and after the main feed content. <a href="http://www.riotstories.co.uk/wordpress/add-custom-content-to-your-rss-feed/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You can add custom content to your RSS feed. The custom content can be anything – text, markup, or even scripts. You can display the content before or after your post content, or in both places if required. A typical example of how this capability could be used is to include the addition of a copyright notice in the feed footer and advertisements before and/or after each feed item. There are lots of possibilities.</p>
<h2>1. Add Content After The Feed Entry</h2>
<p>To add some custom content to the end of your own feed, add the following code snippet to the functions.php file of your active theme:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
//Add Custom Content to End of Feed
function insertEndContent($content) {
$content = $content . '&lt;p&gt;Place your end of feed custom content here&lt;/p&gt;';
return $content;
}
add_filter('the_excerpt_rss', 'insertEndContent');
add_filter('the_content_rss', 'insertEndContent');
?&gt;
</pre>
<p>Just edit the second line of the function to include the desired code, markup, or text content. This function works by appending the specified custom content to the post content. Then, to ensure that the added content is only included within your feeds, we are using WordPress’ add_filter() function to execute the code only for full and excerpted feed content. </p>
<h2>2. Add Content Before The Feed Entry</h2>
<p>By changing the code slightly you can insert custom content to appear before your regular feed content:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
//Add Custom Content to Start of Feed
function insertStartContent($content) {
$content = '&lt;p&gt;Place your start of feed custom content here&lt;/p&gt;' . $content;
return $content;
}
add_filter('the_excerpt_rss', 'insertStartContent');
add_filter('the_content_rss', 'insertStartContent');
?&gt;
</pre>
<h2>3. Add Custom Content Before and After Feed Entry</h2>
<p>You can combine these snippets to include custom content both before and after your feed:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
function insertContent($content) {
$content = '
&lt;p&gt;This content appears before the feed post.&lt;/p&gt;' . $content . '
&lt;p&gt;This content appears after the feed post.&lt;/p&gt;';
return $content;
}
add_filter('the_excerpt_rss', 'insertContent');
add_filter('the_content_rss', 'insertContent');
?&gt;
</pre>
<p><strong>NOTE:</strong> The code above adds your custom content before and/or after each entry in the feed. You will have to use CSS rules to style the content e.g. to place it on a line of its own above or below the feed entry etc. You can achieve this by using classes in the content markup that you add in.</p>
<div id="crp_related"><h3>Possibly Related Posts:</h3><div id=relposts><ul><li><a href="http://www.riotstories.co.uk/wordpress/add-a-custom-image-to-your-rss-feed/" rel="bookmark" class="crp_title">Add a Custom Image to Your RSS Feed</a></li><li><a href="http://www.riotstories.co.uk/wordpress/add-rss-subscription-icons-to-the-twenty-eleven-theme/" rel="bookmark" class="crp_title">Add RSS Subscription Icons to the Twenty Eleven Theme</a></li><li><a href="http://www.riotstories.co.uk/wordpress/custom-page-title/" rel="bookmark" class="crp_title">Custom Page Title</a></li><li><a href="http://www.riotstories.co.uk/wordpress/how-to-add-a-favicon/" rel="bookmark" class="crp_title">How to add a favicon</a></li><li><a href="http://www.riotstories.co.uk/wordpress/change-default-header-images-in-twenty-eleven-theme/" rel="bookmark" class="crp_title">Change Default Header Images in Twenty Eleven Theme</a></li></ul></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/riotstories?a=ngSxb37C0-A:QmSwE-5q0m4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/riotstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=ngSxb37C0-A:QmSwE-5q0m4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/riotstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=ngSxb37C0-A:QmSwE-5q0m4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/riotstories?i=ngSxb37C0-A:QmSwE-5q0m4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=ngSxb37C0-A:QmSwE-5q0m4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/riotstories?i=ngSxb37C0-A:QmSwE-5q0m4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=ngSxb37C0-A:QmSwE-5q0m4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/riotstories?i=ngSxb37C0-A:QmSwE-5q0m4:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/riotstories/~4/ngSxb37C0-A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.riotstories.co.uk/wordpress/add-custom-content-to-your-rss-feed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.riotstories.co.uk/wordpress/add-custom-content-to-your-rss-feed/</feedburner:origLink></item>
		<item>
		<title>An Excellent Resource for Independent Artists</title>
		<link>http://feedproxy.google.com/~r/riotstories/~3/UU88u2h7gVo/</link>
		<comments>http://www.riotstories.co.uk/music/an-excellent-resource-for-independent-artists/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 20:49:42 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[DIY Approach]]></category>
		<category><![CDATA[Independent Musicians]]></category>

		<guid isPermaLink="false">http://www.riotstories.co.uk/?p=861</guid>
		<description><![CDATA[If you're an independent musician consider visiting this website to help better understand the music industry and how you could take a DIY approach to your musical marketing and development. <a href="http://www.riotstories.co.uk/music/an-excellent-resource-for-independent-artists/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re an independent musician who values your creative freedom and control and who is keen to take a DIY approach to your music and everything connected to it then you could do a lot worse for yourself than visiting the fantastic Bemuso website which can be found at: <a href="http://bemuso.com" title="An Excellent Blog and General Resource Covering All Aspects of the Music Business" target="_blank">http://bemuso.com</a></p>
<p>You will find all sorts of useful information about the music industry, how it works, how you can use it to your advantage and how you can take a DIY approach to safeguarding your creative talents and retaining some control. It&#8217;s a hugely tough game to make sustainable progress in even for the most talented. However, one thing that is absolutely beyond doubt is the simple fact that knowledge and preparation will NOT cause you harm. The information in the site will definitely help you understand the industry better.</p>
<p>Go ahead, check it out if you&#8217;re an unsigned artist, an independent artist, a promotor, a manager or just an interested individual.</p>
<p><strong class="highlight">DISCLAIMER:</strong> I&#8217;m not associated or involved with the site in any shape or form. I&#8217;m just a very grateful consumer of the information that has very kindly been made available free of charge on the site and feel it deserves promotion. Consider this a sincere thank you to the site owner.</p>
<p>[ratings]</br></p>
<div id="crp_related"><h3>Possibly Related Posts:</h3><div id=relposts><ul><li><a href="http://www.riotstories.co.uk/music/paul-weller-guitar-tabs/" rel="bookmark" class="crp_title">Paul Weller Guitar Tabs</a></li><li><a href="http://www.riotstories.co.uk/wordpress/twenty-eleven-headings-using-font-face/" rel="bookmark" class="crp_title">Change Twenty Eleven Header Styles Using @font-face</a></li><li><a href="http://www.riotstories.co.uk/web-development/edit-hosts-file-in-vista/" rel="bookmark" class="crp_title">Edit the .hosts file in Vista</a></li><li><a href="http://www.riotstories.co.uk/web-development/using-wamp-server/" rel="bookmark" class="crp_title">Using WAMP Server on Windows</a></li><li><a href="http://www.riotstories.co.uk/wordpress/replace-small-plugins-with-code/" rel="bookmark" class="crp_title">Replace unnecessary plugins with code</a></li></ul></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/riotstories?a=UU88u2h7gVo:Av-VEYyIPgI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/riotstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=UU88u2h7gVo:Av-VEYyIPgI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/riotstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=UU88u2h7gVo:Av-VEYyIPgI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/riotstories?i=UU88u2h7gVo:Av-VEYyIPgI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=UU88u2h7gVo:Av-VEYyIPgI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/riotstories?i=UU88u2h7gVo:Av-VEYyIPgI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/riotstories?a=UU88u2h7gVo:Av-VEYyIPgI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/riotstories?i=UU88u2h7gVo:Av-VEYyIPgI:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/riotstories/~4/UU88u2h7gVo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.riotstories.co.uk/music/an-excellent-resource-for-independent-artists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.riotstories.co.uk/music/an-excellent-resource-for-independent-artists/</feedburner:origLink></item>
	</channel>
</rss>

