<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>doesnotcompute</title>
	
	<link>http://www.dncompute.com/blog</link>
	<description>Personal blog for technologist Noel Billig</description>
	<lastBuildDate>Fri, 08 Jan 2010 16:01:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/dncompute" /><feedburner:info uri="dncompute" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>PlayaroundNYC. A Visualization of Playground Access in New York City</title>
		<link>http://feedproxy.google.com/~r/dncompute/~3/nj_QlxJpMMk/playaroundnyc-a-visualization-of-playground-access-in-new-york-city.html</link>
		<comments>http://www.dncompute.com/blog/2009/12/15/playaroundnyc-a-visualization-of-playground-access-in-new-york-city.html#comments</comments>
		<pubDate>Tue, 15 Dec 2009 18:08:27 +0000</pubDate>
		<dc:creator>Noel</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.dncompute.com/blog/?p=205</guid>
		<description><![CDATA[I&#8217;ve recently submitted an entry to the NYC BigApps contest. My entry is called PlayaroundNYC and it is a visualization of how well supported New Yorkers are by public playgrounds as determined by walking distance and quality. You can read about how the map works on the How It Works page. To summarize, pink areas [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently submitted an entry to the <a href="http://www.nycbigapps.com/application-gallery/playaroundnyc">NYC BigApps</a> contest. My entry is called <a href="http://www.playaroundnyc.com">PlayaroundNYC</a> and it is a visualization of how well supported New Yorkers are by public playgrounds as determined by walking distance and quality. </p>
<div><a href="http://www.playaroundnyc.com" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/playaroundnyc.png" alt="playaroundnyc" title="playaroundnyc" width="640" height="360" class="alignnone size-full wp-image-206" /></a></div>
<p><span id="more-205"></span></p>
<p>You can read about how the map works on the <a href="http://playaroundnyc.com/howitworks/">How It Works</a> page. To summarize, pink areas of the map are areas that have short walking distances to high quality playgrounds. Gray areas are those that are either far from playgrounds, or whose nearby playgrounds have a low quality rating (as determined by pollution from nearby truck routes).</p>
<p>The heat map was generated in Java using <a href="http://processing.org/learning/tutorials/eclipse/">the Eclipse IDE with the Processing library</a>. The playground list was taken from the <a href="http://www.nyc.gov/html/datamine/html/home/home.shtml">NYC Datamine</a>. The latitude and longitude coordinates of the playgrounds (as well as basic information like borough) were scraped from the <a href="http://www.nycgovparks.org/">NYC Parks Department</a> website. I&#8217;ve made available a <a href="http://www.playaroundnyc.com/downloads/pg_list.csv">Playground CSV</a> file which lists the playground&#8217;s name, geolocation and other supplementary data not available in the original Datamine version. I hope this will save some effort for others looking to generate similar visualizations. The borough outlines of <acronym>NYC</acronym> are also taken from the <acronym>NYC</acronym> Datamine. The truck routes were taken from the <a href="http://www.nyc.gov/html/dot/html/motorist/trucks.shtml"><acronym>NYC DOT</acronym></a> website.  All of this data was processed in Java and rendered out as a series custom tiles at different resolutions for use in Google Maps.</p>
<p>The site experience is built entirely in <acronym>HTML</acronym>/Javascript. The custom generated tiles are loaded into a Google Maps instance using the <a href="http://code.google.com/apis/maps/documentation/v3/">v3 version of the <acronym>API</acronym></a>. Unfortunately, this was the first time I&#8217;ve worked with Google Maps and I wasn&#8217;t aware until late in the project that the v3 <acronym>API</acronym> has yet to implement many of the features which are commonly used in v2. One of the missing features for the Google Maps Javascript <acronym>API</acronym> v3 is the ability to layer custom tilesets over the existing map. As this is the core visual representation of PlayaroundNYC, it was a huge problem to not have this. Luckily, I was able to find <a href="http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/5c347878f53c2952/5e943d124aeba636?lnk=raot">tileoverlay.js</a> by <a href="http://blogs.missouristate.edu/web/2009/12/07/going-mobile-extending-a-maps-api-project-to-smart-phones/">Chad Killingsworth</a>, which solved this problem for me.</p>
<p>This project was developed during the month of November in the wee hours of the night (after my kids went to sleep) and during a couple of days I expressly took off from work to finish this project. I had a lot of fun doing it and learned a lot about Google Maps and custom tilesets that I hope to take advantage of in the future. </p>
<p>Personal projects can be hard to finish as <a href="http://en.wikipedia.org/wiki/The_Thief_and_the_Cobbler#Work_drags_for_decades_.281972-1984.29">the temptation to continually improve a project can become an irresistable Siren&#8217;s song</a>, ultimately dooming the project by exhausting it&#8217;s creator long before it&#8217;s finished. By having a contest deadline, I was forced to scale the project to what I could do in the timeline. There were additional data sets and visual improvements I wanted to add, but ultimately I&#8217;m happy having something small that&#8217;s finished than something that&#8217;s large and incomplete.</p>
<p>Part of the contest involves a &#8220;User Choice&#8221; award based on public voting. <a href="http://www.nycbigapps.com/application-gallery/playaroundnyc" style="color:#ff6699">Please vote for my entry</a> on the BigApps website.</p>
<h3>Screenshots</h3>
<p></p>
<p>Below are screenshots of the site as it launched in early December <span class="num">2009</span>.</p>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/intro.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/intro-640x618.png" alt="intro" title="intro" width="640" height="618" class="alignnone size-medium wp-image-209" /></a></div>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/map_01.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/map_01-640x362.png" alt="map_01" title="map_01" width="640" height="362" class="alignnone size-medium wp-image-210" /></a></div>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/map_02.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/map_02-640x363.png" alt="map_02" title="map_02" width="640" height="363" class="alignnone size-medium wp-image-211" /></a></div>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/howitoworks.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/howitoworks-640x854.png" alt="howitoworks" title="howitoworks" width="640" height="854" class="alignnone size-medium wp-image-208" /></a></div>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/about.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/about-640x406.png" alt="about" title="about" width="640" height="406" class="alignnone size-medium wp-image-207" /></a></div>
<h3>Evolving Prototype</h3>
<p>I&#8217;ve included various screenshots that were captured during the prototyping process.</p>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/01-blue-grid-red-pg.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/01-blue-grid-red-pg-640x640.png" alt="01-blue-grid-red-pg" title="01-blue-grid-red-pg" width="640" height="640" class="alignnone size-medium wp-image-259" /></a></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 1.</span> Evenly spaced grid in blue with playgrounds in red.</p>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/02-blue-grid-truck-routes.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/02-blue-grid-truck-routes-640x640.png" alt="02-blue-grid---truck-routes" title="02-blue-grid---truck-routes" width="640" height="640" class="alignnone size-medium wp-image-260" /></a></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 2.</span> Evenly spaced grid in blue with truck routes in red.</p>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/03-points-connected-to-near.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/03-points-connected-to-near-640x640.png" alt="03-points-connected-to-near" title="03-points-connected-to-near" width="640" height="640" class="alignnone size-medium wp-image-261" /></a></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 3.</span> Evenly spaced grid in blue. Playgrounds in red. Grid points are connected to nearest playground by green line.</p>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/04-alldata.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/04-alldata-640x640.png" alt="04-alldata" title="04-alldata" width="640" height="640" class="alignnone size-medium wp-image-262" /></a></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 4.</span> Map containing all playgrounds and truck routes.</p>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/05-firstlook.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/05-firstlook-640x640.png" alt="05-firstlook" title="05-firstlook" width="640" height="640" class="alignnone size-medium wp-image-263" /></a></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 5.</span> This was the first look at a calculated &#8220;quality&#8221; measure. Up until this point, I did not know if this idea would actually produce a visual worth looking at. Quality in these early renders was based only on nearest playground. Later versions would take into account all nearby playgrounds.</p>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/06-second-look-mid-rez.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/06-second-look-mid-rez-640x640.png" alt="06-second-look,-mid-rez" title="06-second-look,-mid-rez" width="640" height="640" class="alignnone size-medium wp-image-269" /></a></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 6.</span> Same as figure 5 but with a higher resolution.</p>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/08-heatmap.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/08-heatmap-640x640.png" alt="08-heatmap" title="08-heatmap" width="640" height="640" class="alignnone size-medium wp-image-265" /></a></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 7.</span> These early heatmaps were not snapped into specific levels. I find the maps less distracting and easier to follow when they&#8217;re broken into distinct levels rather than being smooth gradients.</p>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/10-first-google-maps.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/10-first-google-maps-640x484.png" alt="10-first-google-maps" title="10-first-google-maps" width="640" height="484" class="alignnone size-medium wp-image-267" /></a></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 8.</span> The first version rendered and viewed in Google Maps. A low resolution was used to keep down render time while making sure the generated tiles were properly aligned and scaled.</p>
<div><a href="http://www.dncompute.com/blog/wp-content/uploads/2009/12/11-heatmap-truckroutes.png" class="imagelink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/12/11-heatmap-truckroutes-640x640.png" alt="11-heatmap-truckroutes" title="11-heatmap-truckroutes" width="640" height="640" class="alignnone size-medium wp-image-268" /></a></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 9.</span> A render that included truck routes and an outline of the boroughs. I would like to add the truck routes as an optional layer in the future.</p>
<img src="http://feeds.feedburner.com/~r/dncompute/~4/nj_QlxJpMMk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dncompute.com/blog/2009/12/15/playaroundnyc-a-visualization-of-playground-access-in-new-york-city.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.dncompute.com/blog/2009/12/15/playaroundnyc-a-visualization-of-playground-access-in-new-york-city.html</feedburner:origLink></item>
		<item>
		<title>Pixie Dust. A Particle Experiment in Actionscript</title>
		<link>http://feedproxy.google.com/~r/dncompute/~3/AqWkGn_78NA/pixie-dust.html</link>
		<comments>http://www.dncompute.com/blog/2009/07/08/pixie-dust.html#comments</comments>
		<pubDate>Wed, 08 Jul 2009 05:11:07 +0000</pubDate>
		<dc:creator>Noel</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Sandbox]]></category>
		<category><![CDATA[Flash Tech]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.dncompute.com/blog/?p=128</guid>
		<description><![CDATA[One of the nice things about being a parent is getting to revisit movies you haven&#8217;t seen since you were a child. We&#8217;ve been on a classic Disney movie binge at my home and I&#8217;ve been really enjoying the movies from the 50s and early 60s. Figure 1. Tinkerbell in Disney&#8217;s Peter Pan (1953). Peter [...]]]></description>
			<content:encoded><![CDATA[<p>One of the nice things about being a parent is getting to revisit movies you haven&#8217;t seen since you were a child. We&#8217;ve been on a classic Disney movie binge at my home and I&#8217;ve been really enjoying the movies from the 50s and early 60s.</p>
<div><img src="http://www.dncompute.com/blog/wp-content/uploads/2009/02/tinkerbell.png" alt="tinkerbell" title="tinkerbell" width="640" height="360" class="alignnone size-full wp-image-140" /></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 1.</span> Tinkerbell in Disney&#8217;s Peter Pan (1953).</p>
<p><span id="more-128"></span></p>
<p>Peter Pan, Cinderella and Sleeping Beauty have been in pretty heavy (i.e., mind numbing) rotation which has given me plenty of time in which to start focusing on some of the minor details in these movies. One of the things that caught my eye was the pixie dust effect used for the Tinkerbell character in <a href="http://en.wikipedia.org/wiki/Peter_Pan_(1953_film)">Peter Pan</a>. I did a lot of hand drawn animation in college, spending many hours hunched over a makeshift <a href="http://images.google.com/images?q=animation+table&#038;oe=utf-8&#038;rls=org.mozilla:en-US:official&#038;client=firefox-a&#038;um=1&#038;ie=UTF-8&#038;ei=MVKoSfGuFePetgfP7tXXDw&#038;sa=X&#038;oi=image_result_group&#038;resnum=1&#038;ct=title">animation table</a> (it consisted of a sheet of Plexiglas with a taped on registration board, two chairs, and a desk lamp for an under-light). I know first hand how labor intensive and frustrating hand drawn animation can be, and its difficult to fathom the amount of time and effort that was put into tracking and animating the various specks to make the pixie dust effects in Peter Pan.</p>
<p>Today, we can achieve a similar effect with just a few lines of code. My implementation lacks a bit of the human touch which gives life to the Disney work, but I think it&#8217;s still a pretty fun piece.</p>
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_PixieDust_1591850738"
			class="flashmovie"
			width="640"
			height="360">
	<param name="movie" value="http://www.dncompute.com/blog/wp-content/uploads/2009/07/PixieDust.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.dncompute.com/blog/wp-content/uploads/2009/07/PixieDust.swf"
			name="fm_PixieDust_1591850738"
			width="640"
			height="360">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 2.</span> Move your mouse over the area above to spread some pixie dust.</p>
<img src="http://feeds.feedburner.com/~r/dncompute/~4/AqWkGn_78NA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dncompute.com/blog/2009/07/08/pixie-dust.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://www.dncompute.com/blog/2009/07/08/pixie-dust.html</feedburner:origLink></item>
		<item>
		<title>Basic Flocking</title>
		<link>http://feedproxy.google.com/~r/dncompute/~3/5ME6WDtamD0/basic-flocking.html</link>
		<comments>http://www.dncompute.com/blog/2008/09/08/basic-flocking.html#comments</comments>
		<pubDate>Mon, 08 Sep 2008 20:59:26 +0000</pubDate>
		<dc:creator>Noel</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.dncompute.com/blog/?p=123</guid>
		<description><![CDATA[The principles behind flocking behaviors were first demonstrated in a computer simulation in 1986 by Craig Reynolds. Flocking is an example of emergent behavior, which I touched on briefly in an ealier post about Conway&#8217;s Game of Life. Flocking behaviors are a lot of fun to play with, but simulating them can be fairly processor [...]]]></description>
			<content:encoded><![CDATA[<p>The principles behind flocking behaviors were first demonstrated in a computer simulation in 1986 by <a href="http://www.red3d.com/cwr/">Craig Reynolds</a>. Flocking is an example of <a href="http://en.wikipedia.org/wiki/Emergence">emergent behavior</a>, which I touched on briefly in an <a href="http://www.dncompute.com/blog/2008/04/10/pestilence-stylizing-conways-game-of-life.html">ealier post</a> about <a href="http://en.wikipedia.org/wiki/Conway's_Game_of_Life">Conway&#8217;s Game of Life</a>. </p>
<p>Flocking behaviors are a lot of fun to play with, but simulating them can be fairly processor intensive. In an earlier post, I talked about using <a href="http://www.dncompute.com/blog/2008/09/04/proximity-grid.html">proximity grids</a> to increase performance in this type of simulation. In the demo at the bottom of this post, I have employed a proximity grid and an implementation of <a href="http://en.wikipedia.org/wiki/Verlet_integration">verlet integration</a> to control the particle dynamics. </p>
<p>One of the problems I ran into when combining flocking behaviors with proximity grids is that flocking tends to subvert the ways in which proximity grids optimize. A proximity grid reduces processing by making it easy to skip any inter-agent reactions on agents which are far apart. Flocking on the other hand tends to take agents and clump them together into small areas, thereby thwarting some of the benefit of a proximity grid. This is not to say that the proximity grid doesn&#8217;t help, because it does, but a proximity grid is more effective in cases where particles are scattered somewhat evenly across an area. I was unable to simulate as many particles in this demo as I did in the <a href="http://www.dncompute.com/blog/2008/09/04/proximity-grid.html">proximity grid demo</a> partly because of the clumping nature of flocks, but mostly because of the need to examine the direction in which a particle is heading (a costly operation).</p>
<div><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/09/swarm.png" alt="" title="flock01" class="alignnone size-full wp-image-121" /></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 1.</span> Agents react to near neighbors according to the basic priniciples of flocking. The length of an agent&#8217;s tail is based on its current velocity.</p>
<p>The core principles of flocking are alignment, separation and cohesion. Each individual agent (e.g., particle, sprite) operates autonomously by following these 3 basic rules. Each agent can only &#8220;see&#8221; agents near them (their neighbors). Agents will avoid close contact with neighbors (separation), they will attempt to travel in the same direction as their neighbors (alignment), and they will attempt to navigate towards the average position of their neighbors (cohesion). By employing these 3 basic rules, a wide variety of complex group behaviors emerge.</p>
<p>I&#8217;ve built a simple demonstration of flocking in Actionscript which you can view at the bottom of this post. This demo requires Flash Player 9 or later.</p>
<p><span id="more-123"></span></p>
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Swarms04_1401918870"
			class="flashmovie"
			width="640"
			height="360">
	<param name="movie" value="/demos/swarm/Swarms04.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/demos/swarm/Swarms04.swf"
			name="fm_Swarms04_1401918870"
			width="640"
			height="360">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 2.</span> Holding the mouse button down will attract the agents, releasing the mouse button returns them to their regular behavior.</p>
<img src="http://feeds.feedburner.com/~r/dncompute/~4/5ME6WDtamD0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dncompute.com/blog/2008/09/08/basic-flocking.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.dncompute.com/blog/2008/09/08/basic-flocking.html</feedburner:origLink></item>
		<item>
		<title>Proximity Grid</title>
		<link>http://feedproxy.google.com/~r/dncompute/~3/S3VlUmuf9aU/proximity-grid.html</link>
		<comments>http://www.dncompute.com/blog/2008/09/04/proximity-grid.html#comments</comments>
		<pubDate>Thu, 04 Sep 2008 19:40:20 +0000</pubDate>
		<dc:creator>Noel</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.dncompute.com/blog/?p=120</guid>
		<description><![CDATA[This experiment is a byproduct of another project I&#8217;m working on which involves flocking behaviors. I was trying to maximize performance by eliminating the use of arrays and replacing them with a linked list structure. Generally speaking, direct pointers should be much quicker in Actionscript than accessing data through an array. In practice, I didn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>This experiment is a byproduct of another project I&#8217;m working on which involves <a href="http://www.red3d.com/cwr/boids/">flocking behaviors</a>. I was trying to maximize performance by eliminating the use of arrays and replacing them with a linked list structure. Generally speaking, direct pointers should be much quicker in Actionscript than accessing data through an array. In practice, I didn&#8217;t notice any improvement in performance when using a linked grid and reverted back to a single array in order to reduce code complexity. A linked grid is probably worth exploring further for elements that will not be screen rendered; for my purposes the additional complexity did not seem to yield any benefits. </p>
<p>I put this demo together as a way to test the linked grid concept, but I liked the test enough that I cleaned it up visually and added mouse interaction. Below are a couple of screenshots followed by the actual Flash demo you can interact with.</p>
<div><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/09/proximity01.png" alt="" title="proximity01" class="alignnone size-full wp-image-121" /></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 1.</span> There are 450 invisible points bouncing around the screen. As they come close to each other, a line is drawn connecting them.</p>
<div><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/09/proximity02.png" alt="" title="proximity02" class="alignnone size-medium wp-image-122" /></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 2.</span> Result of points being repelled by a mouse release action.</p>
<p><span id="more-120"></span></p>
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Swarms03_690534116"
			class="flashmovie"
			width="640"
			height="360">
	<param name="movie" value="/demos/swarm/Swarms03.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/demos/swarm/Swarms03.swf"
			name="fm_Swarms03_690534116"
			width="640"
			height="360">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 3.</span> Clicking the mouse causes the points to head towards the mouse, while releasing quickly repels them.</p>
<p>Proximity grids are not new and have been utilized for a long time as an optimization technique in video games (search for &#8220;tile based collision detection&#8221; for further reading) and have also been explored thoroughly in Flash by developers such as <a href="http://gskinner.com/blog/archives/2008/01/proximitymanage.html">Grant Skinner</a> and <a href="http://www.bit-101.com/blog/?page_id=1164">Keith Peters</a> (August 2005).</p>
<img src="http://feeds.feedburner.com/~r/dncompute/~4/S3VlUmuf9aU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dncompute.com/blog/2008/09/04/proximity-grid.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.dncompute.com/blog/2008/09/04/proximity-grid.html</feedburner:origLink></item>
		<item>
		<title>Kicks Creator. Nike Launches a Flash 3D Shoe Designer</title>
		<link>http://feedproxy.google.com/~r/dncompute/~3/JWR87AgjqGo/kicks-creator-nike-launches-a-flash-3d-shoe-designer.html</link>
		<comments>http://www.dncompute.com/blog/2008/08/13/kicks-creator-nike-launches-a-flash-3d-shoe-designer.html#comments</comments>
		<pubDate>Wed, 13 Aug 2008 19:53:24 +0000</pubDate>
		<dc:creator>Noel</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.dncompute.com/blog/?p=79</guid>
		<description><![CDATA[Nike has launched the &#8220;Nike Dunk: Kicks Creator&#8221;. The Kicks Creator allows Nike fans to design their own shoes by coloring and painting directly onto a 3D model of a Nike Dunk in Flash. The Kicks Creator goes beyond simply choosing colors, it allows Dunk fans access to an assortment of materials, design patterns, and [...]]]></description>
			<content:encoded><![CDATA[<p>Nike has launched the &#8220;Nike Dunk: Kicks Creator&#8221;. The Kicks Creator allows Nike fans to design their own shoes by coloring and painting directly onto a 3D model of a Nike Dunk in Flash. The Kicks Creator goes beyond simply choosing colors, it allows Dunk fans access to an assortment of materials, design patterns, and graphics which they can use to completely personalize their sneakers.</p>
<p>After creating a shoe, designers can submit their creations into the Kicks Creator Battle, a head-to-head competition where the general public gets to determine the best designs.</p>
<p>The <a href="http://www.nike.com/nikedunk/index.jhtml#l=kickscreator">Nike Dunk: Kicks Creator</a> was developed in Actionscript 3 and uses Papervision 2.0 to render the shoe model in real time. You can <a href="http://www.nike.com/nikedunk/index.jhtml#l=kickscreator,myshoeview,maaXoQ%3D%3D">view one of my entries 3D</a>.</p>
<p><a href='http://www.nike.com/nikedunk/index.jhtml#l=kickscreator' class='imagelink'><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_01-640x358.jpg" alt="" title="kickscreator_01" class="alignnone size-medium wp-image-107" /></a></p>
<p><span id="more-79"></span></p>
<p><a href='http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_02.jpg' class='imagelink'><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_02-640x460.jpg" alt="" title="kickscreator_02" class="alignnone size-medium wp-image-108" /></a></p>
<p><a href='http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_03.jpg' class='imagelink'><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_03-640x460.jpg" alt="" title="kickscreator_03" class="alignnone size-medium wp-image-109" /></a></p>
<p><a href='http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_04.jpg' class='imagelink'><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_04-640x460.jpg" alt="" title="kickscreator_04" class="alignnone size-medium wp-image-110" /></a></p>
<p><a href='http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_05.jpg' class='imagelink'><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_05-640x460.jpg" alt="" title="kickscreator_05" class="alignnone size-medium wp-image-111" /></a></p>
<p><a href='http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_06.jpg' class='imagelink'><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_06-640x460.jpg" alt="" title="kickscreator_06" class="alignnone size-medium wp-image-112" /></a></p>
<p><a href='http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_07.jpg' class='imagelink'><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_07-640x460.jpg" alt="" title="kickscreator_07" class="alignnone size-medium wp-image-113" /></a></p>
<p><a href='http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_08.jpg' class='imagelink'><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_08-640x460.jpg" alt="" title="kickscreator_08" class="alignnone size-medium wp-image-114" /></a></p>
<p><a href='http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_09.jpg' class='imagelink'><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_09-640x460.jpg" alt="" title="kickscreator_09" class="alignnone size-medium wp-image-115" /></a></p>
<p><a href='http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_10.jpg' class='imagelink'><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_10-640x460.jpg" alt="" title="kickscreator_10" class="alignnone size-medium wp-image-116" /></a></p>
<p><a href='http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_wallpaper.jpg' class='imagelink'><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/08/kickscreator_wallpaper-640x360.jpg" alt="" title="kickscreator_wallpaper" class="alignnone size-medium wp-image-106" /></a></p>
<img src="http://feeds.feedburner.com/~r/dncompute/~4/JWR87AgjqGo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dncompute.com/blog/2008/08/13/kicks-creator-nike-launches-a-flash-3d-shoe-designer.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://www.dncompute.com/blog/2008/08/13/kicks-creator-nike-launches-a-flash-3d-shoe-designer.html</feedburner:origLink></item>
		<item>
		<title>GraphicsUtil. A Utility Class for Drawing Arrows</title>
		<link>http://feedproxy.google.com/~r/dncompute/~3/Fwecy4EfAP4/graphicsutil-a-utility-class-for-drawing-arrows.html</link>
		<comments>http://www.dncompute.com/blog/2008/07/17/graphicsutil-a-utility-class-for-drawing-arrows.html#comments</comments>
		<pubDate>Thu, 17 Jul 2008 05:07:15 +0000</pubDate>
		<dc:creator>Noel</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.dncompute.com/blog/?p=93</guid>
		<description><![CDATA[I recently had need of an arrow drawing function in Flash which I wanted to use to annotate diagrams. I was unable to find one through Google that suited my needs, so I decided to roll my own Actionscript class for drawing arrows. I tried to keep the arrow drawing interface easy to use but [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had need of an arrow drawing function in Flash which I wanted to use to annotate diagrams. I was unable to find one through Google that suited my needs, so I decided to roll my own Actionscript class for drawing arrows. I tried to keep the arrow drawing interface easy to use but flexible. It draws a clean vector outline of the arrow, so you can use the <code>graphics.lineStyle</code> and <code>graphics.beginFill</code> to set the color styles.</p>
<div><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/07/arrows4.png" alt="" title="arrows4" class="alignnone size-full wp-image-98" /></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 1.</span> A sample of the various styles of arrow that can be easily created with <code>GraphicsUtil.drawArrow</code></p>
<p><span id="more-93"></span></p>
<h3>Creating a Simple Arrow</h3>
<p>You need only provide a <code>graphics</code> instance as well as the start and end points of the arrow. The <code>GraphicsUtil</code> class can handle the rest. This is the simplest arrow you can draw. It will take on whatever lineStyle and fill properties you set on the <code>graphics</code> instance. In this regard, it functions similarly to the <code>graphics.drawRect</code> and <code>graphics.drawCircle</code> methods.</p>
<pre class="codeblock">
<code><strong>Code Sample 1. The simplest use case for GraphicsUtil.drawArrow</strong>

import com.dncompute.graphics.GraphicsUtil;

<em>//Create a display object to draw into and set the colors</em>
var shape:Shape = new Shape();
shape.graphics.lineStyle(1,0x000000);
shape.graphics.beginFill(0x999999);

<em>//Draw an arrow from 30,30 to 100,100</em>
GraphicsUtil.drawArrow(
		shape.graphics,
		new Point(30,30),new Point(100,100)
		);</code>
</pre>
<p><img class="simpleBorder" width="400" height="300" src="http://www.dncompute.com/blog/wp-content/uploads/2008/07/arrow_default.png" alt="An Arrow Drawn in the Default Style" style="float:right; margin-left: 20px"/></p>
<p class="imageLabel"><span class="imageLabelHead">Figure 2.</span> The Actionscript shown in Code Sample 1 will generate this arrow; it is the default arrow that will be created if you don&#8217;t pass any styling parameters.</p>
<p><br clear="both"/></p>
<h3>Styling the Arrow</h3>
<p>If you need to customize the look of the arrow, you can do so in Actionscript by passing in a style object. This can be done using the shorthand generic object notation (i.e., an associate array). You can also style the arrow using the more <acronym title="Object Oriented Programming">OOP</acronym> friendly method of creating an instance of the ArrowStyle class.</p>
<pre class="codeblock">
<code><strong>Code Sample 2a. Shorthand Styling Using Object Notation</strong>

import com.dncompute.graphics.GraphicsUtil;
import flash.display.Shape;

<em>//Create a display object to draw into and set the colors</em>
var shape:Shape = new Shape();
shape.graphics.lineStyle(1,0x999999);
shape.graphics.beginFill(0x000000);

<em>//Draw an arrow from 30,30 to 100,100</em>
GraphicsUtil.drawArrow(shape.graphics,
		new Point(30,30),new Point(100,100),
		{shaftThickness:5,headWidth:40,headLength:60,
		shaftPosition:.25,edgeControlPosition:.75}
		);</code>
</pre>
<pre class="codeblock">
<code><strong>Code Sample 2b. Style Using the ArrowStyle Class</strong>

import com.dncompute.graphics.GraphicsUtil;
import com.dncompute.graphics.ArrowStyle;

<em>//Create a display object to draw into and set the colors</em>
var shape:Shape = new Shape();
shape.graphics.lineStyle(1,0x999999);
shape.graphics.beginFill(0x000000);

<em>//Set the arrow style</em>
var style:ArrowStyle = new ArrowStyle();
style.shaftThickness = 5;
style.headWidth = 40;
style.headLength = 60;
style.shaftPosition = .25;
style.edgeControlPosition = .75;

<em>//Draw an arrow from 30,30 to 100,100</em>
GraphicsUtil.drawArrow(shape.graphics,
		new Point(30,30),new Point(100,100),
		style
		);</code>
</pre>
<div><img class="simpleBorder" width="400" height="300" src="http://www.dncompute.com/blog/wp-content/uploads/2008/07/arrow_styled.png" alt="A Stubby Arrow" style="float:left; margin-right: 20px"/></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 3.</span> The Actionscript in Code Sample 2a and 2b will generate the same styled arrow you see here.</p>
<p><br clear="both"/></p>
<h3>Arrow Style Editor</h3>
<p>While it&#8217;s relatively easy to style the arrows, the style parameters may seem unintuitive at first. To help alleviate any confusion, I&#8217;ve provided the following arrow style generator which will allow you to interactively create an arrow style and print out the generated code. You can also use the &#8220;randomize&#8221; button to morph the shape into a randomly styled arrow.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_ArrowDemo_319775139"
			class="flashmovie"
			width="640"
			height="545">
	<param name="movie" value="/demos/arrow/ArrowDemo.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/demos/arrow/ArrowDemo.swf"
			name="fm_ArrowDemo_319775139"
			width="640"
			height="545">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p class="note">The drawArrow method uses a line intersection function based on <a href="http://www.zikko.se/resources/lineIntersection.php">Erik Gustavsson&#8217;s tutorial and sample code</a>. I recommend Mr. Gustavsson&#8217;s tutorial if you are interested in the math involved in drawing the arrow outline.</p>
<div><a href="/demos/arrow/GraphicUtilSource.zip" onClick="javascript:urchinTracker ('/downloads/graphicsutil');" class="tailBtnLink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/07/downloadsource.png" alt="Download Source" title="download" width="77" height="116"/></a></div>
<img src="http://feeds.feedburner.com/~r/dncompute/~4/Fwecy4EfAP4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dncompute.com/blog/2008/07/17/graphicsutil-a-utility-class-for-drawing-arrows.html/feed</wfw:commentRss>
		<slash:comments>40</slash:comments>
		<feedburner:origLink>http://www.dncompute.com/blog/2008/07/17/graphicsutil-a-utility-class-for-drawing-arrows.html</feedburner:origLink></item>
		<item>
		<title>BrowserCanvas. The World’s Easiest Way to Dynamically Resize Flash</title>
		<link>http://feedproxy.google.com/~r/dncompute/~3/7fVaBLUb31o/browsercanvas-the-worlds-easiest-way-to-dynamically-resize-flash.html</link>
		<comments>http://www.dncompute.com/blog/2008/06/23/browsercanvas-the-worlds-easiest-way-to-dynamically-resize-flash.html#comments</comments>
		<pubDate>Mon, 23 Jun 2008 23:51:47 +0000</pubDate>
		<dc:creator>Noel</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.dncompute.com/blog/?p=84</guid>
		<description><![CDATA[There are some challenges in Flash that are addressed with such regularity that it can be surprising that no uniform way of accomplishing these tasks has emerged. One of these challenges is dynamic flash movie resizing through JavaScript. While websites have been doing this for years and the techniques involved are simple, there are enough [...]]]></description>
			<content:encoded><![CDATA[<p>There are some challenges in Flash that are addressed with such regularity that it can be surprising that no uniform way of accomplishing these tasks has emerged. One of these challenges is dynamic flash movie resizing through JavaScript. While websites have been doing this for years and the techniques involved are simple, there are enough moving parts involved to make it a chore to recode and deploy every time you launch a new site. BrowserCanvas bundles all of the code necessary to do Flash resizing into a single ActionScript file which is easy to deploy and reuse. It takes care of a lot of the maintenance work necessary to do Flash JavaScript resizing so that it can be deployed with minimal effort.</p>
<p><span id="more-84"></span></p>
<p>The best part of BrowserCanvas is that it requires no external JavaScript in the page to function. Deployment involves putting a single Actionscript class into your classpath and adding a couple lines of code to your project. That&#8217;s it. There is no messing around with JavaScript imports, there are no extensive Actionscript libraries. It is as clean and simple as possible.</p>
<h3>Example Code</h3>
<p>The following example shows you everything you need to do to randomly resize a flash movie every time the stage is clicked.</p>
<pre class="codeblock">
<code>package {

   import flash.display.Sprite;
   import flash.events.MouseEvent;
   import com.dncompute.canvas.BrowserCanvas;

   public class DemoMain extends Sprite {

      private var canvas:BrowserCanvas;

      public function DemoMain() {
         canvas = new BrowserCanvas(stage);
         stage.addEventListener(MouseEvent.CLICK,randomSize);
      }

      public function randomSize(event:MouseEvent=null):void {
         canvas.width = String( Math.random()*500 + 200);
         canvas.height = String( Math.random()*500 + 200);
      }

   }

}</code>
</pre>
<h3>Live Examples</h3>
<p>Below are links to different examples of BrowserCanvas in action. All of these examples are included in the browser canvas download file at the end of this post. You will note that none of these examples have additional javascript code embedded in them, all of the code is embedded in the Flash movie.</p>
<ul>
<li>Advanced Controls Demonstration (<a href="/demos/browsercanvas/canvasdemo01.html" target="_blank">Basic Embed</a> | <a href="/demos/browsercanvas/canvasdemo03.html" target="_blank">SWF Object</a>)</li>
<li>Random Resize (<a href="/demos/browsercanvas/canvasdemo02.html" target="_blank">Basic Embed</a> | <a href="/demos/browsercanvas/canvasdemo04.html" target="_blank">SWF Object</a>)</li>
</ul>
<h3>Caveats</h3>
<p>While using BrowserCanvas is really simple, the code itself does have a little bit of complexity to it. Unfortunately, simple and cross-browser are rarely in the same sentence.</p>
<p>I&#8217;ve tested BrowserCanvas in a variety of modern browsers on both <acronym title="Operating System 10">OSX</acronym> and Windows. I have not tested BrowserCanvas in any of the golden oldies (IE 5.5 or less, Firefox 1.5 or less, Netscape anything, Safari 2.0 or less, Opera 8 or less) and don&#8217;t plan to add support for them. </p>
<p>The execution speed seems to be incredibly slow in Safari, and min/max behavior in Safari seems to only work in the <acronym title="Shockwave Flash">SWF</acronym> Object version of my demos. For most applications this shouldn&#8217;t be an issue, but I plan to investigate this further if I find the time. </p>
<p>I also have not tested BrowserCanvas in sites with complicated <acronym title="Cascading Style Sheets">CSS</acronym> layouts and <acronym title="Asynchronous Javascript and XML">AJAX</acronym> interaction. If you have issues in any current browser, I&#8217;d be eager to hear about them. BrowserCanvas attempts to do a bunch of clever things in JavaScript, but I wouldn&#8217;t be surprised if some of these tricks don&#8217;t work in a few fringe cases. You can turn the browser specific hacks off, this is discussed in the comments for the BrowserCanvas class.</p>
<p>Also note that if you want to run the examples locally, you may need to make changes to the Flash Player security settings. You can find instructions on how to do this half way down <a href="http://www.adobe.com/devnet/flash/articles/local_network_playback_03.html">this article from Adobe</a> . You can access the Global Security Settings Panel by doing the following:<br />
<code>Right Click Any Flash Movie &gt; Settings &gt; Privacy (Tab) &gt; Advanced (Button) &gt; Global Security Settings Panel (Link) </code></p>
<h3>History</h3>
<p>Packaging up Flash based components for use across a large variety of websites is a regular challenge for professional Actionscript developers. With the release of Flash 9, Adobe has made this easier to accomplish with innovations such as <acronym title="Shockwave Component">SWC</acronym> Actionscript libraries. <acronym>SWC</acronym> libraries work well when you are deploying components which are self contained, but don&#8217;t cover situations where a component requires external elements such as JavaScript libraries. Documenting and deploying all of the various pieces necessary for a component like this can be an onerous task. I&#8217;ve often longed for a way to package all of a component&#8217;s various pieces together into a single, easy to deploy package.</p>
<p>One way to do this is to insert the JavaScript directly from Flash, rather than embedding it in the <acronym>HTML</acronym> page. I spent some time when Flash 9 was first released looking into ways to accomplish this. My understanding at the time was that <code>ExternalInterface</code> only worked to call existing JavaScript functions on the page, so I focused my JavaScript code insertion efforts on the use of <code>navigateToURL("javascript:XXX")</code>. While this technique works to a limited degree, I abandoned my efforts because I found the results incredibly unwieldy to use with large codebases.</p>
<p>However, I recently discovered <a href="http://www.actionscript.org/resources/articles/745/1/JavaScript-and-VBScript-Injection-in-ActionScript-3/Page1.html">an article devoted to JavaScript injection</a> by Peter McBride. Mr. McBride has dispelled many of my misconceptions surrounding <code>ExternalInterface</code>. He also demonstrates some clever techniques for embedding JavaScript into your Actionscript code. I highly recommend Mr. McBride&#8217;s article, it is a thorough and easy to follow introduction to the JavaScript injection techniques used in BrowserCanvas.</p>
<p><b>Update <span class="num">26</span> Feb <span class="num">2009</span>:</b><br />
I recently updated this class to v2 which should correct the <acronym>IE</acronym> issues which some users noted in the comments below. Internet Explorer does not properly handle min/max settings on object tags. To work around this, browser canvas was reparenting the object tag and swapping it&#8217;s id. Unfortunately, changing the ID of an object appears to break Flash&#8217;s External Interface calls. I&#8217;ve adjusted the class to account for this. If you are not setting min/max sizes, I would also recommend that you simply turn this hack off altogether when instantiating the class.</p>
<p><b>Update <span class="num">07</span> Jul <span class="num">2009</span>:</b><br />
There have been some issues coming up in the comments that I wanted to bubble up if those of you who may not read all the way down. First, the main reason BrowserCanvas fails for some people is due to issues with the <code>id</code> attribute of the embed/object tag. It&#8217;s important that the <code>id</code> attribute is set, otherwise the JavaScript code which resizes the flash movie has issues finding the element in the page. Other issues which people seem to face is failure while using the &#8220;static publishing method&#8221; of SWFObject. The &#8220;static publishing method&#8221;, while standards compliant, results in a double nested object tag which wreak havoc on the JavaScript resizing. Stick with the &#8220;dynamic publishing method&#8221; (the tutorial on the swfobject site gives step-by-step instructions for both methods).</p>
<p><a href="/demos/browsercanvas/browsercanvas_v2.zip" onClick="javascript:urchinTracker ('/downloads/browsercanvas');" class="tailBtnLink"><img src="http://www.dncompute.com/blog/wp-content/uploads/2008/07/downloadsource.png" alt="Download Source" title="download" width="77" height="116"/></a></p>
<img src="http://feeds.feedburner.com/~r/dncompute/~4/7fVaBLUb31o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dncompute.com/blog/2008/06/23/browsercanvas-the-worlds-easiest-way-to-dynamically-resize-flash.html/feed</wfw:commentRss>
		<slash:comments>75</slash:comments>
		<feedburner:origLink>http://www.dncompute.com/blog/2008/06/23/browsercanvas-the-worlds-easiest-way-to-dynamically-resize-flash.html</feedburner:origLink></item>
		<item>
		<title>Adobe AIR Impressions</title>
		<link>http://feedproxy.google.com/~r/dncompute/~3/_twa5CH1T34/adobe-air-impressions.html</link>
		<comments>http://www.dncompute.com/blog/2008/04/21/adobe-air-impressions.html#comments</comments>
		<pubDate>Mon, 21 Apr 2008 18:59:05 +0000</pubDate>
		<dc:creator>Noel</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Tech]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.dncompute.com/blog/2008/04/21/adobe-air-impressions.html</guid>
		<description><![CDATA[This weekend I had some time to work with Adobe AIR and I&#8217;ve walked away with a different impression of it than I thought I would. While I wouldn&#8217;t say my opinion of it has improved, I would say it&#8217;s a different product than I thought it was. When AIR was initially announced I was [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend I had some time to work with Adobe AIR and I&#8217;ve walked away with a different impression of it than I thought I would. While I wouldn&#8217;t say my opinion of it has improved, I would say it&#8217;s a different product than I thought it was.</p>
<p><img src='http://www.dncompute.com/blog/wp-content/uploads/2008/04/airlogo.gif' alt='Adobe Air' /></p>
<p><span id="more-76"></span></p>
<p>When <acronym>AIR</acronym> was initially announced I was not particularly impressed. It appeared to ape the Java/.NET deployment models and was now apparently competing against these tools which are vastly more powerful and offer a much broader feature set. More importantly, I believed <acronym>AIR</acronym> flowed in the wrong direction. For the past 10 years (and especially in the past 2) desktop applications have been slowly getting replaced by web/browser based ones, and I fully expect this trend to continue.</p>
<p>Ultimately, <acronym>AIR</acronym> does not bring much to the table that web applications do not already offer. Local file system access is nice, but it is limited and not nearly as flexible as storing data in the cloud. The &#8220;sometimes connected&#8221; capability of <acronym>AIR</acronym> apps is a pointless feature in a world where we expect to always be connected. The &#8220;native&#8221;-ness of <acronym>AIR</acronym> apps is nice, but I would guess that most people are more familiar with web apps like Facebook/MySpace and GMail than they are with most local apps on their computer.</p>
<p>Most of the current uses for <acronym>AIR</acronym> have ranged from mediocre ports of existing websites (an <acronym>AIR</acronym> version of EBay? Who wants this?) to the kind of <a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=productHome&#038;exc=24&#038;loc=en_us">dreck usually reserved for widget libraries</a> (skinned clocks? egg timers?). Needless to say, the current set of <acronym>AIR</acronym> apps is not doing Adobe any favors in differentiating Adobe <acronym>AIR</acronym> as an application delivery framework.</p>
<p>After my recent experiences with <acronym>AIR</acronym>, I have to say that I&#8217;m not won over, but I do see a glimmer of potential that I didn&#8217;t see there before.</p>
<p>If I had to point out Adobe <acronym>AIR</acronym> &#8216;s best feature and the one feature that I think differentiates it from its competitors it&#8217;s this: <strong>The install process for most <acronym>AIR</acronym> apps and the <acronym>AIR</acronym> framework is managed through the Flash Player and is fairly seamless.</strong></p>
<p>Now, that may not sound like much to get excited about, but I think it&#8217;s the part of <acronym>AIR</acronym> that makes it a worthwhile product. If you have not installed an <acronym>AIR</acronym> application, I suggest you give it a try. The install process is fairly well done.</p>
<p><img src='http://www.dncompute.com/blog/wp-content/uploads/2008/04/installer.png' alt='Adobe Air Installer' /></p>
<p>I think it&#8217;s a mistake to think of <acronym>AIR</acronym> applications as competitors to desktop applications. They are not. <acronym>AIR</acronym> apps will never be as powerful or as capable as native applications. On top of this, Adobe has gone a long way towards crippling <acronym>AIR</acronym> apps in the name of security; pursuing tight security is a good idea if it helps <acronym>AIR</acronym> get deployed in restrictive workplaces, however it remains to be seen if this will pan out.</p>
<p>I think it&#8217;s more appropriate to think of <acronym>AIR</acronym> apps as enhanced web applications. In this view, Adobe <acronym>AIR</acronym> isn&#8217;t competing against desktop applications and is not directly competing against local java and .net applications. Instead, I believe <acronym>AIR</acronym> is actually competing against web based applications, including those built for the Flash Player. The ease of install makes it relatively painless to run Adobe <acronym>AIR</acronym> apps, the tight sandbox makes them somewhat secure like web apps, and the &#8220;native&#8221;-ness of them can make them more useful in some instances than web apps.</p>
<p>I still don&#8217;t have much enthusiasm for Adobe <acronym>AIR</acronym> in its current state. However, the easy install process makes Adobe <acronym>AIR</acronym> applications accessible to a mass audience in a way that regular downloadable software is not. The question is whether or not this mass audience will have interest in downloading apps which offer very little over their web based cousins.  The answer to this question may change over time, but I have a good guess as to what it is now.</p>
<img src="http://feeds.feedburner.com/~r/dncompute/~4/_twa5CH1T34" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dncompute.com/blog/2008/04/21/adobe-air-impressions.html/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		<feedburner:origLink>http://www.dncompute.com/blog/2008/04/21/adobe-air-impressions.html</feedburner:origLink></item>
		<item>
		<title>Curious Robots</title>
		<link>http://feedproxy.google.com/~r/dncompute/~3/Bjo0IwnfMJk/curious-robots.html</link>
		<comments>http://www.dncompute.com/blog/2008/04/11/curious-robots.html#comments</comments>
		<pubDate>Fri, 11 Apr 2008 15:48:12 +0000</pubDate>
		<dc:creator>Noel</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Sandbox]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.dncompute.com/blog/2008/04/11/curious-robots.html</guid>
		<description><![CDATA[When I was working on the current redesign of this site, I toyed with the idea of integrating a robot character into the site&#8217;s identity. With a site name like &#8220;doesnotcompute&#8221;, it seemed like the logical thing to do. I was unhappy with the results I came up with and abandoned the idea. Out of [...]]]></description>
			<content:encoded><![CDATA[<p>When I was working on the current redesign of this site, I toyed with the idea of integrating a robot character into the site&#8217;s identity. With a site name like &#8220;doesnotcompute&#8221;, it seemed like the logical thing to do. I was unhappy with the results I came up with and abandoned the idea.</p>
<p>Out of this experimentation, however, I created the following Flash prototype of &#8220;curious&#8221; robots. The robots will watch and approach the mouse cursor, but will flee in fear if the mouse cursor gets too close. You can single out a robot and chase him around with the mouse while the others watch. This is both cruel and fun.</p>
<p>This site&#8217;s current three circle logo comes from the design of these robot&#8217;s &#8220;eyes&#8221;. The current logo, however,  reuses the Trade Gothic &#8220;o&#8221; instead of a filled circle.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_robot2_1048793757"
			class="flashmovie"
			width="640"
			height="360">
	<param name="movie" value="http://www.dncompute.com/blog/wp-content/uploads/2008/04/robot2.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.dncompute.com/blog/wp-content/uploads/2008/04/robot2.swf"
			name="fm_robot2_1048793757"
			width="640"
			height="360">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p></p>
<p><span id="more-68"></span></p>
<img src="http://feeds.feedburner.com/~r/dncompute/~4/Bjo0IwnfMJk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dncompute.com/blog/2008/04/11/curious-robots.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.dncompute.com/blog/2008/04/11/curious-robots.html</feedburner:origLink></item>
		<item>
		<title>Pestilence. Stylizing Conway’s Game of Life</title>
		<link>http://feedproxy.google.com/~r/dncompute/~3/IR87RodmwKA/pestilence-stylizing-conways-game-of-life.html</link>
		<comments>http://www.dncompute.com/blog/2008/04/10/pestilence-stylizing-conways-game-of-life.html#comments</comments>
		<pubDate>Thu, 10 Apr 2008 14:50:34 +0000</pubDate>
		<dc:creator>Noel</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Sandbox]]></category>
		<category><![CDATA[Flash Tech]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.dncompute.com/blog/2008/04/10/pestilence-stylizing-conways-game-of-life.html</guid>
		<description><![CDATA[Way back in 1999, I went to an exhibit on emergent behaviors at the now defunct Boston Computer Museum. While I had seen Conway&#8217;s Game of Life demonstrated before, I enjoyed it a lot more after seeing it in the context of this exhibit. Figure 1. A screenshot of Pestilence. Red is newly created life, [...]]]></description>
			<content:encoded><![CDATA[<p>Way back in 1999, I went to an exhibit on emergent behaviors at the now defunct Boston Computer Museum. While I had seen <a href="http://en.wikipedia.org/wiki/Conways_life">Conway&#8217;s Game of Life</a> demonstrated before, I enjoyed it a lot more after seeing it in the context of this exhibit.</p>
<div><a href='http://www.dncompute.com/blog/2008/04/10/pestilence-stylizing-conways-game-of-life.html#more-67' title="Pestilence: Conway's Game of Life" class="imagelink"><img src='http://www.dncompute.com/blog/wp-content/uploads/2008/04/outbreak.jpg' alt='Static Image' /></a></div>
<p class="imageLabel"><span class="imageLabelHead">Figure 1.</span> A screenshot of Pestilence. Red is newly created life, black is life that has been alive for at least one step, white is empty space.</p>
<p>That same year, I created my first Life simulation in Flash 4. Unfortunately, Flash was not quite fast enough at that time to make much more than a small grid that slowly crawled along. The result was not particularly impressive.</p>
<p>Today however, Flash is a bit faster, as are most of our computers. I spent some time yesterday creating a life simulator in <acronym title="Actionscript 3">AS3</acronym>. I applied a couple of bitmap filters to it in order to make the appearance more dramatic. You can view the real-time simulation at the bottom of this post.</p>
<p><span id="more-67"></span></p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_lifesimulator_2410039"
			class="flashmovie"
			width="640"
			height="360">
	<param name="movie" value="http://www.dncompute.com/blog/wp-content/uploads/2008/04/lifesimulator.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.dncompute.com/blog/wp-content/uploads/2008/04/lifesimulator.swf"
			name="fm_lifesimulator_2410039"
			width="640"
			height="360">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p class="imageLabel"><span class="imageLabelHead">Pestilence.</span> Use your mouse to paint new &#8220;live&#8221; pixels onto the screen. The simulation pauses while painting.</p>
<p>If you have never heard of Life or emergent behavior, I highly recommend Mitchel Resnick and Brian Silverman&#8217;s <a href="http://llk.media.mit.edu/projects/emergence/contents.html">Exploring Emergence</a> as starting point for understanding what Life is and why people like myself continue to find it interesting almost 40 years after it was devised.</p>
<img src="http://feeds.feedburner.com/~r/dncompute/~4/IR87RodmwKA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.dncompute.com/blog/2008/04/10/pestilence-stylizing-conways-game-of-life.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.dncompute.com/blog/2008/04/10/pestilence-stylizing-conways-game-of-life.html</feedburner:origLink></item>
	</channel>
</rss>
