<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Zachernuk.com &#187; random</title>
	<atom:link href="http://www.zachernuk.com/tag/random/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zachernuk.com</link>
	<description>The desk of Brandel Zachernuk</description>
	<lastBuildDate>Thu, 02 Feb 2012 22:36:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Code studies in JS canvas</title>
		<link>http://www.zachernuk.com/2011/08/13/code-studies-in-js-canvas/</link>
		<comments>http://www.zachernuk.com/2011/08/13/code-studies-in-js-canvas/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 12:33:19 +0000</pubDate>
		<dc:creator>Brandel Zachernuk</dc:creator>
				<category><![CDATA[doodles]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[city]]></category>
		<category><![CDATA[fractal]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[terrain]]></category>

		<guid isPermaLink="false">http://www.zachernuk.com/?p=996</guid>
		<description><![CDATA[Whenever I see a painting or a design that is especially interesting, I like to understand it as well as I can. In order to do that, I make a copy. In order to make a copy, you&#8217;ve got to pay attention to a much finer level of detail than when you&#8217;re just appreciating something. [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_1056" class="wp-caption alignnone" style="width: 310px"><a href="http://www.zachernuk.com/wp-content/2011/08/line3.jpg"><img src="http://www.zachernuk.com/wp-content/2011/08/line3-300x167.jpg" alt="" title="Map from a single wanderer with no falloff" width="300" height="167" class="size-medium wp-image-1056" /></a><p class="wp-caption-text">A map generated from a single wanderer</p></div>
<p>Whenever I see a painting or a design that is especially interesting, I like to understand it as well as I can. In order to do that, I make a copy. In order to make a copy, you&#8217;ve got to pay attention to a much finer level of detail than when you&#8217;re just appreciating something. Every brush-stroke in a painting needs to be made, and when you try to make them all yourself, you understand them better.</p>
<p>It&#8217;s the same with programming. Spending time wondering &#8220;how did they do that?&#8221; will give you some answers, but trying to do it yourself will give you more. </p>
<p>A few weekends ago I was watching <a href="http://www.vimeo.com/18907070">Jared Tarbell&#8217;s speech at Flash On the Beach from 2010</a>, and when he started talking about his &#8216;substrate&#8217; algorithm,  I was eager to try it out. His experiments seem to be centred on the crystalline quality of the result, but I found the idea of a street map to be more interesting. Hit &#8216;Draw&#8217; at any time to start a new map, or play with the numbers to get a different effect. I&#8217;ve managed to create maps of 6000&#215;4000 pixels with 90 starting wanderers. I have some good samples up at <a href="http://www.flickr.com/photos/brandelf/" >My Flickr page.</a> <br/><br/><b>Note:</b> This runs in other browsers but it was written as a chrome experiment, so it&#8217;ll run best in Chrome and Safari.<br />
<script type="text/javascript" src="http://www.zachernuk.com/wp-content/2011/08/script_2.js"></script></p>
<div id="outer">
<div id="canvas_container">
<div id="output"></div>
</p></div>
</p></div>
<p><a href="javascript:setup();" style="background-color:#c0c0c0; border:2px solid 0x606060; color:black; text-decoration:none; border-style:outset;" >Draw!</a><br />
		<a href="javascript:save();" style="background-color:#c0c0c0; border:2px solid 0x606060; color:black; text-decoration:none; border-style:outset;" >Save as PNG!</a></p>
<form>
<table> </tr>
<td>
		Dimensions:</td>
<td>width:<br />
<input id="canvasWidth" value="300" size="2" type="text"/></td>
<td>height<br />
<input id="canvasHeight" value="200" size="2" type="text"/></td>
</tr>
<tr>
<td>		Branches:<br />
<input id="numBranches" value="4" size="2" type="text"/> </td>
<td>
		Initial wanderers:<br />
<input id="initialWanderers" value="9" size="2" type="text"/></td>
<td>
		Max wanderers:<br />
<input id="maxWanderers" value="4000" size="2" type="text"/></td>
</tr>
<tr>
<td>Initial thickness:<br />
<input id="initialThickness" value="7" size="2" type="text"/></td>
<td>
<p>		Line opacity:<br />
<input id="opacity" value="0.3" size="2" ttype="text"/></td>
<td>
<input id="childrenShrink" type="checkbox" name="Jitter" value="true" checked="true" /> Children wanderers are thinner</p>
<input id="onWhite" type="checkbox" name="Jitter" value="true" /> On Black?</p>
<input id="straightLines" type="checkbox" name="Jitter" value="true" /> Wanderers travel in straight lines
</td>
</tr>
</table></form>
<p>In testing this page I have had some &#8216;security domain&#8217; errors because it&#8217;s trying to execute javascript. This only appears to happen when the page hasn&#8217;t finished loading already &#8211; so if it doesn&#8217;t work, reload the page and try again. If you want to use this code and modify it yourself, please do &#8211; I&#8217;d love to see what you do with it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachernuk.com/2011/08/13/code-studies-in-js-canvas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pixel painting in flash</title>
		<link>http://www.zachernuk.com/2008/10/31/pixel-painting-in-flash/</link>
		<comments>http://www.zachernuk.com/2008/10/31/pixel-painting-in-flash/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 14:37:25 +0000</pubDate>
		<dc:creator>Brandel Zachernuk</dc:creator>
				<category><![CDATA[doodles]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[painting]]></category>
		<category><![CDATA[pixel]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.zachernuk.com/?p=125</guid>
		<description><![CDATA[I&#8217;m a programmer by training, and so I like to make the programming equivalent to a quick sketch from time to time. Here I am playing with the BitmapData in ActionScript 3, making a rough approximation of wet paint on a wall. Cheap tricks, but somehow satisfying. Move the mouse around on the canvas to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a programmer by training, and so I like to make the programming equivalent to a quick sketch from time to time.  Here I am playing with the BitmapData in ActionScript 3, making a rough approximation of wet paint on a wall.  Cheap tricks, but somehow satisfying.</p>
<p>Move the mouse around on the canvas to see things happen!<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_painty1_1414669020"
			class="flashmovie"
			width="400"
			height="400">
	<param name="movie" value="http://www.zachernuk.com/wp-content//painty1.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.zachernuk.com/wp-content//painty1.swf"
			name="fm_painty1_1414669020"
			width="400"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://www.zachernuk.com/2008/10/31/pixel-painting-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

