<?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>nik's blog</title>
	<atom:link href="http://www.wrdty.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.wrdty.com</link>
	<description>art/technology/play: b-sides, projects in progress, and other things</description>
	<lastBuildDate>Sun, 05 Sep 2010 02:49:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title></title>
		<link>http://www.wrdty.com/?p=215</link>
		<comments>http://www.wrdty.com/?p=215#comments</comments>
		<pubDate>Sun, 05 Sep 2010 02:44:15 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wrdty.com/?p=215</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.wrdty.com/wp-content/uploads/2010/08/Screen-shot-2010-09-04-at-7.42.48-PM.png" alt="" title="Screen shot 2010-09-04 at 7.42.48 PM" width="614" height="697" class="aligncenter size-full wp-image-217" /></p>
<p><img src="http://www.wrdty.com/wp-content/uploads/2010/09/Screen-shot-2010-09-04-at-7.48.24-PM.png" alt="" title="Screen shot 2010-09-04 at 7.48.24 PM" width="614" height="697" class="aligncenter size-full wp-image-220" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrdty.com/?feed=rss2&amp;p=215</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>game map</title>
		<link>http://www.wrdty.com/?p=212</link>
		<comments>http://www.wrdty.com/?p=212#comments</comments>
		<pubDate>Sat, 28 Aug 2010 00:40:34 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.wrdty.com/?p=212</guid>
		<description><![CDATA[freemind is great.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wrdty.com/wp-content/uploads/2010/08/mm.png"><img src="http://www.wrdty.com/wp-content/uploads/2010/08/mm.png" alt="" title="game_map" width="500" height="258" class="aligncenter size-full wp-image-213" /></a><br />
<br />
<a href="http://freemind.sourceforge.net/wiki/index.php/Main_Page">freemind</a> is great.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrdty.com/?feed=rss2&amp;p=212</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>imaginary app</title>
		<link>http://www.wrdty.com/?p=203</link>
		<comments>http://www.wrdty.com/?p=203#comments</comments>
		<pubDate>Wed, 25 Aug 2010 19:37:15 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.wrdty.com/?p=203</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/14430821?title=0&amp;byline=0" width="320" height="480" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrdty.com/?feed=rss2&amp;p=203</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command /usr/bin/codesign failed with exit code 1</title>
		<link>http://www.wrdty.com/?p=197</link>
		<comments>http://www.wrdty.com/?p=197#comments</comments>
		<pubDate>Sun, 08 Aug 2010 07:42:17 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.wrdty.com/?p=197</guid>
		<description><![CDATA[After many hours of trying to get xcode to compile to my iphone and having &#8220;Command /usr/bin/codesign failed with exit code 1&#8243; as my only clue, I came across Amilion75&#8242;s post here. Specifically: 1) take care not to have special character in your login name (on the MAC developping machine) my name has a &#8220;-&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>After many hours of trying to get xcode to compile to my iphone and having &#8220;Command /usr/bin/codesign failed with exit code 1&#8243; as my only clue, I came across Amilion75&#8242;s post <a href="http://discussions.apple.com/thread.jspa?threadID=1630090">here</a>. Specifically:</p>
<blockquote><p>1) take care not to have special character in your login name (on the MAC developping machine) my name has a &#8220;-&#8221; (minus). The result is CSSMERR_TP_NOT_TRUSTED error when you build your app.</p></blockquote>
<p>So, apparently this problem had nothing to do with the horrendous process of provisioning or plist files (as mostly everything on the internet would have you believe), but simply removing the space in my login name.<br />
<br />
thank you Amilion75. I was ready to pull one of these:<br />
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/HY-03vYYAjA&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/HY-03vYYAjA&amp;hl=en_US&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrdty.com/?feed=rss2&amp;p=197</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>processing doodles: metablobs</title>
		<link>http://www.wrdty.com/?p=187</link>
		<comments>http://www.wrdty.com/?p=187#comments</comments>
		<pubDate>Thu, 05 Aug 2010 19:32:51 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[processing.org]]></category>

		<guid isPermaLink="false">http://www.wrdty.com/?p=187</guid>
		<description><![CDATA[I haven&#8217;t updated in a while, but now I&#8217;m back! Now that I have more time, I&#8217;ll hopefully be able to post more now. The following are some doodles I made last night with Processing. The metablobs are a simple particle system that use RGB values to determine attraction/repulsion. So&#8230; where are the particles and [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t updated in a while, but now I&#8217;m back! Now that I have more time, I&#8217;ll hopefully be able to post more now. </p>
<p>The following are some doodles I made last night with Processing. The metablobs are a simple particle system that use RGB values to determine attraction/repulsion. So&#8230; where are the particles and why isn&#8217;t there any color? It&#8217;s because the particles are mapped to a density map, sort of (I think?) how metaballs work. The result is twichy organic blobs that aren&#8217;t quite balls. </p>
<p><object width="500" height="331"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13902645&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=13902645&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="331"></embed></object><br />
high contrast:<br />
<object width="500" height="331"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13918561&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=13918561&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="331"></embed></object><br />
<span id="more-187"></span><br />
the (not so great) code:</p>
<pre style='color:#000000;background:#ffffff;'><span style='color:#800000; font-weight:bold; '>import</span><span style='color:#004a43; '> processing</span><span style='color:#808030; '>.</span><span style='color:#004a43; '>video</span><span style='color:#808030; '>.</span><span style='color:#800000; font-weight:bold; '>*</span><span style='color:#800080; '>;</span>
MovieMaker mm<span style='color:#808030; '>;</span>
int fcount = 0<span style='color:#808030; '>;</span>
node[] nodes = new node[100]<span style='color:#808030; '>;</span>
float grav = -.5<span style='color:#808030; '>;</span>
float cube = 480<span style='color:#808030; '>;</span>

<span style='color:#800000; font-weight:bold; '>class</span> node<span style='color:#800080; '>{</span>
  <span style='color:#bb7977; '>float</span> x<span style='color:#800080; '>;</span>
  <span style='color:#bb7977; '>float</span> y<span style='color:#800080; '>;</span>
  <span style='color:#bb7977; '>float</span> r<span style='color:#808030; '>,</span> g<span style='color:#808030; '>,</span> b<span style='color:#800080; '>;</span>
  <span style='color:#bb7977; '>float</span> vx<span style='color:#800080; '>;</span>
  <span style='color:#bb7977; '>float</span> vy<span style='color:#800080; '>;</span>
  <span style='color:#bb7977; '>void</span> move<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
    x <span style='color:#808030; '>+</span><span style='color:#808030; '>=</span> vx<span style='color:#800080; '>;</span>
    y <span style='color:#808030; '>+</span><span style='color:#808030; '>=</span> vy<span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>if</span><span style='color:#808030; '>(</span>x <span style='color:#808030; '>></span> width<span style='color:#808030; '>)</span> x <span style='color:#808030; '>=</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>if</span><span style='color:#808030; '>(</span>x <span style='color:#808030; '>&lt;</span> <span style='color:#008c00; '>0</span><span style='color:#808030; '>)</span> x <span style='color:#808030; '>=</span> width<span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>if</span><span style='color:#808030; '>(</span>y <span style='color:#808030; '>></span> height<span style='color:#808030; '>)</span> y <span style='color:#808030; '>=</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>if</span><span style='color:#808030; '>(</span>y <span style='color:#808030; '>&lt;</span> <span style='color:#008c00; '>0</span><span style='color:#808030; '>)</span> y <span style='color:#808030; '>=</span> height<span style='color:#800080; '>;</span>
    vx <span style='color:#808030; '>=</span> vx <span style='color:#808030; '>*</span><span style='color:#008000; '>.9</span><span style='color:#800080; '>;</span>
    vy <span style='color:#808030; '>=</span> vy <span style='color:#808030; '>*</span><span style='color:#008000; '>.9</span><span style='color:#800080; '>;</span>
  <span style='color:#800080; '>}</span>

  <span style='color:#bb7977; '>void</span> changeColor<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
    r <span style='color:#808030; '>=</span> random<span style='color:#808030; '>(</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>50</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    g <span style='color:#808030; '>=</span> random<span style='color:#808030; '>(</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>150</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    b <span style='color:#808030; '>=</span> random<span style='color:#808030; '>(</span><span style='color:#008c00; '>50</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>200</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
  <span style='color:#800080; '>}</span>

  <span style='color:#bb7977; '>float</span> calcAttraction<span style='color:#808030; '>(</span>node n<span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
    <span style='color:#bb7977; '>float</span> diffR <span style='color:#808030; '>=</span> abs<span style='color:#808030; '>(</span>n<span style='color:#808030; '>.</span>r <span style='color:#808030; '>-</span> r<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#bb7977; '>float</span> diffG <span style='color:#808030; '>=</span> abs<span style='color:#808030; '>(</span>n<span style='color:#808030; '>.</span>g <span style='color:#808030; '>-</span> g<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#bb7977; '>float</span> diffB <span style='color:#808030; '>=</span> abs<span style='color:#808030; '>(</span>n<span style='color:#808030; '>.</span>b <span style='color:#808030; '>-</span> b<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#bb7977; '>float</span> diff <span style='color:#808030; '>=</span> map<span style='color:#808030; '>(</span>map<span style='color:#808030; '>(</span>diffR<span style='color:#808030; '>,</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>255</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>)</span> <span style='color:#808030; '>+</span> map<span style='color:#808030; '>(</span>diffG<span style='color:#808030; '>,</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>255</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>)</span> <span style='color:#808030; '>+</span>
                 map<span style='color:#808030; '>(</span>diffB<span style='color:#808030; '>,</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>255</span><span style='color:#808030; '>,</span><span style='color:#808030; '>-</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>)</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>3</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>if</span><span style='color:#808030; '>(</span>dist<span style='color:#808030; '>(</span>x<span style='color:#808030; '>,</span> y<span style='color:#808030; '>,</span> n<span style='color:#808030; '>.</span>x<span style='color:#808030; '>,</span> n<span style='color:#808030; '>.</span>y<span style='color:#808030; '>)</span> <span style='color:#808030; '>&lt;</span> <span style='color:#008c00; '>50</span><span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
      <span style='color:#800000; font-weight:bold; '>if</span><span style='color:#808030; '>(</span>dist<span style='color:#808030; '>(</span>x<span style='color:#808030; '>,</span> y<span style='color:#808030; '>,</span> n<span style='color:#808030; '>.</span>x<span style='color:#808030; '>,</span> n<span style='color:#808030; '>.</span>y<span style='color:#808030; '>)</span> <span style='color:#808030; '>&lt;</span> <span style='color:#008c00; '>20</span><span style='color:#808030; '>)</span> diff <span style='color:#808030; '>=</span> map<span style='color:#808030; '>(</span>diff<span style='color:#808030; '>,</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>3</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>3</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
      vx <span style='color:#808030; '>+</span><span style='color:#808030; '>=</span> <span style='color:#008000; '>.1</span> <span style='color:#808030; '>*</span> diff <span style='color:#808030; '>*</span> <span style='color:#808030; '>(</span>x <span style='color:#808030; '>-</span> n<span style='color:#808030; '>.</span>x<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
      vy <span style='color:#808030; '>+</span><span style='color:#808030; '>=</span> <span style='color:#008000; '>.1</span> <span style='color:#808030; '>*</span> diff <span style='color:#808030; '>*</span> <span style='color:#808030; '>(</span>y <span style='color:#808030; '>-</span> n<span style='color:#808030; '>.</span>y<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
    <span style='color:#800000; font-weight:bold; '>return</span> diff<span style='color:#800080; '>;</span>
  <span style='color:#800080; '>}</span>

  <span style='color:#bb7977; '>void</span> attractCenter<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
    vx <span style='color:#808030; '>+</span><span style='color:#808030; '>=</span> <span style='color:#008000; '>.0001</span> <span style='color:#808030; '>*</span> grav <span style='color:#808030; '>*</span> <span style='color:#808030; '>(</span>x <span style='color:#808030; '>-</span> width<span style='color:#808030; '>/</span><span style='color:#008000; '>2.0</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    vy <span style='color:#808030; '>+</span><span style='color:#808030; '>=</span> <span style='color:#008000; '>.0001</span> <span style='color:#808030; '>*</span> grav <span style='color:#808030; '>*</span> <span style='color:#808030; '>(</span>y <span style='color:#808030; '>-</span> height<span style='color:#808030; '>/</span><span style='color:#008000; '>2.0</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
  <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>

void setup()<span style='color:#800080; '>{</span>
  size<span style='color:#808030; '>(</span><span style='color:#008c00; '>720</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>480</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
  <span style='color:#800000; font-weight:bold; '>for</span><span style='color:#808030; '>(</span><span style='color:#bb7977; '>int</span> i <span style='color:#808030; '>=</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span> i <span style='color:#808030; '>&lt;</span> nodes<span style='color:#808030; '>.</span>length<span style='color:#800080; '>;</span> i<span style='color:#808030; '>+</span><span style='color:#808030; '>+</span><span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
    nodes<span style='color:#808030; '>[</span>i<span style='color:#808030; '>]</span> <span style='color:#808030; '>=</span> <span style='color:#800000; font-weight:bold; '>new</span> node<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    nodes<span style='color:#808030; '>[</span>i<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>x <span style='color:#808030; '>=</span> random<span style='color:#808030; '>(</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span>width<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    nodes<span style='color:#808030; '>[</span>i<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>y <span style='color:#808030; '>=</span> random<span style='color:#808030; '>(</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span>height<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    nodes<span style='color:#808030; '>[</span>i<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>r <span style='color:#808030; '>=</span> random<span style='color:#808030; '>(</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>50</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    nodes<span style='color:#808030; '>[</span>i<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>g <span style='color:#808030; '>=</span> random<span style='color:#808030; '>(</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>150</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    nodes<span style='color:#808030; '>[</span>i<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>b <span style='color:#808030; '>=</span> random<span style='color:#808030; '>(</span><span style='color:#008c00; '>50</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>200</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    nodes<span style='color:#808030; '>[</span>i<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>vx <span style='color:#808030; '>=</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span>
    nodes<span style='color:#808030; '>[</span>i<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>vy <span style='color:#808030; '>=</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span>
  <span style='color:#800080; '>}</span>
  noStroke<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
  background<span style='color:#808030; '>(</span><span style='color:#008c00; '>255</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    mm <span style='color:#808030; '>=</span> <span style='color:#800000; font-weight:bold; '>new</span> MovieMaker<span style='color:#808030; '>(</span><span style='color:#800000; font-weight:bold; '>this</span><span style='color:#808030; '>,</span> width<span style='color:#808030; '>,</span> height<span style='color:#808030; '>,</span> <span style='color:#0000e6; '>"metablob.mov"</span><span style='color:#808030; '>,</span>
                       <span style='color:#008c00; '>30</span><span style='color:#808030; '>,</span> MovieMaker<span style='color:#808030; '>.</span>ANIMATION<span style='color:#808030; '>,</span> MovieMaker<span style='color:#808030; '>.</span>HIGH<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
<span style='color:#800080; '>}</span>

void draw()<span style='color:#800080; '>{</span>
  background<span style='color:#808030; '>(</span><span style='color:#008c00; '>255</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

  <span style='color:#800000; font-weight:bold; '>for</span><span style='color:#808030; '>(</span><span style='color:#bb7977; '>int</span> i <span style='color:#808030; '>=</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span> i <span style='color:#808030; '>&lt;</span> cube<span style='color:#800080; '>;</span> i<span style='color:#808030; '>+</span><span style='color:#808030; '>+</span><span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
    <span style='color:#800000; font-weight:bold; '>for</span><span style='color:#808030; '>(</span><span style='color:#bb7977; '>int</span> j <span style='color:#808030; '>=</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span> j <span style='color:#808030; '>&lt;</span> cube<span style='color:#800080; '>;</span>j<span style='color:#808030; '>+</span><span style='color:#808030; '>+</span><span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
      <span style='color:#bb7977; '>float</span> y <span style='color:#808030; '>=</span> i <span style='color:#808030; '>*</span> <span style='color:#808030; '>(</span>height<span style='color:#808030; '>/</span>cube<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
      <span style='color:#bb7977; '>float</span> x <span style='color:#808030; '>=</span> j <span style='color:#808030; '>*</span> <span style='color:#808030; '>(</span>width<span style='color:#808030; '>/</span>cube<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
      <span style='color:#bb7977; '>float</span> count <span style='color:#808030; '>=</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span>
      <span style='color:#800000; font-weight:bold; '>for</span><span style='color:#808030; '>(</span><span style='color:#bb7977; '>int</span> z <span style='color:#808030; '>=</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span> z <span style='color:#808030; '>&lt;</span> nodes<span style='color:#808030; '>.</span>length<span style='color:#800080; '>;</span> z<span style='color:#808030; '>+</span><span style='color:#808030; '>+</span><span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>if</span><span style='color:#808030; '>(</span>dist<span style='color:#808030; '>(</span>nodes<span style='color:#808030; '>[</span>z<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>x<span style='color:#808030; '>,</span> nodes<span style='color:#808030; '>[</span>z<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>y<span style='color:#808030; '>,</span> x<span style='color:#808030; '>,</span>y<span style='color:#808030; '>)</span> <span style='color:#808030; '>&lt;</span> <span style='color:#008c00; '>200</span><span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
          count<span style='color:#808030; '>+</span><span style='color:#808030; '>=</span>map<span style='color:#808030; '>(</span>dist<span style='color:#808030; '>(</span>nodes<span style='color:#808030; '>[</span>z<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>x<span style='color:#808030; '>,</span> nodes<span style='color:#808030; '>[</span>z<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>y<span style='color:#808030; '>,</span> x<span style='color:#808030; '>,</span>y<span style='color:#808030; '>)</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>200</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>20</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#800080; '>}</span>
      <span style='color:#800080; '>}</span>
      fill<span style='color:#808030; '>(</span>count<span style='color:#808030; '>,</span>count<span style='color:#808030; '>,</span>count<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
      rect<span style='color:#808030; '>(</span>x<span style='color:#808030; '>,</span>y<span style='color:#808030; '>,</span>width<span style='color:#808030; '>/</span>cube<span style='color:#808030; '>,</span>height<span style='color:#808030; '>/</span>cube<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>

  <span style='color:#800080; '>}</span>
  stroke<span style='color:#808030; '>(</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
  noFill<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>for</span><span style='color:#808030; '>(</span><span style='color:#bb7977; '>int</span> i <span style='color:#808030; '>=</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span> i <span style='color:#808030; '>&lt;</span> nodes<span style='color:#808030; '>.</span>length<span style='color:#800080; '>;</span> i<span style='color:#808030; '>+</span><span style='color:#808030; '>+</span><span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
      <span style='color:#800000; font-weight:bold; '>for</span><span style='color:#808030; '>(</span><span style='color:#bb7977; '>int</span> j <span style='color:#808030; '>=</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span> j <span style='color:#808030; '>&lt;</span> nodes<span style='color:#808030; '>.</span>length<span style='color:#800080; '>;</span> j<span style='color:#808030; '>+</span><span style='color:#808030; '>+</span><span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
       <span style='color:#800000; font-weight:bold; '>if</span><span style='color:#808030; '>(</span>i<span style='color:#808030; '>!</span><span style='color:#808030; '>=</span>j<span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
         <span style='color:#bb7977; '>float</span> diff <span style='color:#808030; '>=</span> nodes<span style='color:#808030; '>[</span>i<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>calcAttraction<span style='color:#808030; '>(</span>nodes<span style='color:#808030; '>[</span>j<span style='color:#808030; '>]</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        <span style='color:#800080; '>}</span>
    <span style='color:#800080; '>}</span>
    nodes<span style='color:#808030; '>[</span>i<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>move<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    nodes<span style='color:#808030; '>[</span>i<span style='color:#808030; '>]</span><span style='color:#808030; '>.</span>attractCenter<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
  <span style='color:#800080; '>}</span>
  noStroke<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
  <span style='color:#696969; '>/*for adding contrast</span>
<span style='color:#696969; '>&#xa0;&#xa0;loadPixels();</span>
<span style='color:#696969; '>&#xa0;&#xa0;for(int i = 0; i &lt; width * height; i++){</span>
<span style='color:#696969; '>&#xa0;&#xa0;&#xa0;&#xa0;color curPixel = pixels[i];</span>
<span style='color:#696969; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;if(pixels[i] == color(255,255,255)){</span>
<span style='color:#696969; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;pixels[i] = color(0,0,0);</span>
<span style='color:#696969; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;} else {</span>
<span style='color:#696969; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;pixels[i] = color(255,255,255);</span>
<span style='color:#696969; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;}</span>
<span style='color:#696969; '>&#xa0;&#xa0;}</span>
<span style='color:#696969; '>&#xa0;&#xa0;updatePixels();*/</span>
  mm<span style='color:#808030; '>.</span>addFrame<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
  fcount<span style='color:#808030; '>+</span><span style='color:#808030; '>+</span><span style='color:#800080; '>;</span>
  println<span style='color:#808030; '>(</span>fcount<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
<span style='color:#800080; '>}</span>

void mouseReleased()<span style='color:#800080; '>{</span>
  grav <span style='color:#808030; '>=</span> <span style='color:#808030; '>-</span>grav<span style='color:#800080; '>;</span>
<span style='color:#800080; '>}</span>

void keyPressed() <span style='color:#800080; '>{</span>
  <span style='color:#800000; font-weight:bold; '>if</span> <span style='color:#808030; '>(</span>key <span style='color:#808030; '>=</span><span style='color:#808030; '>=</span> <span style='color:#0000e6; '>' '</span><span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
    mm<span style='color:#808030; '>.</span>finish<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
  <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wrdty.com/?feed=rss2&amp;p=187</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DESKTOP 0</title>
		<link>http://www.wrdty.com/?p=179</link>
		<comments>http://www.wrdty.com/?p=179#comments</comments>
		<pubDate>Sun, 08 Nov 2009 09:37:08 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[openframeworks]]></category>

		<guid isPermaLink="false">http://www.wrdty.com/?p=179</guid>
		<description><![CDATA[download the executable here. requires os x 10.5+ sorry!]]></description>
			<content:encoded><![CDATA[<p><object width="500" height="313"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7497525&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7497525&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="313"></embed></object></p>
<p>download the executable <a href="http://www.nikhanselmann.com/projects/desktop0/desktop0.zip">here</a>. requires os x 10.5+ sorry!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrdty.com/?feed=rss2&amp;p=179</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>while looking to register some new domains&#8230;</title>
		<link>http://www.wrdty.com/?p=176</link>
		<comments>http://www.wrdty.com/?p=176#comments</comments>
		<pubDate>Fri, 16 Oct 2009 07:15:16 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wrdty.com/?p=176</guid>
		<description><![CDATA[Gee, thanks!]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-175" title="screen-shot-2009-10-16-at-121318-am" src="http://www.wrdty.com/wp-content/uploads/2009/10/screen-shot-2009-10-16-at-121318-am.png" alt="screen-shot-2009-10-16-at-121318-am" width="338" height="57" /><br />
Gee, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrdty.com/?feed=rss2&amp;p=176</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>failbase @ full disclosure</title>
		<link>http://www.wrdty.com/?p=167</link>
		<comments>http://www.wrdty.com/?p=167#comments</comments>
		<pubDate>Wed, 07 Oct 2009 00:04:03 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wrdty.com/?p=167</guid>
		<description><![CDATA[Nick Lally and will have a piece in Full Disclosure, a show opening tomorrow in the Sesnon gallery at UCSC. Look at dat pretty Epson TM-88 III. Big thanks to all the information available at http://microprinter.pbworks.com/ Failbase 831.xxx.4046 is a system for the collection and output of participant testimonies of failure. By leaving voicemail or [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-168  aligncenter" title="failbase" src="http://www.wrdty.com/wp-content/uploads/2009/10/failbase.png" alt="failbase" width="350" height="467" /></p>
<p><a href="http://nicklally.com">Nick Lally</a> and will have a piece in <a href="http://arts.ucsc.edu/sesnon/exhibitions/2009/fulldisclosure/indexfull.html">Full Disclosure</a>, a show opening tomorrow in the <a href="http://arts.ucsc.edu/sesnon/">Sesnon gallery at UCSC.</a> Look at dat pretty Epson TM-88 III. Big thanks to all the information available at <a href="http://microprinter.pbworks.com/">http://microprinter.pbworks.com/</a></p>
<p><a href="http://arts.ucsc.edu/sesnon/"> </a></p>
<blockquote><p>Failbase 831.xxx.4046 is a system for the collection and output of participant testimonies of failure. By leaving voicemail or sending SMS (text) messages to (831) xxx-4046, participants can submit their failures. As they speak or type, the failures are printed in the gallery as paper receipts. Visitors to the gallery space are encouraged to submit their own failures, as well as to read, cut, notate and file incoming failures according to how they see fit.</p>
<p>Failbase 831.xxx.4046 was conceived and created by Digital Arts and New Media graduate students Nik Hanselmann and Nick Lally under the auspices of E.G. Crichton who invited them to be part of Archive of What’s Left Behind.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.wrdty.com/?feed=rss2&amp;p=167</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>comments</title>
		<link>http://www.wrdty.com/?p=158</link>
		<comments>http://www.wrdty.com/?p=158#comments</comments>
		<pubDate>Tue, 06 Oct 2009 05:53:24 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wrdty.com/?p=158</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-full wp-image-164" title="screen-shot-2009-10-05-at-73309-pm" src="http://www.wrdty.com/wp-content/uploads/2009/10/screen-shot-2009-10-05-at-73309-pm.png" alt="screen-shot-2009-10-05-at-73309-pm" width="575" height="204" /></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-157" title="screen-shot-2009-10-05-at-65726-pm" src="http://www.wrdty.com/wp-content/uploads/2009/10/screen-shot-2009-10-05-at-65726-pm.png" alt="screen-shot-2009-10-05-at-65726-pm" width="553" height="220" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrdty.com/?feed=rss2&amp;p=158</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>how to scrape AXIS webcams with Processing</title>
		<link>http://www.wrdty.com/?p=148</link>
		<comments>http://www.wrdty.com/?p=148#comments</comments>
		<pubDate>Wed, 05 Aug 2009 01:38:50 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[processing.org]]></category>

		<guid isPermaLink="false">http://www.wrdty.com/?p=148</guid>
		<description><![CDATA[AXIS webcams are fun to play with because they are generally pretty easy to google, have fast feeds (depending), and sometimes allow user control. Of the thousands of AXIS cams online many of them are public. A somewhat well known trick to turn up thousands of AXIS cameras is to google for: intitle:"Live View / [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-152  aligncenter" title="axis" src="http://www.wrdty.com/wp-content/uploads/2009/08/axis.png" alt="axis" width="360" height="302" /></p>
<p><a href="http://www.axis.com/">AXIS webcams</a> are fun to play with because they are generally pretty easy to google, have fast feeds (depending), and sometimes allow user control. Of the thousands of AXIS cams online many of them are public. A somewhat well known trick to turn up thousands of AXIS cameras is to <a href="http://www.google.com/search?client=safari&amp;rls=en-us&amp;q=intitle:%22Live+View+/+-+AXIS%22+%7C+inurl:view/view.shtml%5E&amp;ie=UTF-8&amp;oe=UTF-8">google</a> for:</p>
<pre>intitle:"Live View / - AXIS" | inurl:view/view.shtml^</pre>
<p>Which will turn up thousands of (mostly) boring feeds. Every once in a while however, something really interesting turns up that you may want to scrape for some reason or another. The typical URL result for the cam is something like:</p>
<pre>http://191.22.175.200/view/view.shtml <span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, -webkit-fantasy; line-height: 19px; white-space: normal; font-size: 13px;">(this URL doesn't work btw)</span></pre>
<p>Which sometimes displays an image in mjpeg format and sometimes displayed with a cgi script. A cool thing the cams do (and cool if you want to scrape) is catalogue all previous images on a server somewhere. This means that if the cam is displaying a mjpeg which is a pain to deal with, never fear! To access plain ol&#8217; jpegs from AXIS web software you need to look here:</p>
<pre>http://191.22.175.200/jpg/1/image.jpg?(UNIX TIME)</pre>
<p>Where the <a href="http://en.wikipedia.org/wiki/Unix_time">Unix time</a> is generally a big number. This makes the whole process pretty simple from here on out, as that is simply the location you need to query to get fairly up-to-date images from that camera. The directory structures sometimes change, and sometimes finding the jpeg URL is as simple as viewing the source of the AXIS camera page. Also, especially on faster camera feeds, the main AXIS page occasionally links to a mjpeg which is tricky to deal with.</p>
<p>Processing sketch:</p>
<pre style="color:#000000;background:#ffffff;"><span style="color:#696969; ">//scrape AXIS web cameras with processing.</span>
<span style="color:#696969; ">//please don't be a jerk with this sketch.</span>

<span style="color:#800000; font-weight:bold; ">import</span> java<span style="color:#808030; ">.</span>util<span style="color:#808030; ">.</span>Date<span style="color:#800080; ">;</span>
PImage cam<span style="color:#800080; ">;</span>
Date d<span style="color:#800080; ">;</span>
<span style="color:#800000; font-weight:bold; ">float</span> last_millis<span style="color:#800080; ">;</span>

<span style="color:#800000; font-weight:bold; ">void</span> setup<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">{</span>
  size<span style="color:#808030; ">(</span><span style="color:#008c00; ">320</span><span style="color:#808030; ">,</span><span style="color:#008c00; ">240</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span>
  d <span style="color:#808030; ">=</span> <span style="color:#800000; font-weight:bold; ">new</span> Date<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span>
<span style="color:#800080; ">}</span>

<span style="color:#800000; font-weight:bold; ">void</span> draw<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">{</span>
  cam <span style="color:#808030; ">=</span> loadImage<span style="color:#808030; ">(</span><span style="color:#800000; ">"</span><span style="color:#0000e6; ">http://somedomain/jpg/1/image.jpg?</span><span style="color:#800000; ">"</span><span style="color:#808030; ">+</span>d<span style="color:#808030; ">.</span>getTime<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span>
  image<span style="color:#808030; ">(</span>cam<span style="color:#808030; ">,</span> <span style="color:#008c00; ">0</span><span style="color:#808030; ">,</span><span style="color:#008c00; ">0</span><span style="color:#808030; ">,</span><span style="color:#008c00; ">320</span><span style="color:#808030; ">,</span> <span style="color:#008c00; ">240</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span>
  last_millis <span style="color:#808030; ">=</span> last_millis <span style="color:#808030; ">-</span> millis<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span>
  println<span style="color:#808030; ">(</span>last_millis<span style="color:#808030; ">)</span><span style="color:#800080; ">;</span>
  last_millis <span style="color:#808030; ">=</span> millis<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#800080; ">;</span>
<span style="color:#800080; ">}</span></pre>
<p>Pretty simple right? All the math with milliseconds can be deleted, the code is there to see the difference in time between the last time an image was downloaded. Downloading discreet jpegs causes some lag and is a lot slower than using a conventional browser. Also, remember that d.getTime() gets the current Unix time &#8212; you can always change that to whatever, assuming the webcam existed at that point.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrdty.com/?feed=rss2&amp;p=148</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
