<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>The Big Idea.</title>
	<atom:link href="http://www.ksmooney.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ksmooney.com</link>
	<description>By Kevin Mooney</description>
	<lastBuildDate>Thu, 10 Dec 2009 04:08:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A quick organizational thought&#8230;</title>
		<link>http://www.ksmooney.com/a-quick-organizational-thought/</link>
		<comments>http://www.ksmooney.com/a-quick-organizational-thought/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 04:08:59 +0000</pubDate>
		<dc:creator>Kevin Mooney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ksmooney.com/a-quick-organizational-thought/</guid>
		<description><![CDATA[If you&#8217;re like most companies, you&#8217;ve got a pool of new talent at the bottom of the hierarchy.  You can think of these folks as your farm-team for your management team of the future.
If you contract those jobs (offshore or not, doesn&#8217;t matter) out, where does that leave your potential for future growth?  [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like most companies, you&#8217;ve got a pool of new talent at the bottom of the hierarchy.  You can think of these folks as your farm-team for your management team of the future.</p>
<p>If you contract those jobs (offshore or not, doesn&#8217;t matter) out, where does that leave your potential for future growth?  </p>
<p>Where do you find rising stars when there is nowhere to rise from?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ksmooney.com/a-quick-organizational-thought/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Noise in Color</title>
		<link>http://www.ksmooney.com/noise-in-color/</link>
		<comments>http://www.ksmooney.com/noise-in-color/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 03:53:02 +0000</pubDate>
		<dc:creator>Kevin Mooney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ksmooney.com/?p=208</guid>
		<description><![CDATA[Here&#8217;s a video of some stuff I&#8217;ve been playing w/ in Processing &#8212; this is an animation of a Perlin noise flow field.  It&#8217;s only interesting because the step size of the z-coordinate is different than for the x and y coordinates.   
Also, you can see it uses a rainbow color palette [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a video of some stuff I&#8217;ve been playing w/ in Processing &#8212; this is an animation of a Perlin noise flow field.  It&#8217;s only interesting because the step size of the z-coordinate is different than for the x and y coordinates.   </p>
<p>Also, you can see it uses a rainbow color palette what to make it look pretty&#8230;</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/ewNPsVyxpkg&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ewNPsVyxpkg&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>A couple of ideas have just occurred to me &#8211; one is that it might be neat to have different x and y step sizes.  Also!  It would be interesting to build flow-fields out of gray scale images&#8230; I might try that next just to see what happens.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ksmooney.com/noise-in-color/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photography</title>
		<link>http://www.ksmooney.com/209/</link>
		<comments>http://www.ksmooney.com/209/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 00:53:10 +0000</pubDate>
		<dc:creator>Kevin Mooney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ksmooney.com/?p=210</guid>
		<description><![CDATA[&#8220;I bought a dead horse from a firm called Casualty Cattle in Derbyshire and had it brought back to my studio on a trailer. From that point on, things began to go wrong for me. Horses are actually quite a lot bigger than you think.&#8221;
via
]]></description>
			<content:encoded><![CDATA[<p>&#8220;<a href="http://theasylum.wordpress.com/2009/10/19/simon-crump-interview/" onclick="pageTracker._trackPageview('/outgoing/theasylum.wordpress.com/2009/10/19/simon-crump-interview/?referer=');">I bought a dead horse from a firm called Casualty Cattle in Derbyshire and had it brought back to my studio on a trailer. From that point on, things began to go wrong for me. Horses are actually quite a lot bigger than you think.</a>&#8221;</p>
<p><a href="http://www.3ammagazine.com/3am/amperes-and-23/" onclick="pageTracker._trackPageview('/outgoing/www.3ammagazine.com/3am/amperes-and-23/?referer=');">via</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ksmooney.com/209/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing With Noise&#8230;</title>
		<link>http://www.ksmooney.com/playing-with-noise/</link>
		<comments>http://www.ksmooney.com/playing-with-noise/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 03:08:51 +0000</pubDate>
		<dc:creator>Kevin Mooney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ksmooney.com/?p=203</guid>
		<description><![CDATA[I&#8217;ve been goofing around with planes of perlin noise.  I&#8217;m not going to post an applet because it seems most people can&#8217;t see them.  So here&#8217;s a screen grab from the app&#8230;

I&#8217;m using Perlin Noise to generate this.  I&#8217;m treating each point as an angle, generating the vector components, then storing it [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been goofing around with planes of perlin noise.  I&#8217;m not going to post an applet because it seems most people can&#8217;t see them.  So here&#8217;s a screen grab from the app&#8230;</p>
<p><a href="http://www.ksmooney.com/wp-content/uploads/2009/10/Picture-1.png"><img src="http://www.ksmooney.com/wp-content/uploads/2009/10/Picture-1.png" alt="Picture 1" title="Picture 1" width="417" height="800" class="alignnone size-full wp-image-204" /></a></p>
<p>I&#8217;m using <a href="http://en.wikipedia.org/wiki/Perlin_noise" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Perlin_noise?referer=');">Perlin Noise</a> to generate this.  I&#8217;m treating each point as an angle, generating the vector components, then storing it all in a screen-sized array.  Then, I drop particles at random heights on the right-most part of the screen and update their positions from the vectors stored in the array.  Then the drawing just sort of draws itself&#8230; It&#8217;s sort of like a giant game of <a href="http://en.wikipedia.org/wiki/Plinko" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Plinko?referer=');">Plinko</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ksmooney.com/playing-with-noise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If that other stuff didn&#8217;t break your computer or make you sea sick, maybe this will.</title>
		<link>http://www.ksmooney.com/if-that-other-stuff-didnt-break-your-computer-or-make-you-sea-sick-maybe-this-will/</link>
		<comments>http://www.ksmooney.com/if-that-other-stuff-didnt-break-your-computer-or-make-you-sea-sick-maybe-this-will/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 03:47:15 +0000</pubDate>
		<dc:creator>Kevin Mooney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ksmooney.com/?p=193</guid>
		<description><![CDATA[

You need java for this to work.. :-/

 
Some pretty ugly stuff, this:

&#160;
ArrayList displays;
float currentAngle = 0;
float currentX = 200;
float tempX = currentX;
float currentY = 150;
float tempY = currentY;
WormThing w1 = new WormThing&#40;250,400,0&#41;;
WormThing w2 = new WormThing&#40;250,400,180&#41;;
&#160;
class MouseDisplay &#123; 
  float x,y;
  boolean alive;
  private int telomere;
  float rotation_angle;
  float [...]]]></description>
			<content:encoded><![CDATA[<p><EMBED type="application/x-java-applet" width="600" height="800" align="baseline" archive="http://www.ksmooney.com/wp-content/uploads/2009/10/sketch_oct07a.jar" standby="Loading Processing software..." codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0_15-windows-i586.cab" code="sketch_oct07a" mayscript="true" scriptable="true" image="http://www.ksmooney.com/wp-content/uploads/2009/10/loading.gif" boxmessage="Loading Processing software..." boxcolor="#FFFFFF"><br />
<NOEMBED><br />
You need java for this to work.. :-/<br />
</NOEMBED><br />
</EMBED> </p>
<p>Some pretty ugly stuff, this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">&nbsp;
<span style="color: #003399;">ArrayList</span> displays<span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">float</span> currentAngle <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">float</span> currentX <span style="color: #339933;">=</span> <span style="color: #cc66cc;">200</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">float</span> tempX <span style="color: #339933;">=</span> currentX<span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">float</span> currentY <span style="color: #339933;">=</span> <span style="color: #cc66cc;">150</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">float</span> tempY <span style="color: #339933;">=</span> currentY<span style="color: #339933;">;</span>
WormThing w1 <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WormThing<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">250</span>,<span style="color: #cc66cc;">400</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
WormThing w2 <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WormThing<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">250</span>,<span style="color: #cc66cc;">400</span>,<span style="color: #cc66cc;">180</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> MouseDisplay <span style="color: #009900;">&#123;</span> 
  <span style="color: #000066; font-weight: bold;">float</span> x,y<span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">boolean</span> alive<span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> telomere<span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">float</span> rotation_angle<span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">float</span> rotation_speed<span style="color: #339933;">;</span>
&nbsp;
  MouseDisplay<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> x_, <span style="color: #000066; font-weight: bold;">float</span> y_, <span style="color: #000066; font-weight: bold;">int</span> size_<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    x <span style="color: #339933;">=</span> x_<span style="color: #339933;">;</span>
    y <span style="color: #339933;">=</span> y_<span style="color: #339933;">;</span>
    alive <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    telomere <span style="color: #339933;">=</span> size_<span style="color: #339933;">;</span>
    rotation_angle <span style="color: #339933;">=</span> <span style="color: #cc66cc;">45</span><span style="color: #339933;">;</span>
    rotation_speed <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> show<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    x <span style="color: #339933;">=</span> x<span style="color: #339933;">+</span>cos<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>rotation_angle<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> rotation_speed<span style="color: #339933;">;</span>
    y <span style="color: #339933;">=</span> y<span style="color: #339933;">+</span>sin<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>rotation_angle<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> rotation_speed<span style="color: #339933;">;</span>
    rotation_angle <span style="color: #339933;">-=</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
    ellipse<span style="color: #009900;">&#40;</span> x,y, telomere, telomere<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    telomere<span style="color: #339933;">--;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>telomere <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      alive <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> WormThing <span style="color: #009900;">&#123;</span> 
   <span style="color: #000066; font-weight: bold;">float</span> angle<span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">float</span> x<span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">float</span> y<span style="color: #339933;">;</span>
&nbsp;
   WormThing<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> x_, <span style="color: #000066; font-weight: bold;">float</span> y_, <span style="color: #000066; font-weight: bold;">float</span> angle_<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
      x <span style="color: #339933;">=</span> x_<span style="color: #339933;">;</span>
      y <span style="color: #339933;">=</span> y_<span style="color: #339933;">;</span>
      angle <span style="color: #339933;">=</span> angle_<span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #000066; font-weight: bold;">void</span> execute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
      angle <span style="color: #339933;">+=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span>
      x <span style="color: #339933;">+=</span> cos<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>angle<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">15</span><span style="color: #339933;">;</span>
      y <span style="color: #339933;">+=</span> sin<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>angle<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">15</span><span style="color: #339933;">;</span>
      <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
         MouseDisplay d <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MouseDisplay<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>random<span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span>, y<span style="color: #339933;">+</span>random<span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span>, <span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>displays.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">250</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            displays.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span>d<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  size<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">600</span>,<span style="color: #cc66cc;">800</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  frameRate<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  stroke<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">90</span>, <span style="color: #cc66cc;">60</span>, <span style="color: #cc66cc;">50</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  smooth<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  displays <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">ArrayList</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
  w1.<span style="color: #006633;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  w2.<span style="color: #006633;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  background<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">167</span>, <span style="color: #cc66cc;">159</span>, <span style="color: #cc66cc;">148</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> displays.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    MouseDisplay m <span style="color: #339933;">=</span>  <span style="color: #009900;">&#40;</span>MouseDisplay<span style="color: #009900;">&#41;</span> displays.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    m.<span style="color: #006633;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>m.<span style="color: #006633;">alive</span> <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      displays.<span style="color: #006633;">remove</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  print<span style="color: #009900;">&#40;</span>displays.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.ksmooney.com/if-that-other-stuff-didnt-break-your-computer-or-make-you-sea-sick-maybe-this-will/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Koch Curve made with an L-System</title>
		<link>http://www.ksmooney.com/koch-curve-made-with-an-l-system/</link>
		<comments>http://www.ksmooney.com/koch-curve-made-with-an-l-system/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 03:57:04 +0000</pubDate>
		<dc:creator>Kevin Mooney</dc:creator>
				<category><![CDATA[what a dork]]></category>

		<guid isPermaLink="false">http://www.ksmooney.com/?p=183</guid>
		<description><![CDATA[Ok, so remember how yesterday I said I tried to draw this curve, but &#8220;everything went wrong&#8221; and here&#8217;s something random?  Yes?  Great!  
What I was trying to get at is that there is more than one way to skin a cat or, if you prefer, to visualize a recursive set.  [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so remember how yesterday I said I tried to draw this curve, but &#8220;everything went wrong&#8221; and here&#8217;s something random?  Yes?  Great!  </p>
<p>What I was trying to get at is that there is more than one way to skin a cat or, if you prefer, to visualize a recursive set.  In the last Koch example, the drawing code itself was recursive.  We would see if we were at the terminal (bottom-most) depth and if so, draw a little bit of line.  Otherwise, we would recursively call the drawCurve(&#8230;) function.</p>
<p>Instead of making the drawing code recursive, we can define the curve as a set of rules, evaluate those rules recursively, and use the Turtle from my last post to draw the whole curve!</p>
<p>The especially cool thing about this is that we can change the rules to draw whatever kind of self-similar shape we want, without having to do a bunch of math for each curve we want to draw.</p>
<p><strong>About L-systems</strong><br />
An L-System is defined by a grammar.  It has a starting state (sometimes called an axiom) and some rewriting rules.  For the Koch curve, you&#8217;ll sometimes see the L-System defined like this:</p>
<p>Axiom: F<br />
Rule: F -> F+F-F-F+F</p>
<p>I think people use pluses and minuses to make it look like math.  Instead, you should think of each character in the Rule as an instruction for your turtle.  F means &#8220;go forward&#8221;, + means turn left, &#8211; means turn right.  </p>
<p>I wrote my Koch curve rule like this:</p>
<p>Axiom: f<br />
Rule: f -> f l f r r f l f</p>
<p>For myself, &#8220;l&#8221; means turn left, and &#8220;r&#8221; means turn right.</p>
<p>Ok, so that&#8217;s all well and good, but how does this translate to a crazy self-similar curve?  All I&#8217;ve shown you so far is a really simple grammar.</p>
<p>Well, the key is that the rule &#8220;f&#8221; rewrites itself.  I&#8217;ll show you in the table below, for up to two iterations:</p>
<table>
<tr>
<th>Iterations</th>
<th>Result</th>
</tr>
<tr>
<td>0</td>
<td>f</td>
</tr>
<tr>
<td>1</td>
<td>f l f r r f l f</td>
</tr>
<tr>
<td>2</td>
<td>f l f r r f l f l f l f r r f l f r r f l f r r f l f l f l f r r f l f</td>
</tr>
</table>
<p>Ok, so for each iteration, you replace &#8216;f&#8217; with &#8216;f l f r r f l f&#8217;.  Once you&#8217;ve iterated enough times, you can tell your turtle to follow the instructions in that list.</p>
<p>Trouble is, when you fully expand the list, you see that it gets really big after just a couple of iterations.  If you tried to just string replace 10 times, you would run out of memory.  And don&#8217;t think about trying to get more memory, because if you doubled your memory, you might have enough for just one more iteration.</p>
<p>So, the way to overcome this is to evaluate the rules while we&#8217;re drawing.  You&#8217;ll find the code for that in the function called <em>evalutron</em>, below:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">Turtle t<span style="color: #339933;">;</span>
<span style="color: #003399;">HashMap</span> rules<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Turtle <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">float</span> x, y, ang<span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">float</span> default_angle<span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">boolean</span> down<span style="color: #339933;">;</span>   
&nbsp;
  Turtle<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> _x, <span style="color: #000066; font-weight: bold;">float</span> _y, <span style="color: #000066; font-weight: bold;">float</span> _ang<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    x <span style="color: #339933;">=</span> _x<span style="color: #339933;">;</span>
    y <span style="color: #339933;">=</span> _y<span style="color: #339933;">;</span>
    ang <span style="color: #339933;">=</span> _ang<span style="color: #339933;">;</span>
    down <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> penDown<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    down <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> penUp<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    down <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> forward<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> len<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    <span style="color: #000066; font-weight: bold;">float</span> nx <span style="color: #339933;">=</span> x<span style="color: #339933;">+</span>cos<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>ang<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>len<span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">float</span> ny <span style="color: #339933;">=</span> y<span style="color: #339933;">+</span>sin<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>ang<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>len<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>down<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
      line<span style="color: #009900;">&#40;</span>x,y,nx,ny<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    x <span style="color: #339933;">=</span> nx<span style="color: #339933;">;</span>
    y <span style="color: #339933;">=</span> ny<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> 
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> turnLeft<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> _ang<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    ang <span style="color: #339933;">-=</span> _ang<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">void</span> turnLeft<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    ang <span style="color: #339933;">-=</span> default_angle<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> turnRight<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> _ang<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    ang <span style="color: #339933;">+=</span> _ang<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">void</span> turnRight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    ang <span style="color: #339933;">+=</span> default_angle<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> execute<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">char</span> chr, <span style="color: #000066; font-weight: bold;">float</span> zoom_factor<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
  <span style="color: #000000; font-weight: bold;">switch</span> <span style="color: #009900;">&#40;</span>chr<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
  <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #0000ff;">'l'</span><span style="color: #339933;">:</span>
    t.<span style="color: #006633;">turnLeft</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #0000ff;">'r'</span><span style="color: #339933;">:</span>
    t.<span style="color: #006633;">turnRight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #0000ff;">'f'</span><span style="color: #339933;">:</span>
    t.<span style="color: #006633;">forward</span><span style="color: #009900;">&#40;</span>zoom_factor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> evalutron<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> state, <span style="color: #003399;">HashMap</span> rules, <span style="color: #000066; font-weight: bold;">int</span> depth, <span style="color: #000066; font-weight: bold;">float</span> zoom<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> state.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    <span style="color: #000066; font-weight: bold;">char</span> x <span style="color: #339933;">=</span> state.<span style="color: #006633;">charAt</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003399;">String</span> result <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#41;</span> rules.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>depth <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #339933;">&amp;&amp;</span> result <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
      evalutron<span style="color: #009900;">&#40;</span>result, rules, depth<span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span>,zoom<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span> 
      execute<span style="color: #009900;">&#40;</span>x, zoom<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
  background<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  stroke<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">120</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  smooth<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  size<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">600</span>,<span style="color: #cc66cc;">600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  frameRate<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #008000; font-style: italic; font-weight: bold;">/** 
   * Set up the L-System Rule
   */</span>
  rules <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">HashMap</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  rules.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'f'</span>, <span style="color: #0000ff;">&quot;flfrrflf&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #008000; font-style: italic; font-weight: bold;">/** 
   * Configure our friendly turtle 
   */</span>
  t <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Turtle<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">300</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  t.<span style="color: #006633;">penDown</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  t.<span style="color: #006633;">default_angle</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span>
  <span style="color: #666666; font-style: italic;">/*
   *  Evaluate the rule set, and draw the curve.
   *  'f' is the initial rule set. notice that 'f' is the rule in the rules map, 
   *  so it will get rewritten for each iteration.
   */</span>
  evalutron<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;f&quot;</span>, rules, <span style="color: #cc66cc;">7</span>, .28<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>You see that <em>evalutron</em> just looks at the current token, evaluates the depth at which its evaluating, and decides whether to expand the current token to another ruleset, or to pass the command to the turtle.  Easy as pie!</p>
<p>Oh, and if you&#8217;re paying very close attention, you&#8217;ll see that the turtle has changed a teeny bit:  he can now turn a &#8216;default&#8217; amount by calling turnLeft() and turnRight() with no parameters.</p>
<p>So anyways, this is another way to draw cool recursive sets, but in a way that&#8217;s a little more language-y and a little less math-y.  Also, you can change the original &#8216;axiom&#8217; or add new rules to get wildly different results.  Try it!</p>
<p>As proof, here&#8217;s the applet in action.  Sorry, no interaction this time:</p>
<p><EMBED type="application/x-java-applet" width="600" height="600" align="baseline" archive="http://www.ksmooney.com/wp-content/uploads/2009/10/sketch_oct05a1.jar" standby="Loading Processing software..." codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0_15-windows-i586.cab" code="sketch_oct05a" mayscript="true" scriptable="true" image="http://www.ksmooney.com/wp-content/uploads/2009/10/loading.gif" boxmessage="Loading Processing software..." boxcolor="#FFFFFF"><br />
<NOEMBED><br />
You need java for this to work.. :-/<br />
</NOEMBED><br />
</EMBED> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ksmooney.com/koch-curve-made-with-an-l-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Made A Turtle!</title>
		<link>http://www.ksmooney.com/i-made-a-turtle/</link>
		<comments>http://www.ksmooney.com/i-made-a-turtle/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 05:06:17 +0000</pubDate>
		<dc:creator>Kevin Mooney</dc:creator>
				<category><![CDATA[what a dork]]></category>

		<guid isPermaLink="false">http://www.ksmooney.com/?p=178</guid>
		<description><![CDATA[I was trying to make a demonstration of how to do a Koch curve as an l-system with turtle graphics, but my computer would run out of memory when I set it to 3 iterations, because I would rewrite the rule back into the original string that contained the &#8220;what&#8217;s yr turtle gonna do&#8221; information. [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to make a demonstration of how to do a Koch curve as an l-system with turtle graphics, but my computer would run out of memory when I set it to 3 iterations, because I would rewrite the rule back into the original string that contained the &#8220;what&#8217;s yr turtle gonna do&#8221; information.  Maybe another day&#8230; </p>
<p>But anyways, I made a <a href="http://en.wikipedia.org/wiki/Turtle_graphics" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Turtle_graphics?referer=');">Turtle</a>.  Here it is doing a random forward/backward walk (+/- 10 pixels) and turning left one degree for every frame.  It&#8217;s oddly compelling to watch.   </p>
<p>Oh hey, if your turtle wanders off the screen (unlikely in the short term, <em>inevitable</em> in the long term, sort of like death&#8230;) then just click on the applet to reset him back to the middle of the screen.</p>
<p>Also, thanks to my Mom for getting me a &#8220;Programming with LOGO book&#8221; when I was still a toddler.  Apparently, those lessons weren&#8217;t lost on me&#8230;<br />
<EMBED type="application/x-java-applet" width="650" height="600" align="baseline" archive="http://www.ksmooney.com/wp-content/uploads/2009/10/sketch_oct04a.jar" standby="Loading Processing software..." codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0_15-windows-i586.cab" code="sketch_oct04a" mayscript="true" scriptable="true" image="http://www.ksmooney.com/wp-content/uploads/2009/10/loading.gif" boxmessage="Loading Processing software..." boxcolor="#FFFFFF"><br />
<NOEMBED><br />
You need java for this to work.. :-/<br />
</NOEMBED><br />
</EMBED></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">Turtle t<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">class</span> Turtle <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">float</span> x, y, ang<span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">boolean</span> down<span style="color: #339933;">;</span>   
&nbsp;
  Turtle<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> _x, <span style="color: #000066; font-weight: bold;">float</span> _y, <span style="color: #000066; font-weight: bold;">float</span> _ang<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    x <span style="color: #339933;">=</span> _x<span style="color: #339933;">;</span>
    y <span style="color: #339933;">=</span> _y<span style="color: #339933;">;</span>
    ang <span style="color: #339933;">=</span> _ang<span style="color: #339933;">;</span>
    down <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> penDown<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    down <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> penUp<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    down <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> forward<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> len<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    <span style="color: #000066; font-weight: bold;">float</span> nx <span style="color: #339933;">=</span> x<span style="color: #339933;">+</span>cos<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>ang<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>len<span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">float</span> ny <span style="color: #339933;">=</span> y<span style="color: #339933;">+</span>sin<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>ang<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>len<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>down<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
      line<span style="color: #009900;">&#40;</span>x,y,nx,ny<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    x <span style="color: #339933;">=</span> nx<span style="color: #339933;">;</span>
    y <span style="color: #339933;">=</span> ny<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> 
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> turnLeft<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> _ang<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    ang <span style="color: #339933;">-=</span> _ang<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> turnRight<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> _ang<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    ang <span style="color: #339933;">+=</span> _ang<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    background<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    stroke<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">120</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    smooth<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    size<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">600</span>,<span style="color: #cc66cc;">600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    frameRate<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    t <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Turtle<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">300</span>,<span style="color: #cc66cc;">300</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>   
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>mousePressed<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
        t <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Turtle<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">300</span>,<span style="color: #cc66cc;">300</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    t.<span style="color: #006633;">penDown</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    t.<span style="color: #006633;">forward</span><span style="color: #009900;">&#40;</span>random<span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    t.<span style="color: #006633;">turnLeft</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.ksmooney.com/i-made-a-turtle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mirrored Koch Curve</title>
		<link>http://www.ksmooney.com/164/</link>
		<comments>http://www.ksmooney.com/164/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 21:02:27 +0000</pubDate>
		<dc:creator>Kevin Mooney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ksmooney.com/?p=164</guid>
		<description><![CDATA[So this is kind of cool.  I spend a little time last night goofing around w/ Processing, which I haven&#8217;t used since I was in college.  And back then, I had a pentium II 400Mhz computer running Windows, so I wasn&#8217;t able to get a lot of use out of it.  Anyways, [...]]]></description>
			<content:encoded><![CDATA[<p>So this is kind of cool.  I spend a little time last night goofing around w/ <a href="http://processing.org/" onclick="pageTracker._trackPageview('/outgoing/processing.org/?referer=');">Processing</a>, which I haven&#8217;t used since I was in college.  And back then, I had a pentium II 400Mhz computer running Windows, so I wasn&#8217;t able to get a lot of use out of it.  Anyways, here&#8217;s an interactive Koch curve.  Move you mouse over the applet to activate.  Moving your mouse to the right increases the angle of the curve, moving it up and down increases or decreases the number of iterations of the curve.  Have fun!  The code follows the demo:</p>
<p><EMBED type="application/x-java-applet" width="650" height="600" align="baseline" archive="http://www.ksmooney.com/wp-content/uploads/2009/10/sketch_oct03a.jar" standby="Loading Processing software..." codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0_15-windows-i586.cab" code="sketch_oct03a" mayscript="true" scriptable="true" image="http://www.ksmooney.com/wp-content/uploads/2009/10/loading.gif" boxmessage="Loading Processing software..." boxcolor="#FFFFFF"><br />
<NOEMBED><br />
You need java for this to work.. :-/<br />
</NOEMBED><br />
</EMBED></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">void</span> drawCurve<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> x, <span style="color: #000066; font-weight: bold;">float</span> y, <span style="color: #000066; font-weight: bold;">float</span> len, <span style="color: #000066; font-weight: bold;">float</span> ang, <span style="color: #000066; font-weight: bold;">float</span> curve_angle, <span style="color: #000066; font-weight: bold;">int</span> depth<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
   <span style="color: #000066; font-weight: bold;">float</span> sideLen <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>len<span style="color: #339933;">/</span><span style="color: #cc66cc;">6</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> cos<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>curve_angle<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">float</span> ax <span style="color: #339933;">=</span> x<span style="color: #339933;">+</span>cos<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>ang<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> len<span style="color: #339933;">/</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">float</span> ay <span style="color: #339933;">=</span> y<span style="color: #339933;">+</span>sin<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>ang<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> len<span style="color: #339933;">/</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">float</span> bx <span style="color: #339933;">=</span> ax<span style="color: #339933;">+</span>cos<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>ang<span style="color: #339933;">-</span>curve_angle<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> sideLen<span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">float</span> by <span style="color: #339933;">=</span> ay<span style="color: #339933;">+</span>sin<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>ang<span style="color: #339933;">-</span>curve_angle<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> sideLen<span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">float</span> cx <span style="color: #339933;">=</span> bx<span style="color: #339933;">+</span>cos<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>ang<span style="color: #339933;">+</span>curve_angle<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> sideLen<span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">float</span> cy <span style="color: #339933;">=</span> by<span style="color: #339933;">+</span>sin<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>ang<span style="color: #339933;">+</span>curve_angle<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> sideLen<span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">float</span> dx <span style="color: #339933;">=</span> cx<span style="color: #339933;">+</span>cos<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>ang<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> len<span style="color: #339933;">/</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">float</span> dy <span style="color: #339933;">=</span> cy<span style="color: #339933;">+</span>sin<span style="color: #009900;">&#40;</span>radians<span style="color: #009900;">&#40;</span>ang<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> len<span style="color: #339933;">/</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>depth <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
     depth<span style="color: #339933;">--;</span>
     drawCurve<span style="color: #009900;">&#40;</span>x,y,len<span style="color: #339933;">/</span><span style="color: #cc66cc;">3</span>,ang,curve_angle,depth<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     drawCurve<span style="color: #009900;">&#40;</span>ax,ay,sideLen,ang<span style="color: #339933;">-</span>curve_angle,curve_angle,depth<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     drawCurve<span style="color: #009900;">&#40;</span>bx,by,sideLen,ang<span style="color: #339933;">+</span>curve_angle,curve_angle,depth<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
     drawCurve<span style="color: #009900;">&#40;</span>cx,cy,len<span style="color: #339933;">/</span><span style="color: #cc66cc;">3</span>,ang,curve_angle,depth<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
     line<span style="color: #009900;">&#40;</span>x,y,ax,ay<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     line<span style="color: #009900;">&#40;</span>ax,ay,bx,by<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     line<span style="color: #009900;">&#40;</span>bx,by,cx,cy<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     line<span style="color: #009900;">&#40;</span>cx,cy,dx,dy<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  size<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">800</span>,<span style="color: #cc66cc;">600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  frameRate<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  background<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  smooth<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  stroke<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  background<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">float</span> curve_angle <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">90</span><span style="color: #339933;">*</span>mouseX<span style="color: #339933;">/</span><span style="color: #cc66cc;">800</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  curve_angle<span style="color: #339933;">=</span>min<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">70</span>,curve_angle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">int</span> detail_level <span style="color: #339933;">=</span> <span style="color: #cc66cc;">7</span><span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">*</span>mouseY<span style="color: #339933;">/</span><span style="color: #cc66cc;">600</span><span style="color: #339933;">;</span>
  drawCurve<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,  <span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">800</span>, <span style="color: #cc66cc;">0</span>,  curve_angle, detail_level<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  drawCurve<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">800</span>,  <span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">800</span>, <span style="color: #cc66cc;">180</span>,  curve_angle, detail_level<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.ksmooney.com/164/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft&#8217;s Endgame:  Kitchen Computing</title>
		<link>http://www.ksmooney.com/microsofts-endgame-kitchen-computing/</link>
		<comments>http://www.ksmooney.com/microsofts-endgame-kitchen-computing/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 04:52:10 +0000</pubDate>
		<dc:creator>Kevin Mooney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ksmooney.com/?p=154</guid>
		<description><![CDATA[Lately, I&#8217;ve been wondering about Microsoft&#8217;s strategy.  At times, it seems kind of listless.  They look around, see what other people are doing, try to do it better.  Or cheaper.  Or they try to convince businesses to adopt it.  It worked.  For a while.  
But lately, there doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Lately, I&#8217;ve been wondering about Microsoft&#8217;s strategy.  At times, it seems kind of listless.  They look around, see what other people are doing, try to do it better.  Or cheaper.  Or they try to convince businesses to adopt it.  <a href="http://en.wikipedia.org/wiki/Windows_95" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Windows_95?referer=');">It</a> <a href="http://en.wikipedia.org/wiki/Internet_Explorer_6" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Internet_Explorer_6?referer=');">worked</a>.  <a href="http://en.wikipedia.org/wiki/MSN_TV" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/MSN_TV?referer=');">For</a> <a href="http://www.amazon.com/Fossil-Wrist-Smart-Direct-AU4000/dp/B0001540G4" onclick="pageTracker._trackPageview('/outgoing/www.amazon.com/Fossil-Wrist-Smart-Direct-AU4000/dp/B0001540G4?referer=');">a while</a>.  </p>
<p>But lately, there doesn&#8217;t seem to be any unifying strategy.  A search engine here, a search engine there.  Some new products.  </p>
<p>But what is the vision?  </p>
<p>Everyone knows that Google wants to own all information.  </p>
<p>Apple wants you to buy all of your hardware from them.  Or at least they want to make the slickest shit under the sun.  </p>
<p>What does Microsoft want?  A PC in your kitchen.</p>
<p>I first really noticed it in Windows XP.  When setting up a network, the System Properties > Computer Name tab used &#8220;Kitchen Computer&#8221; as an example description.  What an idea! </p>
<div id="attachment_155" class="wp-caption alignnone" style="width: 429px"><img src="http://www.ksmooney.com/wp-content/uploads/2009/09/systemname.PNG" alt="The birth of Kitchen Computing" title="systemname" width="419" height="486" class="size-full wp-image-155" /><p class="wp-caption-text">The birth of Kitchen Computing</p></div>
<p>At first, I thought this was just a bad decision from a software designer acting under extreme stress.  But as I&#8217;ve investigated, a pattern of kitchen computing has emerged.  This pattern has been emerged across multiple divisions of the company.  </p>
<p>Here&#8217;s an article from Microsoft&#8217;s Windows XP site.  It asks &#8220;<a href="http://www.microsoft.com/windowsxp/using/web/learnmore/crawford_kitchenpc.mspx" onclick="pageTracker._trackPageview('/outgoing/www.microsoft.com/windowsxp/using/web/learnmore/crawford_kitchenpc.mspx?referer=');">How Useful is a Kitchen PC?</a>&#8221;  I don&#8217;t need to tell you that the answer is: &#8220;very useful.&#8221;  Additionally this article states that you &#8220;can use almost any serviceable computer.&#8221;  </p>
<p>Indeed.</p>
<p><a href="http://www.microsoft.com/windowsxp/using/networking/expert/honeycutt_july2.mspx" onclick="pageTracker._trackPageview('/outgoing/www.microsoft.com/windowsxp/using/networking/expert/honeycutt_july2.mspx?referer=');">In this article</a> by Jerry Honeycutt, ostensibly intended to assist in the setup of a printer on a home network, helpfully suggests that you set up your printer on the &#8220;kitchen computer.&#8221;  </p>
<p><a href="https://www.microsoft.com/windowsxp/using/networking/expert/honeycutt_july23.mspx" onclick="pageTracker._trackPageview('/outgoing/www.microsoft.com/windowsxp/using/networking/expert/honeycutt_july23.mspx?referer=');">In another article</a>, Honeycutt asks the age-old question: &#8220;What if Junior is using the kitchen computer to play Asheron&#8217;s Call, but you want to print a recipe for Mom&#8217;s meatloaf?&#8221;  </p>
<p>What if, indeed.</p>
<p>Here&#8217;s an article on the Microsoft Office website about how to &#8220;<a href="http://office.microsoft.com/en-us/home/HA102547441033.aspx" onclick="pageTracker._trackPageview('/outgoing/office.microsoft.com/en-us/home/HA102547441033.aspx?referer=');">Move Your Computer Into the Kitchen</a>.&#8221;  </p>
<p>It states that it&#8217;s &#8220;no wonder so many families want computers in their kitchens.&#8221;  </p>
<p>Why with all the printing and the Asheron&#8217;s Call, I can&#8217;t imagine why you <em>wouldn&#8217;t</em> want a <a href="http://www.techcrunch.com/2007/06/06/coming-soon-microsoft-kitchen/" onclick="pageTracker._trackPageview('/outgoing/www.techcrunch.com/2007/06/06/coming-soon-microsoft-kitchen/?referer=');">PC in your kitchen</a>!</p>
<p>But wait, there&#8217;s more!  <a href="http://www.businessinsider.com/2009/1/windows-7-touch-its-for-the-kitchen-msft" onclick="pageTracker._trackPageview('/outgoing/www.businessinsider.com/2009/1/windows-7-touch-its-for-the-kitchen-msft?referer=');">This silicon alley insider post</a> says that the new touch screen technology that may (or may not) be supported could be used&#8230; in the kitchen! </p>
<p>Finally, we come to this horrible marketing hackery.  A video about Windows 7 &#8220;launch parties.&#8221;  You know?  Like when you got your friends together to have some wine and cheese and tell them about Obama?  It&#8217;s like that, except you&#8217;ll be telling them about the great new features in Windows 7:</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/1cX4t5-YpHQ&#038;rel=0&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/1cX4t5-YpHQ&#038;rel=0&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></p>
<p>Notice where they&#8217;re hanging out&#8230;. In the kitchen!  Just hop to 2:23 and the lady in the middle says, &#8220;everyone just crowded around the computer in the kitchen!&#8221;  </p>
<p>So, like, what&#8217;s the point?  It seems like there&#8217;s really a unified effort.  Like maybe they have a KPI for &#8220;mentions of the kitchen in marketing materials.&#8221;  Or maybe some big-wig in Redmond read that once technology became ubiquitous (like the telephone) it became common in the kitchen.  </p>
<p>I fear that they may have mixed up correlation and causation though.  By marketing your crap to go into a kitchen, you&#8217;re not going to make it ubiquitous and hugely profitable, you&#8217;re just gonna get it into a kitchen.  And you&#8217;ll look pretty silly in the process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ksmooney.com/microsofts-endgame-kitchen-computing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Happens When You Drink Coffee?</title>
		<link>http://www.ksmooney.com/what-happens-when-you-drink-coffee/</link>
		<comments>http://www.ksmooney.com/what-happens-when-you-drink-coffee/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 23:57:11 +0000</pubDate>
		<dc:creator>Kevin Mooney</dc:creator>
				<category><![CDATA[ideas]]></category>

		<guid isPermaLink="false">http://www.ksmooney.com/?p=144</guid>
		<description><![CDATA[Metricizin&#8217;
Yesterday, a co-worker asked me, &#8220;how much coffee do you drink?&#8221;  I answered honestly that I didn&#8217;t know.  To find out, I drew a picture of a coffee cup on my white board.  I also drew a line underneath.  Every time I got another cup, I drew another line.  (Incidentally, I also drew a smiley, [...]]]></description>
			<content:encoded><![CDATA[<h4>Metricizin&#8217;</h4>
<p>Yesterday, a co-worker asked me, &#8220;how much coffee <em>do</em> you drink?&#8221;  I answered honestly that I didn&#8217;t know.  To find out, I drew a picture of a coffee cup on my white board.  I also drew a line underneath.  Every time I got another cup, I drew another line.  (Incidentally, I also drew a smiley, neutral or grumpy face to help my co-workers know my mood before talking to me.)</p>
<p>I drank six cups of coffee today.  And I was only grumpy for about an hour, right after lunch.</p>
<p>So all this metricizin&#8217; got me thinking about the health effects of drinking six cups of coffee per day, so I looked it up.  I performed several searches on Google to finally understand the progression of health effects as you drink more coffee.</p>
<h4>Ask Dr. Google</h4>
<p>I searched for &#8220;one cup of coffee per day&#8221;, then &#8220;two cups of coffee per day&#8221;, and so on, up to ten cups.  Without clicking any of the results, I was able to glean the health effects of each amount by reviewing the first page of results.  For the reader&#8217;s convenience, I have summarized the results in the following table:</p>
<table border="0" width="100%">
<tbody>
<tr>
<th>Cups of Coffee / Day</th>
<th>Health Effect</th>
</tr>
<tr>
<td>1</td>
<td>Increased Risk of Heart Disease; Addiction</td>
</tr>
<tr>
<td>2</td>
<td>Double risk of miscarriage; reduce stroke risk by 20%</td>
</tr>
<tr>
<td>3</td>
<td>Lowered Risk of ovarian cancer; shrinks women’s breasts</td>
</tr>
<tr>
<td>4</td>
<td>Prevents gout; reduces chances of making a baby by 25% (women)</td>
</tr>
<tr>
<td>5</td>
<td>Reduced risk of Alzheimer&#8217;s</td>
</tr>
<tr>
<td>6</td>
<td>Slightly lower death rates; diabetes risk reduced by 34% (women)</td>
</tr>
<tr>
<td>7</td>
<td>Hallucinations</td>
</tr>
<tr>
<td>8</td>
<td><em>Nothing</em></td>
</tr>
<tr>
<td>9</td>
<td><em>No Data</em></td>
</tr>
<tr>
<td>10</td>
<td>Tachycardia</td>
</tr>
</tbody>
</table>
<p>As you can see, I&#8217;m right at the sweet spot, between &#8220;slightly lowered risk of death&#8221; and &#8220;hallucinations.&#8221;</p>
<p>Also, in case you didn&#8217;t feel like looking it up, Tachycardia means &#8220;Your heart is beating too fast.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ksmooney.com/what-happens-when-you-drink-coffee/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
