<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: towards the within: steering code</title>
	<atom:link href="http://www.wblut.com/2008/05/21/towards-the-within-toying-with-steering-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wblut.com/2008/05/21/towards-the-within-toying-with-steering-code/</link>
	<description>Experiments in generative graphics</description>
	<lastBuildDate>Wed, 14 Jul 2010 11:46:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Morgan</title>
		<link>http://www.wblut.com/2008/05/21/towards-the-within-toying-with-steering-code/comment-page-1/#comment-4596</link>
		<dc:creator>Morgan</dc:creator>
		<pubDate>Thu, 12 Mar 2009 04:52:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.wblut.com/?p=37#comment-4596</guid>
		<description>Ahh, I see.  Nifty trick.  So in &quot;Toward #6&quot; (I like that one best) your offset is 0, but your light circle size is fixed at 4, where your colored circle is size 2.  This makes it appear like the light source is directly overhead in the z axis or that the shoestrings are semi-transparent?  I also like the &quot;fuzz&quot; growing out at the tangents on this one.  I&#039;ll give this a try.  If I come up with anything interesting, I&#039;ll send you a link.

Thanks for the explanation.

-m</description>
		<content:encoded><![CDATA[<p>Ahh, I see.  Nifty trick.  So in “Toward #6″ (I like that one best) your offset is 0, but your light circle size is fixed at 4, where your colored circle is size 2.  This makes it appear like the light source is directly overhead in the z axis or that the shoestrings are semi-transparent?  I also like the “fuzz” growing out at the tangents on this one.  I’ll give this a try.  If I come up with anything interesting, I’ll send you a link.</p>
<p>Thanks for the explanation.</p>
<p>–m</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frederik Vanhoutte</title>
		<link>http://www.wblut.com/2008/05/21/towards-the-within-toying-with-steering-code/comment-page-1/#comment-4591</link>
		<dc:creator>Frederik Vanhoutte</dc:creator>
		<pubDate>Tue, 10 Mar 2009 22:50:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.wblut.com/?p=37#comment-4591</guid>
		<description>Hi morgan,

thanks for the kind comment. It&#039;s true that most code is uncommented. This is because it&#039;s rough-and-tumble, stream-of-consciousness code. A &quot;sketch&quot; in the true sense of the word.

The 3D-effect is actually relatively simple to achieve. The moving particles are rendered as small circles and drawn over the previous frame. The step size is kept small so there&#039;s a lot of overlap between two steps. To add the 3D-like emboss, you need to draw everything twice. Once with a slight shift and in a &quot;light&quot; color, and then once again, now in the particle color and without the shift.  This way you get the rendered circle with a small &quot;light&quot; border in the direction of the shift. If the step size is small enough you get the shoestring illusion.

You can find this in the code:

      &lt;code&gt;fill(255,120); // white fill
      ellipse(tracers[t].pos.x+light.x,tracers[t].pos.y+light.y,3,3);// white fill is offset by (light.x, light.y)
      fill(0,120); // black fill
      ellipse(tracers[t].pos.x,tracers[t].pos.y,3,3); // draw the particle&lt;/code&gt;

In this case, the light offset is fixed for all particles, giving the illusion of a light source far away in that direction. Another piece, &lt;a href=&quot;http://www.wblut.com/haywire.php&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;haywire&lt;/a&gt; gives the illusion of a central lightsource. This is achieved by varying the shift according to the particle position. E.g. a particle on the lower-right will have its light fill shifted to the upper-left, etc...</description>
		<content:encoded><![CDATA[<p>Hi morgan,</p>
<p>thanks for the kind comment. It’s true that most code is uncommented. This is because it’s rough-and-tumble, stream-of-consciousness code. A “sketch” in the true sense of the word.</p>
<p>The 3D-effect is actually relatively simple to achieve. The moving particles are rendered as small circles and drawn over the previous frame. The step size is kept small so there’s a lot of overlap between two steps. To add the 3D-like emboss, you need to draw everything twice. Once with a slight shift and in a “light” color, and then once again, now in the particle color and without the shift.  This way you get the rendered circle with a small “light” border in the direction of the shift. If the step size is small enough you get the shoestring illusion.</p>
<p>You can find this in the code:</p>
<p>      <code>fill(255,120); // white fill<br />
      ellipse(tracers[t].pos.x+light.x,tracers[t].pos.y+light.y,3,3);// white fill is offset by (light.x, light.y)<br />
      fill(0,120); // black fill<br />
      ellipse(tracers[t].pos.x,tracers[t].pos.y,3,3); // draw the particle</code></p>
<p>In this case, the light offset is fixed for all particles, giving the illusion of a light source far away in that direction. Another piece, <a href="http://www.wblut.com/haywire.php" target="_blank" rel="nofollow" class="liinternal">haywire</a> gives the illusion of a central lightsource. This is achieved by varying the shift according to the particle position. E.g. a particle on the lower-right will have its light fill shifted to the upper-left, etc…</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Morgan</title>
		<link>http://www.wblut.com/2008/05/21/towards-the-within-toying-with-steering-code/comment-page-1/#comment-4589</link>
		<dc:creator>Morgan</dc:creator>
		<pubDate>Tue, 10 Mar 2009 21:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.wblut.com/?p=37#comment-4589</guid>
		<description>I really like all these examples, and appreciate that you&#039;ve included the code. I am very new to Processing and was wondering how you achieved the 3-d “shoestring” effect of your tracers.  From the code it looks like they are composed of lines and a couple of ellipses?  Can you describe this in more detail, or maybe add some comments to the code?

Great work!  I love the site.

-m</description>
		<content:encoded><![CDATA[<p>I really like all these examples, and appreciate that you’ve included the code. I am very new to Processing and was wondering how you achieved the 3-d “shoestring” effect of your tracers.  From the code it looks like they are composed of lines and a couple of ellipses?  Can you describe this in more detail, or maybe add some comments to the code?</p>
<p>Great work!  I love the site.</p>
<p>–m</p>
]]></content:encoded>
	</item>
</channel>
</rss>
