<?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/"
	>

<channel>
	<title>lab.joelGillman.com</title>
	<atom:link href="http://lab.joelgillman.com/feed" rel="self" type="application/rss+xml" />
	<link>http://lab.joelgillman.com</link>
	<description>Sketches, Code Bites and Toys</description>
	<pubDate>Tue, 30 Sep 2008 17:23:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Map Function</title>
		<link>http://lab.joelgillman.com/archives/87_map-function</link>
		<comments>http://lab.joelgillman.com/archives/87_map-function#comments</comments>
		<pubDate>Mon, 29 Sep 2008 22:39:41 +0000</pubDate>
		<dc:creator>joel gillman</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[actionscript]]></category>

		<category><![CDATA[AS3]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[function]]></category>

		<category><![CDATA[map]]></category>

		<category><![CDATA[normalize]]></category>

		<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://lab.joelgillman.com/?p=87</guid>
		<description><![CDATA[If you&#8217;ve ever used Processing you&#8217;ve probably used the &#8216;map&#8217; function.  From the Processing Reference section it reads: &#8220;Re-maps a number from one range to another. In the example above, the number &#8216;25&#8242; is converted from a value in the range 0..100 into a value that ranges from the left edge (0) to the [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever used <a href="http://www.processing.org/">Processing</a> you&#8217;ve probably used the &#8216;map&#8217; function.  From the Processing Reference section it <a href="http://processing.org/reference/map_.html">reads</a>: &#8220;Re-maps a number from one range to another. In the example above, the number &#8216;25&#8242; is converted from a value in the range 0..100 into a value that ranges from the left edge (0) to the right edge (width) of the screen.&#8221;</p>
<p><span id="more-87"></span>Unfortunately the function doesn&#8217;t exist in Flash, so I rewrote it.  Why is this function useful?  Lets say your mouse can move within the bounds of your stage from 0 to 550 pixels along its x-axis.  You want a box to move back and forth from 100 to 200 pixels according to the position of the mouse.  So when your mouse is halfway across the stage your box should be halfway between 100 and 200 pixels.  You would simply use:</p>
<div class="codecolorer-container actionscript3" style="height:35px;"><div class="codecolorer" style="font-family: monospace;">myBox.<span class="kw3">x</span> = map<span class="br0">&#40;</span><span class="kw3">mouseX</span>, <span class="nu0">0</span>, <span class="nu0">550</span>, <span class="nu0">100</span>, <span class="nu0">200</span><span class="br0">&#41;</span>;</div></div>
<p>Easy as that!</p>
<p>Usage:<br />
map(value, low1, high1, low2, high2);<br />
<em>low2 and high2 default to 0 and 1, respectively so you don&#8217;t have to put them in if you just want to normalize your value.</em></p>
<div class="codecolorer-container actionscript3"><div class="codecolorer" style="font-family: monospace;"><span class="kw2">function</span> map<span class="br0">&#40;</span>value:<span class="kw3">Number</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; low1:<span class="kw3">Number</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; high1:<span class="kw3">Number</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; low2:<span class="kw3">Number</span> = <span class="nu0">0</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; high2:<span class="kw3">Number</span> = <span class="nu0">1</span><span class="br0">&#41;</span>:<span class="kw3">Number</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="co1">//if the value and the 1st range low are equal to</span><br />
&nbsp; &nbsp; <span class="co1">// the new value must be low2</span><br />
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>value == low1<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> low2;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co1">//normalize both sets to a 0-? range</span><br />
&nbsp; &nbsp; <span class="kw2">var</span> range1 = high1 - low1;<br />
&nbsp; &nbsp; <span class="kw2">var</span> range2 = high2 - low2;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co1">//normalize the value to the new normalized range</span><br />
&nbsp; &nbsp; <span class="kw2">var</span> result = value - low1;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co1">//define the range as a percentage (0.0 to 1.0)</span><br />
&nbsp; &nbsp; <span class="kw2">var</span> ratio = result / range1;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co1">//find the value in the new normalized-range</span><br />
&nbsp; &nbsp; result = ratio * range2;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co1">//un-normalize the value in the new range</span><br />
&nbsp; &nbsp; result += low2;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">return</span> result;<br />
<span class="br0">&#125;</span></div></div>
<p>And super compressed (less readable, less space, works the same):</p>
<div class="codecolorer-container actionscript3"><div class="codecolorer" style="font-family: monospace;"><span class="kw2">function</span> map<span class="br0">&#40;</span>v:<span class="kw3">Number</span>, a:<span class="kw3">Number</span>, b:<span class="kw3">Number</span>, <span class="kw3">x</span>:<span class="kw3">Number</span> = <span class="nu0">0</span>, <span class="kw3">y</span>:<span class="kw3">Number</span> = <span class="nu0">1</span><span class="br0">&#41;</span>:<span class="kw3">Number</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw1">return</span> <span class="br0">&#40;</span>v == a<span class="br0">&#41;</span> ? <span class="kw3">x</span> : <span class="br0">&#40;</span>v - a<span class="br0">&#41;</span> * <span class="br0">&#40;</span><span class="kw3">y</span> - <span class="kw3">x</span><span class="br0">&#41;</span> / <span class="br0">&#40;</span>b - a<span class="br0">&#41;</span> + <span class="kw3">x</span>;<br />
<span class="br0">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://lab.joelgillman.com/archives/87_map-function/feed</wfw:commentRss>
		</item>
		<item>
		<title>Why You Should Embed Your Fonts</title>
		<link>http://lab.joelgillman.com/archives/73_why-you-should-embed-your-fonts</link>
		<comments>http://lab.joelgillman.com/archives/73_why-you-should-embed-your-fonts#comments</comments>
		<pubDate>Mon, 22 Sep 2008 22:52:36 +0000</pubDate>
		<dc:creator>joel gillman</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lab.joelgillman.com/?p=73</guid>
		<description><![CDATA[I think this should go without saying, but not everyone knows how to do this.  First I randomly downloaded a font from dafont.com to make sure that I would be using a font that 99% of people didn&#8217;t have.  If you check out the Flash below you can see that the top text [...]]]></description>
			<content:encoded><![CDATA[<p>I think this should go without saying, but not everyone knows how to do this.  First I randomly downloaded a font from <a href="http://www.dafont.com/">dafont.com</a> to make sure that I would be using a font that 99% of people didn&#8217;t have.  If you check out the Flash below you can see that the top text field is using some crazy bitmap-esque font.  The text field on the bottom is actually using the same font but since I created it on the stage by hand (rather than dynamically with my code) it is probably displaying Times New Roman.  Or some other default serif typeface.  The the source code for a commented explanation.<br />
<span id="more-73"></span></p>
<div id="flashcontent"></div>
<p><script type="text/javascript">
		var flashvars = {};
		var params = {};
		params.menu = "false";
		var attributes = {};
		swfobject.embedSWF("http://lab.joelgillman.com/thepress/wp-content/uploads/2008/09/embed_font01.swf", "flashcontent", "450", "400", "9.0.0", false, flashvars, params, attributes);
	</script></p>
<p>AS3 Code:</p>
<div class="codecolorer-container actionscript3"><div class="codecolorer" style="font-family: monospace;"><span class="kw3">import</span> <span class="kw3">flash</span>.<span class="me1">display</span>.<span class="me1">Sprite</span>;<br />
<br />
<span class="kw3">import</span> <span class="kw3">flash</span>.<span class="kw3">text</span>.<span class="me1">AntiAliasType</span>;<br />
<span class="kw3">import</span> <span class="kw3">flash</span>.<span class="kw3">text</span>.<span class="kw3">Font</span>;<br />
<span class="kw3">import</span> <span class="kw3">flash</span>.<span class="kw3">text</span>.<span class="me1">FontStyle</span>;<br />
<span class="kw3">import</span> <span class="kw3">flash</span>.<span class="kw3">text</span>.<span class="me1">FontType</span>;<br />
<span class="kw3">import</span> <span class="kw3">flash</span>.<span class="kw3">text</span>.<span class="kw3">TextField</span>;<br />
<span class="kw3">import</span> <span class="kw3">flash</span>.<span class="kw3">text</span>.<span class="kw3">TextFormat</span>;<br />
<span class="kw3">import</span> <span class="kw3">flash</span>.<span class="kw3">text</span>.<span class="me1">TextFormatAlign</span>;<br />
<span class="kw3">import</span> <span class="kw3">flash</span>.<span class="kw3">text</span>.<span class="me1">TextRenderer</span>;<br />
<br />
<br />
<span class="kw2">var</span> format:<span class="kw3">TextFormat</span> = <span class="kw2">new</span> <span class="kw3">TextFormat</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<span class="kw2">var</span> <span class="kw3">font</span>:<span class="kw3">Font</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= <span class="kw2">new</span> bitmapRegular36<span class="br0">&#40;</span><span class="br0">&#41;</span>; <span class="co1">//use the linkage name for the font in the library</span><br />
<span class="kw2">var</span> <span class="kw3">size</span>:<span class="kw3">Number</span>&nbsp; &nbsp; &nbsp; &nbsp;= <span class="nu0">36</span>;<br />
<br />
<br />
<span class="kw2">function</span> init<span class="br0">&#40;</span><span class="br0">&#41;</span>:<span class="kw3">void</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; format = makeTextFormat<span class="br0">&#40;</span><span class="kw3">size</span>, <span class="kw3">font</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; makeTextField<span class="br0">&#40;</span><span class="st0">&quot;This ridiculous font is dynamicly embedded.&quot;</span>, format<span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
<br />
<span class="kw2">function</span> makeTextFormat<span class="br0">&#40;</span>__size:<span class="kw3">Number</span>, __font:<span class="kw3">Font</span><span class="br0">&#41;</span>:<span class="kw3">TextFormat</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw2">var</span> result:<span class="kw3">TextFormat</span> = <span class="kw2">new</span> <span class="kw3">TextFormat</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; result.<span class="kw3">font</span>&nbsp; &nbsp; &nbsp;= __font.<span class="me1">fontName</span>;<br />
&nbsp; &nbsp; result.<span class="kw3">size</span>&nbsp; &nbsp; &nbsp;= __size;<br />
&nbsp; &nbsp; result.<span class="me1">kerning</span>&nbsp; = <span class="kw2">true</span>; <span class="co1">//not availible for non-embedded fonts</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">return</span> result;<br />
&nbsp;<span class="br0">&#125;</span><br />
<br />
<span class="kw2">function</span> makeTextField<span class="br0">&#40;</span>_inputText:<span class="kw3">String</span>, __format:<span class="kw3">TextFormat</span>, __x:<span class="kw3">Number</span> = <span class="nu0">0</span>, __y:<span class="kw3">Number</span> = <span class="nu0">0</span><span class="br0">&#41;</span>:<span class="kw3">void</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw2">var</span> tf:<span class="kw3">TextField</span> = <span class="kw2">new</span> <span class="kw3">TextField</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; tf.<span class="kw3">x</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = __x;<br />
&nbsp; &nbsp; tf.<span class="kw3">y</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = __y;<br />
&nbsp; &nbsp; tf.<span class="kw3">width</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span class="nu0">450</span>;<br />
&nbsp; &nbsp; tf.<span class="kw3">height</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= <span class="nu0">200</span>;<br />
&nbsp; &nbsp; tf.<span class="kw3">type</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= TextFieldType.<span class="me1">INPUT</span>;<br />
&nbsp; &nbsp; tf.<span class="kw3">wordWrap</span>&nbsp; &nbsp; &nbsp; &nbsp;= <span class="kw2">true</span>;<br />
&nbsp; &nbsp; tf.<span class="kw3">multiline</span>&nbsp; &nbsp; &nbsp; = <span class="kw2">true</span>;<br />
&nbsp; &nbsp; tf.<span class="kw3">selectable</span>&nbsp; &nbsp; &nbsp;= <span class="kw2">true</span>;<br />
&nbsp; &nbsp; tf.<span class="kw3">embedFonts</span>&nbsp; &nbsp; &nbsp;= <span class="kw2">true</span>;<br />
&nbsp; &nbsp; tf.<span class="me1">antiAliasType</span>&nbsp; = AntiAliasType.<span class="me1">ADVANCED</span>; <span class="co1">//not availible for non-embedded fonts</span><br />
&nbsp; &nbsp; tf.<span class="me1">gridFitType</span>&nbsp; &nbsp; = GridFitType.<span class="me1">PIXEL</span>; <span class="co1">//not availible for non-embedded fonts</span><br />
&nbsp; &nbsp; tf.<span class="kw3">text</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= _inputText;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co1">//as a general rule, set the textFormat last</span><br />
&nbsp; &nbsp; tf.<span class="kw3">setTextFormat</span><span class="br0">&#40;</span>__format<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw3">addChild</span><span class="br0">&#40;</span>tf<span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
<br />
<span class="co1">//start</span><br />
init<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div></div>
<p>Download the <a href="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/09/embedded_font_demo.zip">source</a>.</p>
<p>Original font by <a href="http://www.dafont.com/sam-derrick.d1882">Sam Derrick</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.joelgillman.com/archives/73_why-you-should-embed-your-fonts/feed</wfw:commentRss>
		</item>
		<item>
		<title>False 3D in Flash: Displacement Maps</title>
		<link>http://lab.joelgillman.com/archives/30_false-3d-in-flash-displacement-maps</link>
		<comments>http://lab.joelgillman.com/archives/30_false-3d-in-flash-displacement-maps#comments</comments>
		<pubDate>Wed, 17 Sep 2008 21:53:48 +0000</pubDate>
		<dc:creator>joel gillman</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[AS3]]></category>

		<category><![CDATA[displacement mapping]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[photoshop]]></category>

		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://lab.joelgillman.com/?p=30</guid>
		<description><![CDATA[After seeing a post on the Puny Blog about displacement maps I became interested in how they did it.  Unfortunately there wasn&#8217;t any source code so I&#8217;ve replicated the effect from scratch.
Turns out displacement maps are really hard to wrap your head around, so I&#8217;ll try to explain it very carefully and slowly.

I feel [...]]]></description>
			<content:encoded><![CDATA[<p>After seeing a <a href="http://www.punyblog.com/2008/08/displacement-map-filter.html">post</a> on the Puny Blog about displacement maps I became interested in how they did it.  Unfortunately there wasn&#8217;t any source code so I&#8217;ve replicated the effect from scratch.<br />
Turns out displacement maps are really hard to wrap your head around, so I&#8217;ll try to explain it very carefully and slowly.<br />
<span id="more-30"></span><br />
I feel that Wikipedia is always a good place to start:</p>
<blockquote><p><b>Displacement mapping</b> is an alternative computer graphics technique in contrast to <a href="/wiki/Bump_mapping" title="Bump mapping">bump mapping</a>, <a href="/wiki/Normal_mapping" title="Normal mapping">normal mapping</a>, and <a href="/wiki/Parallax_mapping" title="Parallax mapping">parallax mapping</a>, using a (<a href="/wiki/Procedural_texture" title="Procedural texture">procedural</a>-) <a href="/wiki/Texture_mapping" title="Texture mapping">texture-</a> or <a href="/wiki/Heightmap" title="Heightmap">height map</a> to cause an effect where the actual geometric position of points over the textured surface are <i>displaced</i>, often along the <a href="/wiki/Locally" title="Locally" class="mw-redirect">local</a> <a href="/wiki/Surface_normal" title="Surface normal">surface normal</a>, according to the value the texture function evaluates to at each point on the surface. It gives surfaces a great sense of depth and detail, permitting in particular self-occlusion, self-shadowing and silhouettes; on the other hand, it is the most costly of this class of techniques owing to the large amount of additional geometry.</p></blockquote>
<p>Displacement maps are commonly used in 3D programs to make complicated geometry using simple 2D images.  In those programs it actually morphs objects in a 3D-space (along a z-axis).  But in our (so far) 2D flash world, it&#8217;s easier to think of the displacement maps as <a href="http://www.edwardsamuels.com/illustratedstory/chapter%204/goo%20-%20mona%20lisa.jpg">distortion</a>.  In plain English, you distort an image using a separate gray scale image.</p>
<p>I&#8217;m a visual thinker so I drew it out in my sketch book first:<br />
<img src="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/09/displacement_breakthrough.png" alt="" title="displacement_breakthrough" width="450" height="275" class="alignnone size-full wp-image-35" /><br />
This is the distortion I wanted to achieve.  If you can&#8217;t read my chicken scratch it says, &#8220;x: -30 to 0 to +30&#8243;.  Meaning that if every square were for 5 pixels, at the grid&#8217;s most distorted point the bottom-left point would be offset by -30 pixels along it&#8217;s &#8216;x&#8217; axis while the bottom-right point is offset by +30 pixels.  The bottom-middle is not offset along the &#8216;x&#8217; axis.</p>
<p><img src="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/09/photoshop_channles.png" alt="" title="photoshop_channels" width="222" height="180" class="alignright size-full wp-image-48" />After drawing out and writing down what would happen to each pixel, translating it into a gradient was pretty easy.  A gray scale image consists of 255 levels, 0 being black and 255 being white.  If you&#8217;re reading this you probably already know that.  You also know that any digital image is made up of three channels: Red, green and blue.  In Photoshop, you can see these channels individually by opening the channels window.  This will be important, or at least handy to know later.  SO, converting those levels into hex you get 00 (black, -30px offset), 80 (middle gray, 0 offset) and FF (white, +30 offset).</p>
<p>I didn&#8217;t want the whole image to be distorted, so part of the image needed to remain unchanged.  This is where the middle-gray comes in.  The gray fades in from the bottom to about a third of the way up the image and from there it is the same even color all the way up.<br />
<img src="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/09/displacement02.png" alt="" title="My second, more successful attempt" width="450" height="327" class="alignnone size-full wp-image-35" /></p>
<p>If you break it out into channels you get this:<br />
<img src="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/09/displacement02_breakout.png" alt="" title="Channel breakout of the displacement map" width="450" height="327" class="alignnone size-full wp-image-35" /><br />
For this example I am only using the RED and BLUE channels (though since the BLUE and GREEN are the same in this case, they are interchangeable).  The BLUE channel goes from black to gray meaning that pixels will be moved in a negative direction, this is the first part of the skewed illusion.  The second, and most important part, comes from the RED channel.  Starting with the most extreme black (00) and fading to the most extreme red (FF), we get our most extreme distortion. Cowabunga!<br />
From there, as we move up, the image fades more and more to middle-gray creating less and less distortion until there is no distortion at all.</p>
<p>At first I used a picture of some pretty flowers to test the distortion, but I realized that with a real photo, it wasn&#8217;t very obvious what had actually been morphed.  I ditched it for a good ol&#8217; grid.  The grid makes it ridiculously easy to tell what&#8217;s been morphed, plus it looks like a cool Tron-esque world.<br />
<img src="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/09/grid.jpg" alt="" title="Grid to be displaced" width="450" height="327" class="alignnone size-full wp-image-35" /></p>
<hr class="space"/>
<p>Check out the <a href="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/09/false3d_demo.html">working demo</a>. (click to turn the distortion on and off)</p>
<hr class="space"/>
<p><a href="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/09/false3d_demo.zip">Download the source</a>.  All code is EXPLICITLY commented.</p>
<hr class="space"/>
<p>A few sites that I found helpful:
<ul>
<li><a href="http://objectpainters.com/blog/2007/01/09/getting-the-displacement-you-need/">Getting the Displacement Your Need</a></li>
<li><a href="http://www.terrypaton.com/as3-bitmap-displacement/">AS3 Bitmap Displacement</a></li>
<li><a href="http://www.emanueleferonato.com/2007/12/03/understanding-flash-displacement-map-filter/">Understanding Flash Displacement Map Filter</a></li>
</ul>
<hr class="space"/>
<p>After all of that the one thing that I still don&#8217;t get is <em>why</em> when the image is distorted why it looks so crappy.  I&#8217;ve tried using different image formats (jpeg vs png) and I&#8217;ve even dynamically drawn in a vector grid, but it still give me that pixelly crap.  Anyone have an answer?</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.joelgillman.com/archives/30_false-3d-in-flash-displacement-maps/feed</wfw:commentRss>
		</item>
		<item>
		<title>Sun Chips</title>
		<link>http://lab.joelgillman.com/archives/29_sun-chips</link>
		<comments>http://lab.joelgillman.com/archives/29_sun-chips#comments</comments>
		<pubDate>Wed, 16 Apr 2008 03:05:01 +0000</pubDate>
		<dc:creator>joel gillman</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[colony]]></category>

		<category><![CDATA[creatures]]></category>

		<category><![CDATA[energy]]></category>

		<category><![CDATA[light energy]]></category>

		<category><![CDATA[movement]]></category>

		<category><![CDATA[moving guys]]></category>

		<category><![CDATA[ReacTable]]></category>

		<category><![CDATA[sun]]></category>

		<category><![CDATA[sun chips]]></category>

		<category><![CDATA[time and money]]></category>

		<guid isPermaLink="false">http://lab.joelgillman.com/archives/29_sun-chips</guid>
		<description><![CDATA[I had been doing an interactive chess table using the ReacTable software, but that whole project was nothing but problems. It ended up needing more time and money than I had available. One day I&#8217;ll finish it&#8230;
This video is a test run of my new senior project. This goes back to my projects last semester [...]]]></description>
			<content:encoded><![CDATA[<p>I had been doing an interactive chess table using the <a href="http://reactable.iua.upf.edu/">ReacTable</a> software, but that whole project was nothing but problems. It ended up needing more time and money than I had available. One day I&#8217;ll finish it&#8230;</p>
<p>This video is a test run of my <em>new</em> senior project. This goes back to my projects last semester when I was using <strong>little to no computers</strong>.  I know, scary.</p>
<p><em>This</em> project consists of solar powered creatures who collect light energy and then use the energy to make a movement.  There are only two in this video as I&#8217;m in the process of making more so they can live in a small and bright colony of happy moving guys.</p>
<p><span id="more-29"></span><br />
<object type="application/x-shockwave-flash" width="480" height="320" data="http://www.vimeo.com/moogaloop.swf?clip_id=903949&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff0179"><param name="quality" value="best" /><param name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=903949&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff0179" /></object><br /><a href="http://www.vimeo.com/903949/l:embed_903949">Sun Chips - Test Run 01</a> from <a href="http://www.vimeo.com/jgillman/l:embed_903949">Joel Gillman</a> on <a href="http://vimeo.com/l:embed_903949">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.joelgillman.com/archives/29_sun-chips/feed</wfw:commentRss>
		</item>
		<item>
		<title>Emitters</title>
		<link>http://lab.joelgillman.com/archives/28_emitters</link>
		<comments>http://lab.joelgillman.com/archives/28_emitters#comments</comments>
		<pubDate>Fri, 07 Mar 2008 07:48:49 +0000</pubDate>
		<dc:creator>joel gillman</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[emitter]]></category>

		<category><![CDATA[particles]]></category>

		<category><![CDATA[processing]]></category>

		<category><![CDATA[star field]]></category>

		<category><![CDATA[video]]></category>

		<category><![CDATA[Vimeo]]></category>

		<guid isPermaLink="false">http://lab.joelgillman.com/archives/28_emitters</guid>
		<description><![CDATA[For a project I needed to learn how to make an emitter (for particles).  Specifically and emitter object that can be called several times so that there can be several unique emitters.  I have made something similar before but it works more efficiently now.  Videos only.
Mouse Emitter from Joel Gillman on Vimeo.
Emitter [...]]]></description>
			<content:encoded><![CDATA[<p>For a project I needed to learn how to make an emitter (for particles).  Specifically and emitter object that can be called several times so that there can be several unique emitters.  I have made <a href="http://lab.joelgillman.com/archives/15_spawn-object">something</a> similar before but it works more efficiently now.  Videos only.<span id="more-28"></span></p>
<p><object type="application/x-shockwave-flash" width="500" height="333" data="http://www.vimeo.com/moogaloop.swf?clip_id=755681&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff333d"><param name="quality" value="best" /><param name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=755681&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff333d" /></object><br /><a href="http://www.vimeo.com/755681/l:embed_755681">Mouse Emitter</a> from <a href="http://www.vimeo.com/jgillman/l:embed_755681">Joel Gillman</a> on <a href="http://vimeo.com/l:embed_755681">Vimeo</a>.</p>
<p><object type="application/x-shockwave-flash" width="500" height="333" data="http://www.vimeo.com/moogaloop.swf?clip_id=760824&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff333d"><param name="quality" value="best" /><param name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=760824&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff333d" /></object><br /><a href="http://www.vimeo.com/760824/l:embed_760824">Emitter - Star Field</a> from <a href="http://www.vimeo.com/jgillman/l:embed_760824">Joel Gillman</a> on <a href="http://vimeo.com/l:embed_760824">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.joelgillman.com/archives/28_emitters/feed</wfw:commentRss>
		</item>
		<item>
		<title>Chess Clock</title>
		<link>http://lab.joelgillman.com/archives/27_chess-clock</link>
		<comments>http://lab.joelgillman.com/archives/27_chess-clock#comments</comments>
		<pubDate>Sun, 02 Mar 2008 21:43:28 +0000</pubDate>
		<dc:creator>joel gillman</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Chess]]></category>

		<category><![CDATA[clock]]></category>

		<category><![CDATA[modes]]></category>

		<category><![CDATA[processing]]></category>

		<category><![CDATA[program]]></category>

		<guid isPermaLink="false">http://lab.joelgillman.com/archives/27_chess-clock</guid>
		<description><![CDATA[A friend and I have been playing Chess recently (neither of us are very good) and we decided we could use a chess clock to make the games faster and more stressful.  We decided to make a game of it and see who could program a rudimentary (but working) chess clock.  Here&#8217;s mine.
10 [...]]]></description>
			<content:encoded><![CDATA[<p>A friend and I have been playing Chess recently (neither of us are very good) and we decided we could use a chess clock to make the games faster and more stressful.  We decided to make a game of it and see who could program a rudimentary (but working) chess clock.  Here&#8217;s mine.<span id="more-27"></span></p>
<p><em>10 minutes per player is the default.<br />
&#8216;r&#8217; to reset<br />
&#8217;space&#8217; to switch players<br />
&#8216;p&#8217; to pause</em><br />
<applet class="span-12" code="ClockCounter" archive="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/03/clockcounter.jar" width="400" height="200"></applet></p>
<p><a href="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/03/clockcounter.pde">Source 1</a> <a href="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/03/draw_clock.pde">2</a> and <a href="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/03/chess_keyboard.pde">3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.joelgillman.com/archives/27_chess-clock/feed</wfw:commentRss>
		</item>
		<item>
		<title>Circle Crawlers</title>
		<link>http://lab.joelgillman.com/archives/19_circle-crawlers</link>
		<comments>http://lab.joelgillman.com/archives/19_circle-crawlers#comments</comments>
		<pubDate>Fri, 08 Feb 2008 22:59:43 +0000</pubDate>
		<dc:creator>joel gillman</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[bugs]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[object oriented]]></category>

		<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://lab.joelgillman.com/archives/19_circle-crawlers</guid>
		<description><![CDATA[Circle Crawlers spawns a large number of &#8216;crawlers&#8217; and a smaller number of &#8216;anomalies&#8217; who each crawl around the screen randomly.  The large anomalies move slow and thus never get too far away from the center.  The smaller crawlers can move faster and can break away from the center but always die before [...]]]></description>
			<content:encoded><![CDATA[<p>Circle Crawlers spawns a large number of &#8216;crawlers&#8217; and a smaller number of &#8216;anomalies&#8217; who each crawl around the screen randomly.  The large anomalies move slow and thus never get too far away from the center.  The smaller crawlers can move faster and can break away from the center but always die before they get too far out from their point of origin.<span id="more-19"></span></p>
<p><em>Press &#8216;r&#8217; to reset.</em><br />
<applet class="span-12" code="crawler03" archive="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/02/cirlclecrawlers.jar" width="470" height="470"></applet></p>
<p><a href="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/02/cirlclecrawlers.pde">Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.joelgillman.com/archives/19_circle-crawlers/feed</wfw:commentRss>
		</item>
		<item>
		<title>Spawn Object</title>
		<link>http://lab.joelgillman.com/archives/15_spawn-object</link>
		<comments>http://lab.joelgillman.com/archives/15_spawn-object#comments</comments>
		<pubDate>Wed, 30 Jan 2008 06:06:07 +0000</pubDate>
		<dc:creator>joel gillman</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[dynamic]]></category>

		<category><![CDATA[modes]]></category>

		<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://lab.joelgillman.com/archives/15_spawn-object</guid>
		<description><![CDATA[I was learning how to properly use objects and classes.  Here there is a base class &#8220;Bug&#8221; and a class to extend it called &#8220;Crawler.&#8221;  Class Bug is never directly called, I had planned on using it in the future, but never did.  Also, I figured out how to use fonts for [...]]]></description>
			<content:encoded><![CDATA[<p>I was learning how to properly use objects and classes.  Here there is a base class &#8220;Bug&#8221; and a class to extend it called &#8220;Crawler.&#8221;  Class Bug is never directly called, I had planned on using it in the future, but never did.  Also, I figured out how to use fonts for text in Processing.<span id="more-15"></span><br />
<applet class="span-12" code="spawn_object3" archive="/thepress/wp-content/uploads/2008/01/spawn_object3.jar" width="470" height="470"></applet></p>
<p><a href="/thepress/wp-content/uploads/2008/01/spawn_object3.pde">Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.joelgillman.com/archives/15_spawn-object/feed</wfw:commentRss>
		</item>
		<item>
		<title>Playground</title>
		<link>http://lab.joelgillman.com/archives/12_playground</link>
		<comments>http://lab.joelgillman.com/archives/12_playground#comments</comments>
		<pubDate>Fri, 25 Jan 2008 22:10:48 +0000</pubDate>
		<dc:creator>joel gillman</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[processing]]></category>

		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://lab.joelgillman.com/archives/12_playground</guid>
		<description><![CDATA[A simple Processing program where a bunch of circles are drawn around the mouse.

Source
]]></description>
			<content:encoded><![CDATA[<p>A simple Processing program where a bunch of circles are drawn around the mouse.<span id="more-12"></span><br />
<applet class="span-12" code="playground" archive="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/01/playgrounder.jar" width="470" height="470"></applet></p>
<p><a href="http://lab.joelgillman.com/thepress/wp-content/uploads/2008/01/playground.pde">Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.joelgillman.com/archives/12_playground/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
