<?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>The efnx code blog. &#187; Uncategorized</title>
	<atom:link href="http://efnx.com/topics/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://efnx.com</link>
	<description>code. blog.</description>
	<lastBuildDate>Sat, 03 Jul 2010 18:02:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Lisp Game Competition</title>
		<link>http://efnx.com/lisp-game-competition/</link>
		<comments>http://efnx.com/lisp-game-competition/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 18:02:12 +0000</pubDate>
		<dc:creator>Schell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[30 days]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://efnx.com/lisp-game-competition/</guid>
		<description><![CDATA[A friend and I have decided to write a game in LISP in 30 days. The game will be entered in the 2010 lisp games expo. 
My good friend Aaron Maus is a lisper, and wanted to make a game. I&#8217;ve never programmed in lisp. We have 30 days to program a game for this [...]]]></description>
			<content:encoded><![CDATA[<p>A friend and I have decided to write a game in LISP in 30 days. The game will be entered in <a href="http://dto.github.com/notebook/2010expo.html">the 2010 lisp games expo</a>. </p>
<p>My good friend <a href="http://lostandsupine.com/">Aaron Maus</a> is a lisper, and wanted to make a game. I&#8217;ve never programmed in lisp. We have 30 days to program a game for this contest. Super fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://efnx.com/lisp-game-competition/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The blog has moved.</title>
		<link>http://efnx.com/the-blog-has-moved/</link>
		<comments>http://efnx.com/the-blog-has-moved/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 21:05:38 +0000</pubDate>
		<dc:creator>Schell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Hosting]]></category>

		<guid isPermaLink="false">http://efnx.com/the-blog-has-moved/</guid>
		<description><![CDATA[Yes, that&#8217;s right &#8211; I moved the blog again. Now we&#8217;re hosted at Linode, which is cheaper and easier than Media Temple. The main url is now http://efnx.com instead of http://blog.efnx.com (though both should still work).
]]></description>
			<content:encoded><![CDATA[<p>Yes, that&#8217;s right &#8211; I moved the blog again. Now we&#8217;re hosted at <a href="http://www.linode.com/?r=4e3fe60fb24f97e1665db674222b31f41f22ae48">Linode</a>, which is cheaper and easier than <a href="http://mediatemple.net/">Media Temple</a>. The main url is now <a href="http://efnx.com">http://efnx.com</a> instead of h<a href="ttp://blog.efnx.com">ttp://blog.efnx.com</a> (though both should still work).</p>
]]></content:encoded>
			<wfw:commentRss>http://efnx.com/the-blog-has-moved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DIY Webserver Using PureMVC++</title>
		<link>http://efnx.com/diy-webserver-using-puremvc/</link>
		<comments>http://efnx.com/diy-webserver-using-puremvc/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 22:33:13 +0000</pubDate>
		<dc:creator>Schell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.efnx.com/diy-webserver-using-puremvc/</guid>
		<description><![CDATA[To test out my newly ported PureMVC++ implementation I decided to write an example webserver. I&#8217;ve always wanted to write one, and I didn&#8217;t realize just how easy it is (to make a VERY rudimentary version). 
The server parses your http request and then spits it back out at you, with some nice html.

That&#8217;s it! [...]]]></description>
			<content:encoded><![CDATA[<p>To test out my newly ported PureMVC++ implementation I decided to write an example webserver. I&#8217;ve always wanted to write one, and I didn&#8217;t realize just how easy it is (to make a VERY rudimentary version). </p>
<p>The server parses your http request and then spits it back out at you, with some nice html.<br />
<a href="http://blog.efnx.com/wp-content/uploads/2009/12/Screen-shot-2009-12-22-at-2.35.47-PM.png" rel="lightbox"><img src="http://blog.efnx.com/wp-content/uploads/2009/12/Screen-shot-2009-12-22-at-2.35.47-PM-300x229.png" alt="Screen shot 2009-12-22 at 2.35.47 PM" title="Screen shot 2009-12-22 at 2.35.47 PM" width="300" height="229" class="size-medium wp-image-273" /></a><br />
That&#8217;s it! Source code is here:<br />
<a href="http://github.com/efnx/PureMVC-Plus-Plus/tree/master/example/httpserver/">http://github.com/efnx/PureMVC-Plus-Plus/tree/master/example/httpserver/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://efnx.com/diy-webserver-using-puremvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PureMVC++ &#8211; A  C++ MVC framework (ported from AS3)</title>
		<link>http://efnx.com/puremvc-a-c-mvc-framework-ported-from-as3/</link>
		<comments>http://efnx.com/puremvc-a-c-mvc-framework-ported-from-as3/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 23:26:54 +0000</pubDate>
		<dc:creator>Schell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.efnx.com/?p=229</guid>
		<description><![CDATA[I had some time over the past month to port the popular PureMVC application architecture from AS3, to C++. I learned a ton about C++ and it turned out to be a rather smooth process. The code is up on github.
Differences in the C++ version

Notification names and types are ints!
At first I used strings for [...]]]></description>
			<content:encoded><![CDATA[<p>I had some time over the past month to port the popular <a href="http://puremvc.org">PureMVC</a> application architecture from AS3, to C++. I learned a ton about C++ and it turned out to be a rather smooth process. The code is up on <a href="http://wiki.github.com/efnx/PureMVC-Plus-Plus" title="PureMVC at github">github</a>.</p>
<h3>Differences in the C++ version</h3>
<dl>
<dt>Notification names and types are ints!</dt>
<dd>At first I used strings for notification names and types, just like in other ports. I did this until I was writing the first sample application. At that moment I realize in C++ you can&#8217;t switch on strings! There&#8217;s no support for writing a switch statement on the type std::string. I simply didn&#8217;t know that. So code like this just won&#8217;t compile:</p>
<div class="codecolorer-container actionscript twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;somestring&quot;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;notthisone&quot;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;not gonna happen&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;northisone&quot;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;also not gonna happen&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;somestring&quot;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;this one gets evaluated&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">default</span>:<br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>C++ only allows you to switch on ints, so to save us from having to write something like this:</p>
<div class="codecolorer-container cpp twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>note<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>getName<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">==</span> <span style="color: #FF0000;">&quot;notthisstring&quot;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;not gonna happen&quot;</span><span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>note<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>getName<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">==</span> <span style="color: #FF0000;">&quot;northisstring&quot;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;also not going to happen&quot;</span><span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span>...</div></div>
<p>I decided to make note names and types ints. This way we can enumerate our notification names and types like so:</p>
<div class="codecolorer-container cpp twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000ff;">class</span> n_name<br />
<span style="color: #008000;">&#123;</span><br />
<span style="color: #0000ff;">public</span><span style="color: #008080;">:</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">enum</span> name<br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; NIL,<br />
&nbsp; &nbsp; &nbsp; &nbsp; STARTUP, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666;">// triggers the app startup sequence</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; SET,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666;">// sets something</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; GET,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666;">// makes a request to get something</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; DISPLAY,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666;">// display something</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; QUIT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666;">// quit the app</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span></div></div>
<p>and then handle the notification with ints:</p>
<div class="codecolorer-container cpp twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000ff;">int</span> name <span style="color: #000080;">=</span> note<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>getName<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">switch</span><span style="color: #008000;">&#40;</span>name<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">case</span> n_name<span style="color: #008080;">::</span><span style="color: #007788;">STARTUP</span><span style="color: #008080;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;Startup the app!&quot;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">break</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">case</span> n_name<span style="color: #008080;">::</span><span style="color: #007788;">QUIT</span><span style="color: #008080;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;Shutdown...&quot;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">break</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">default</span><span style="color: #008080;">:</span><br />
<span style="color: #008000;">&#125;</span></div></div>
</dd>
<p></p>
<dt>IFacade no longer contains a <span class="code">registerCommand</span> method</dt>
<dd>I tried my best to figure out a way to implement <a href="http://en.wikipedia.org/wiki/State_(computer_science)">stateless</a> commands in C++. The way the AS3 version accomplishes this is by passing around references to classes. In that port handling references to classes in an abstract way is easy because AS3 has built in <a href="http://en.wikipedia.org/wiki/Type_introspection">type introspection</a>. In order to do the same thing in C++ we&#8217;d have to depend on something from the boost library. That&#8217;s not an option. Instead I gave Facade a templated method to replace IFacade&#8217;s <span class="code">registerCommand</span> (conveniently called <span class="code">registerCommand</span>). So instead of calling <span class="code">registerCommand(noteName, CommandClassName)</span>, one makes a call like this: <span class="code">registerCommand&lt;CommandClassName&gt;(noteName)</span>. This calls a special template function created by the compiler that adds <span class="code">CommandClassName</span> to a templated Observer, which is added to the View&#8217;s observer list.</dd>
</dl>
<p>That covers it for now. In the coming weeks I&#8217;ll probably be adding example code to this post, as well as example applications to the repo. If you&#8217;re interested in the project, keep up to date with the repo at <a href="http://wiki.github.com/efnx/PureMVC-Plus-Plus" title="PureMVC at github">github</a> and soon we&#8217;ll have a repo at PureMVC.org. I&#8217;ve added some temporary <a href="http://civiliansoftware.com/pmvcpp" title"PureMVC++ documentation">documentation</a> for you to use as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://efnx.com/puremvc-a-c-mvc-framework-ported-from-as3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>AS3 &#8211; Creating a Convex Polygon from Unordered Points</title>
		<link>http://efnx.com/as3-creating-a-convex-polygon-from-unordered-points/</link>
		<comments>http://efnx.com/as3-creating-a-convex-polygon-from-unordered-points/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 23:24:58 +0000</pubDate>
		<dc:creator>Schell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.efnx.com/?p=215</guid>
		<description><![CDATA[Let&#8217;s pretend you have an application that lets users create shapes to be used in a physics simulation and that the user must click on the screen to set the vertices of the shape. Many physics engines only support convex polygons, or shapes that don&#8217;t have inlets, bites, or coves, basically shapes that don&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s pretend you have an application that lets users create shapes to be used in a <a href="http://www.box2d.org/">physics simulation</a> and that the user must click on the screen to set the vertices of the shape. Many physics engines only support <a href="http://en.wikipedia.org/wiki/Convex_and_concave_polygons">convex polygons</a>, or shapes that don&#8217;t have inlets, bites, or coves, basically shapes that don&#8217;t have inward facing edges. With this limitation we have to be able to restrict [read as "guide"] the user to make only convex polygons. For this we are going to need an algorithm that takes an unordered set of points and finds the <a href="http://en.wikipedia.org/wiki/Convex_hull">convex hull</a> that encloses those points. This way the user can click and add points at random, if desired, and your program will keep track of what points create a convex polygon, while the others are thrown away [or dealt with however you see fit].</p>
<p><strong><a href="http://www.cs.princeton.edu/courses/archive/spr09/cos226/demo/ah/GrahamScan.html">The Graham Scan Algorithm</a></strong> is a process of ordering a random set of points and then calculating jumps to the points in that set that constitute a convex polygon. In this algorithm there are three steps. First is to find a corner point, usually the topmost, leftmost point in the set. The second step is to order all other points by the polar angle between the corner point and the point in question. The last step is to traverse the set, taking each proceeding subset of three points (n, n-1, n-2) to determine whether the angle made by these three points is a left turn, right turn, or a straight line. If the turn made is our desired turn [which is usually left - but in Flash it's right, due to the flipped y-axis] then we add that point to the convex hull. If the turn is not our desired turn, we get rid of that point and move on. </p>
<p>Here is an example that shows first the data set drawn from point to point. Each successive line gets progressively whiter. In the second step we find the corner point, order the other points and then show the outer polygon.<br />
<div id="attachment_216" class="wp-caption aligncenter" style="width: 466px"><a href="http://blog.efnx.com/wp-content/uploads/2009/09/Screen-shot-2009-09-21-at-4.11.10-PM.png" rel="lightbox"><img src="http://blog.efnx.com/wp-content/uploads/2009/09/Screen-shot-2009-09-21-at-4.11.10-PM.png" alt="Example" title="Graham Scan Example" width="456" height="224" class="size-full wp-image-216" /></a><p class="wp-caption-text">Example</p></div></p>
<p>Here&#8217;s the code for the class:</p>
<div class="codecolorer-container actionscript3 twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #3f5fbf;">/**<br />
&nbsp;*&nbsp; Use this class freely - 2009 blog.efnx.com<br />
&nbsp;*/</span><br />
<br />
<span style="color: #9900cc; font-weight: bold;">package</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=point%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:point.html"><span style="color: #004993;">Point</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <br />
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> GrahamScan <span style="color: #0033ff; font-weight: bold;">extends</span> <a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #3f5fbf;">/**<br />
&nbsp; &nbsp; &nbsp;*&nbsp; The Graham scan is a method of computing the convex hull of a finite set of points <br />
&nbsp; &nbsp; &nbsp;* &nbsp;in the plane with time complexity O(n log n). It is named after Ronald Graham, who <br />
&nbsp; &nbsp; &nbsp;* &nbsp;published the original algorithm in 1972. The algorithm finds all vertices of <br />
&nbsp; &nbsp; &nbsp;* &nbsp;the convex hull ordered along its boundary. It may also be easily modified to report <br />
&nbsp; &nbsp; &nbsp;* &nbsp;all input points that lie on the boundary of their convex hull.<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> GrahamScan<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #3f5fbf;">/**<br />
&nbsp; &nbsp; &nbsp;*&nbsp; Returns a convex hull given an unordered array of points.<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> convexHull<span style="color: #000000;">&#40;</span><span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> findHull<span style="color: #000000;">&#40;</span> order<span style="color: #000000;">&#40;</span><span style="color: #004993;">data</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #3f5fbf;">/**<br />
&nbsp; &nbsp; &nbsp;*&nbsp; Orders an array of points counterclockwise.<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> order<span style="color: #000000;">&#40;</span><span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;GrahamScan::order()&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// first run through all the points and find the upper left [lower left]</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> p<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=point%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:point.html"><span style="color: #004993;">Point</span></a> = <span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> n<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a> &nbsp; = <span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a> = <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> n<span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//trace(&quot; &nbsp; p:&quot;,p,&quot;d:&quot;,data[i]);</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000066; font-weight: bold;">&lt;</span> p<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//trace(&quot; &nbsp; d.y &lt; p.y / d is new p.&quot;);</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = <span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> == p<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000066; font-weight: bold;">&amp;&amp;</span> <span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> <span style="color: #000066; font-weight: bold;">&lt;</span> p<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//trace(&quot; &nbsp; d.y == p.y, d.x &lt; p.x / d is new p.&quot;);</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = <span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// next find all the cotangents of the angles made by the point P and the</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// other points</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> sorted&nbsp; <span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// we need arrays for positive and negative values, because Array.sort</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// will put sort the negatives backwards.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> pos &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> neg &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// add points back in order</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span>i = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> n<span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> a &nbsp; <span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span style="color: #004993;">Number</span></a> = <span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> <span style="color: #000066; font-weight: bold;">-</span> p<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">b</span> &nbsp; <span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span style="color: #004993;">Number</span></a> = <span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000066; font-weight: bold;">-</span> p<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> cot <span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span style="color: #004993;">Number</span></a> = <span style="color: #004993;">b</span><span style="color: #000066; font-weight: bold;">/</span>a<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>cot <span style="color: #000066; font-weight: bold;">&lt;</span> 0<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; neg<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#123;</span>point<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> cotangent<span style="color: #000066; font-weight: bold;">:</span>cot<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pos<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#123;</span>point<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> cotangent<span style="color: #000066; font-weight: bold;">:</span>cot<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// sort the arrays</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; pos<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sortOn</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;cotangent&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">NUMERIC</span> <span style="color: #000066; font-weight: bold;">|</span> <a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">DESCENDING</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; neg<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sortOn</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;cotangent&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">NUMERIC</span> <span style="color: #000066; font-weight: bold;">|</span> <a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">DESCENDING</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; sorted = neg<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">concat</span><span style="color: #000000;">&#40;</span>pos<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> ordered <span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ordered<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>p<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span>i = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> n<span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>p == sorted<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>point<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">continue</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ordered<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>sorted<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>point<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> ordered<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #3f5fbf;">/**<br />
&nbsp; &nbsp; &nbsp;*&nbsp; Given an array of points ordered counterclockwise, findHull will <br />
&nbsp; &nbsp; &nbsp;* &nbsp;filter the points and return an array containing the vertices of a<br />
&nbsp; &nbsp; &nbsp;* &nbsp;convex polygon that envelopes those points.<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> findHull<span style="color: #000000;">&#40;</span><span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;GrahamScan::findHull()&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> n &nbsp; <span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a> &nbsp; &nbsp;= <span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> hull<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a>&nbsp; = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hull<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// add the pivot</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hull<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>1<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// makes first vector</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a> = <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> n<span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">while</span><span style="color: #000000;">&#40;</span>direction<span style="color: #000000;">&#40;</span>hull<span style="color: #000000;">&#91;</span>hull<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span> <span style="color: #000066; font-weight: bold;">-</span> 2<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> hull<span style="color: #000000;">&#91;</span>hull<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span> <span style="color: #000066; font-weight: bold;">-</span> 1<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">&gt;</span>= 0<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hull<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">pop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hull<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">data</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> hull<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #3f5fbf;">/**<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #339966; font-weight: bold;">function</span> direction<span style="color: #000000;">&#40;</span>p1<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=point%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:point.html"><span style="color: #004993;">Point</span></a><span style="color: #000066; font-weight: bold;">,</span> p2<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=point%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:point.html"><span style="color: #004993;">Point</span></a><span style="color: #000066; font-weight: bold;">,</span> p3<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=point%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:point.html"><span style="color: #004993;">Point</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span style="color: #004993;">Number</span></a><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// &gt; 0 &nbsp;is right turn</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// == 0 is collinear</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// &lt; 0 &nbsp;is left turn</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// we only want right turns, usually we want right turns, but</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// flash's grid is flipped on y.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #000000;">&#40;</span>p2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> <span style="color: #000066; font-weight: bold;">-</span> p1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000;">&#40;</span>p3<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000066; font-weight: bold;">-</span> p1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">-</span> <span style="color: #000000;">&#40;</span>p2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000066; font-weight: bold;">-</span> p1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000;">&#40;</span>p3<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> <span style="color: #000066; font-weight: bold;">-</span> p1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #000000;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://efnx.com/as3-creating-a-convex-polygon-from-unordered-points/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PHP &#8211; Nested Tuple</title>
		<link>http://efnx.com/php-nested-tuple/</link>
		<comments>http://efnx.com/php-nested-tuple/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 00:55:02 +0000</pubDate>
		<dc:creator>Schell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.efnx.com/?p=211</guid>
		<description><![CDATA[Here&#8217;s a quick nested tuple [list of head and tail, where tail is the list minus the head]. I wrote this for a current project I&#8217;m working on. It works with any parameters except one array. If you only pass one array, it will convert your one array into a list of Tuples.
&#60;?php
/**
&#160;* Tuple is [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick nested tuple [list of head and tail, where tail is the list minus the head]. I wrote this for a current project I&#8217;m working on. It works with any parameters except one array. If you only pass one array, it will convert your one array into a list of Tuples.</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #009933; font-style: italic;">/**<br />
&nbsp;* Tuple is a list of variables. Really it is a head and a tail, where the tail<br />
&nbsp;* is also a Tuple. (Tuple(n)=head + Tuple(n-1))<br />
&nbsp;*/</span><br />
<br />
<span style="color: #000000; font-weight: bold;">class</span> Tuple<br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$head</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$tail</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <a href="http://www.php.net/func_num_args"><span style="color: #990000;">func_num_args</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// get all the arguments and package them as an array</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/func_get_args"><span style="color: #990000;">func_get_args</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// take the first element and use that as the head of the list</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">head</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array_shift"><span style="color: #990000;">array_shift</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// if there are still args left, make a new list and use that as tail</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/count"><span style="color: #990000;">count</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// pass the remainder</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tail</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Tuple<span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>
<p>Here&#8217;s some usage and output:</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #000088;">$list</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Tuple<span style="color: #009900;">&#40;</span>1<span style="color: #339933;">,</span> 2<span style="color: #339933;">,</span> 3<span style="color: #339933;">,</span> 4<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/print_r"><span style="color: #990000;">print_r</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$list</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>That prints out:</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Tuple Object<br />
<span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#91;</span>head<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#91;</span>tail<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> Tuple Object<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#91;</span>head<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">2</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#91;</span>tail<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> Tuple Object<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#91;</span>head<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">3</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#91;</span>tail<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> Tuple Object<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#91;</span>head<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">4</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#91;</span>tail<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><br />
<br />
<span style="color: #009900;">&#41;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://efnx.com/php-nested-tuple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>30 30 Second Songs In 30 Days</title>
		<link>http://efnx.com/30-30-second-songs-in-30-days/</link>
		<comments>http://efnx.com/30-30-second-songs-in-30-days/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 19:23:23 +0000</pubDate>
		<dc:creator>Schell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Atair]]></category>
		<category><![CDATA[efnx]]></category>

		<guid isPermaLink="false">http://blog.efnx.com/30-30-second-songs-in-30-days/</guid>
		<description><![CDATA[My friend Judah and I are going to collaborate on an album of 30 30 second songs, and will be releasing it August 1st, 2009.
]]></description>
			<content:encoded><![CDATA[<p>My friend Judah and I are going to collaborate on an album of 30 30 second songs, and will be releasing it August 1st, 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://efnx.com/30-30-second-songs-in-30-days/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Universal Law of Deadlines</title>
		<link>http://efnx.com/the-universal-law-of-deadlines/</link>
		<comments>http://efnx.com/the-universal-law-of-deadlines/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 22:08:55 +0000</pubDate>
		<dc:creator>Schell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[deadlines]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[math]]></category>

		<guid isPermaLink="false">http://blog.efnx.com/the-universal-law-of-deadlines/</guid>
		<description><![CDATA[A friend and I were talking about deadlines, as we&#8217;re often thrown into a rushed project together, and I came up with this equation which seems to accurately model a coming deadline in the information industry.
Scivally-Nagler&#8217;s Law
workload + stress = 1/&#40;deadline - now&#41;;
]]></description>
			<content:encoded><![CDATA[<p>A friend and I were talking about deadlines, as we&#8217;re often thrown into a rushed project together, and I came up with this equation <b>which seems to accurately model a coming deadline in the information industry.</b></p>
<h2>Scivally-Nagler&#8217;s Law</h2>
<div class="codecolorer-container actionscript twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">workload + stress = 1<span style="color: #66cc66;">/</span><span style="color: #66cc66;">&#40;</span>deadline - now<span style="color: #66cc66;">&#41;</span>;</div></div>
]]></content:encoded>
			<wfw:commentRss>http://efnx.com/the-universal-law-of-deadlines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hannspree HF237 + Macbook Pro 2.16Ghz</title>
		<link>http://efnx.com/hannspree-hf237-macbook-pro-2-16ghz/</link>
		<comments>http://efnx.com/hannspree-hf237-macbook-pro-2-16ghz/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 07:20:51 +0000</pubDate>
		<dc:creator>Schell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hannspree]]></category>
		<category><![CDATA[lcd]]></category>
		<category><![CDATA[rambles]]></category>
		<category><![CDATA[rants]]></category>

		<guid isPermaLink="false">http://blog.efnx.com/hannspree-hf237-macbook-pro-2-16ghz/</guid>
		<description><![CDATA[I bought a new monitor today &#8211; a Hannspree 23&#8243;. I only paid about $180 for it, so it seemed like a sweet deal. TOTALLY WRONG. This thing hurts my eyes it&#8217;s so sh*tty. Some pixels are sharp, others are blurry. It&#8217;s like the monitor itself is stretching and interpolating the pixel points from my [...]]]></description>
			<content:encoded><![CDATA[<p>I bought a new monitor today &#8211; a Hannspree 23&#8243;. I only paid about $180 for it, so it seemed like a sweet deal. TOTALLY WRONG. This thing hurts my eyes it&#8217;s so sh*tty. Some pixels are sharp, others are blurry. It&#8217;s like the monitor itself is stretching and interpolating the pixel points from my video card. Text is UNREADABLE on most resolutions and no amount of settings fidgetry seems to fix it. The pixels just don&#8217;t line up. This thing is auto-dithering my pixel art. I&#8217;m taking it back tomorrow and getting my money back. I&#8217;d rather have a used, scuffed up LCD from two years ago. Tried and true.</p>
]]></content:encoded>
			<wfw:commentRss>http://efnx.com/hannspree-hf237-macbook-pro-2-16ghz/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New Hosting</title>
		<link>http://efnx.com/new-hosting/</link>
		<comments>http://efnx.com/new-hosting/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 04:44:23 +0000</pubDate>
		<dc:creator>Schell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.efnx.com/new-hosting/</guid>
		<description><![CDATA[Over the past month or so I&#8217;ve been having some hosting issues &#8211; my cats would attack the server, some how it would get unplugged, etc. So now I&#8217;ve switched everything over to hosting at Mediatemple.net, which seems pretty awesome so far. So here&#8217;s to no more downtime, 404s or 500s and hopefully instead we&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past month or so I&#8217;ve been having some hosting issues &#8211; my cats would attack the server, some how it would get unplugged, etc. So now I&#8217;ve switched everything over to hosting at Mediatemple.net, which seems pretty awesome so far. So here&#8217;s to no more downtime, 404s or 500s and hopefully instead we&#8217;ll get some 808s. *cheers*</p>
]]></content:encoded>
			<wfw:commentRss>http://efnx.com/new-hosting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
