<?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>natewm.com &#187; experiments</title>
	<atom:link href="http://natewm.com/blog/tag/experiments/feed/" rel="self" type="application/rss+xml" />
	<link>http://natewm.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 26 Jul 2010 19:43:25 +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>Random Neighborhood Generator</title>
		<link>http://natewm.com/blog/2009/01/20/random-neighborhood-generator/</link>
		<comments>http://natewm.com/blog/2009/01/20/random-neighborhood-generator/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 22:18:43 +0000</pubDate>
		<dc:creator>Nate</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[experiments]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[neighborhood]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://natewm.com/blog/?p=86</guid>
		<description><![CDATA[I was wondering how visually interesting a randomly generated neighborhood could be a made by using simple binary subdivision.  Basically the algorithm starts with a square, cuts it in half, cuts those halves in half, and so on to produce streets and plots of land. It is in no way how a real neighborhood would [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_87" class="wp-caption aligncenter" style="width: 610px"><img class="size-full wp-image-87" title="neighborhood" src="http://natewm.com/blog/../media/blog/2009/01/neighborhood.gif" alt="Random Neighborhood Generator" width="600" height="257" /><p class="wp-caption-text">Random Neighborhood Generator</p></div>
<p>I was wondering how visually interesting a randomly generated neighborhood could be a made by using simple binary subdivision.  Basically the algorithm starts with a square, cuts it in half, cuts those halves in half, and so on to produce streets and plots of land.</p>
<p>It is in no way how a real neighborhood would be laid out, but for such simplicity I am rather satisfied with the results.  Such a system could randomly produce results that are visually interesting enough for possibly a small, simple flying or driving based game &#8212; such as having to rush a firetruck to burning homes, for example.</p>
<p>Here is the source code: <a title="Random Neighborhood Generator" href="http://www.natewm.com/media/software/experiments/python/neighborhood.py">neighborhood.py</a></p>
]]></content:encoded>
			<wfw:commentRss>http://natewm.com/blog/2009/01/20/random-neighborhood-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Various Python Experiments</title>
		<link>http://natewm.com/blog/2008/11/06/various-python-experiments/</link>
		<comments>http://natewm.com/blog/2008/11/06/various-python-experiments/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 01:42:10 +0000</pubDate>
		<dc:creator>Nate</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[experiments]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://natewm.com/blog/?p=53</guid>
		<description><![CDATA[Every so often I decide to write simple test programs in Python just for the fun of it.  Here are a few that I had written over in the past.  Please note, because these were originally just simple experiments the source code could be a little messy and poorly optimized in most of them.  Also [...]]]></description>
			<content:encoded><![CDATA[<p>Every so often I decide to write simple test programs in Python just for the fun of it.  Here are a few that I had written over in the past.  Please note, because these were originally just simple experiments the source code could be a little messy and poorly optimized in most of them.  Also note, these are not meant to be all that impressive.</p>
<p>All of the programs require <a href="http://www.python.org">Python</a> and <a href="http://www.pythonware.com/products/pil/">PIL</a> (The Python Imaging Library.)</p>
<h3>Simple Recursive Maze Generator</h3>
<div id="attachment_54" class="wp-caption aligncenter" style="width: 410px"><a href="http://natewm.com/blog/../media/blog/2008/11/maze_py_test.gif"><img class="size-full wp-image-54" src="http://natewm.com/blog/../media/blog/2008/11/maze_py_test.gif" alt="Simple Recursive Maze Generator" width="400" height="200" /></a><p class="wp-caption-text">Simple Recursive Maze Generator</p></div>
<p>This is just a simple maze generator that uses a recursive function.  It creates a near-infinite number of random mazes.</p>
<p>Source: <a href="http://www.natewm.com/media/software/experiments/python/maze.py">maze.py</a></p>
<h3>Rectangle Packing</h3>
<div id="attachment_55" class="wp-caption aligncenter" style="width: 266px"><a href="http://natewm.com/blog/../media/blog/2008/11/rect_pack_py_test.gif"><img class="size-medium wp-image-55" src="http://natewm.com/blog/../media/blog/2008/11/rect_pack_py_test.gif" alt="Rectangle Packing" width="256" height="256" /></a><p class="wp-caption-text">Rectangle Packing</p></div>
<p>I wanted to figure out a simple and effective way of packing rectangle images in an OpenGL texture &#8212; which is useful for hardware accelerated 2D graphics.  The solution I came up with simply subdivides the availible free space and packs the rectangles from largest to smallest.  It may not produce the best packing results and there are quite a few wasted cycles in this implimentation, but, for being as simple as it is, it produces fairly reasonable results rather quickly.</p>
<p>Source: <a href="http://www.natewm.com/media/software/experiments/python/rect_packing.py">rect_packing.py</a></p>
<h3>Simple Error Diffused Dithering</h3>
<div id="attachment_56" class="wp-caption aligncenter" style="width: 370px"><a href="http://natewm.com/blog/../media/blog/2008/11/dither_py_test.gif"><img class="size-full wp-image-56" src="http://natewm.com/blog/../media/blog/2008/11/dither_py_test.gif" alt="Error Diffuse Dithering" width="360" height="215" /></a><p class="wp-caption-text">Error Diffuse Dithering</p></div>
<p>Just simple error diffusion based image dithering.  The above image is showing four color dithering.</p>
<p>Source: <a href="http://www.natewm.com/media/software/experiments/python/dither_test.py">dither_test.py</a></p>
<h3>Random Forest Path</h3>
<div id="attachment_57" class="wp-caption aligncenter" style="width: 492px"><a href="http://natewm.com/blog/../media/blog/2008/11/forest_path_py_test.gif"><img class="size-full wp-image-57" src="http://natewm.com/blog/../media/blog/2008/11/forest_path_py_test.gif" alt="Random Paths Through a Forest" width="482" height="121" /></a><p class="wp-caption-text">Random Paths Through a Forest</p></div>
<p>I decided to try to see if I could easily produce a visual effect resembling erosion patterns in a forest area.  This was part of some preliminary work in trying to write a game that randomly generates a completely different world each time it&#8217;s played.  The results were very satisfying considering how simple the solution is.  Essentially it&#8217;s just squiggly lines of varying thickness with some textureing applied to it.</p>
<p>Source: <a href="http://www.natewm.com/media/software/experiments/python/forest_path.py">forest_path.py</a></p>
<h3>Image Outlining</h3>
<div id="attachment_58" class="wp-caption aligncenter" style="width: 330px"><a href="http://natewm.com/blog/../media/blog/2008/11/outline_py_test.jpg"><img class="size-full wp-image-58" src="http://natewm.com/blog/../media/blog/2008/11/outline_py_test.jpg" alt="" width="320" height="200" /></a><p class="wp-caption-text">Outlining an Image</p></div>
<p>Originally I wanted to see if I could have interesting features of an image identified and later used in some sort of image recoginition system.  Hilighting sharp edges brought out too many points to practically be used for comparing spacial relationships and proportions, but it did produce some nice results for drawing outlines on an image.</p>
<p>I wanted to test it on a picture of a person, so I found the above image online.  It is actually a composit of 32 american male faces averaged together.  I hope the creators of the <a href="http://www.uni-regensburg.de/Fakultaeten/phil_Fak_II/Psychologie/Psy_II/beautycheck/english/durchschnittsgesichter/durchschnittsgesichter.htm">website</a> he&#8217;s from does&#8217;t mind.</p>
<p>Source: <a href="http://www.natewm.com/media/software/experiments/python/img_outline.py">img_outline.py</a></p>
]]></content:encoded>
			<wfw:commentRss>http://natewm.com/blog/2008/11/06/various-python-experiments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
