<?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>K2xL &#187; flash</title>
	<atom:link href="http://k2xl.com/wordpress/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://k2xl.com/wordpress</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Sat, 28 Apr 2012 19:02:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Auto create polygon AS3</title>
		<link>http://k2xl.com/wordpress/auto-create-polygon-as3/</link>
		<comments>http://k2xl.com/wordpress/auto-create-polygon-as3/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 01:12:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[auto generate polygon from points]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[polygon]]></category>

		<guid isPermaLink="false">http://k2xl.com/wordpress/?p=339</guid>
		<description><![CDATA[Made a Flash on Wonderfl the other day. My friend studying for his PhD at Georgia Tech in architecture called me regarding a problem. He said, &#8220;I need to program something to create a polygon from points. Right now, the points are not being drawn in the right order so lines are being overlapped. How [...]]]></description>
			<content:encoded><![CDATA[<p>Made a Flash on <a href="http://www.wonderfl.com">Wonderfl</a> the other day.</p>
<p>My friend studying for his PhD at Georgia Tech in architecture called me regarding a problem. He said, </p>
<blockquote><p>&#8220;I need to program something to create a polygon from points. Right now, the points are not being drawn in the right order so lines are being overlapped. How do I have the program draw them in the right order?&#8221;
</p></blockquote>
<p>So I came up with a theory of how to do it. The idea is that you find the average point between the points, and from that point you find the arc tangent to each of the points and order the points based on their angle to the center. This idea would only work in 2D, but I&#8217;m sure there is a general way to do it for all dimensions.</p>
<p>Here is the code written in actionscript. You can click to add a point and ctrl+click to delete a point. I put it on wonderfl because I am thinking some people could fork some more interesting things from it.<br />
<script type="text/javascript" src="http://wonderfl.net/blogparts/ytQj/js"></script>
<p class="ttlBpWonderfl" style="width: 465px; margin: 0; text-align: right; font-size: 11px;"><a href="http://wonderfl.net/c/ytQj" title="Auto create Polygon">Auto create Polygon &#8211; wonderfl build flash online</a></p>
]]></content:encoded>
			<wfw:commentRss>http://k2xl.com/wordpress/auto-create-polygon-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic Random Walk in Flash</title>
		<link>http://k2xl.com/wordpress/basic-random-walk-in-flash/</link>
		<comments>http://k2xl.com/wordpress/basic-random-walk-in-flash/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 22:43:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[draw]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[random walk]]></category>

		<guid isPermaLink="false">http://k2xl.com/wordpress/?p=221</guid>
		<description><![CDATA[Here&#8217;s a random walk program. I always wondered what the screen would look like if i had a dot move in a random direction. Click to refresh. View and fork this on WonderFl or Download the flash file here.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a random walk program. I always wondered what the screen would look like if i had a dot move in a random direction.</p>
<p>Click to refresh.</p>
<p><object width="512" height="512" data="http://www.k2xl.com/lab/randomwalk/RandomWalk.swf" type="application/x-shockwave-flash"><param name="src" value="http://www.k2xl.com/lab/randomwalk/RandomWalk.swf" /></object></p>
<p><a href="http://wonderfl.kayac.com/code/20f4711a5ffa95c99c3a96c0a5fc641ae9f8242f">View and fork this on WonderFl</a></p>
<p>or</p>
<p><a href="http://www.k2xl.com/lab/randomwalk/Randomness Walk Test.zip">Download the flash file here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://k2xl.com/wordpress/basic-random-walk-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Picture of Pictures</title>
		<link>http://k2xl.com/wordpress/picture-of-pictures/</link>
		<comments>http://k2xl.com/wordpress/picture-of-pictures/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 15:41:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[mosaic]]></category>
		<category><![CDATA[picture]]></category>

		<guid isPermaLink="false">http://k2xl.com/wordpress/?p=208</guid>
		<description><![CDATA[The Internet has provided a new means of data expression. I decided to play with the idea of machine aesthetics by developing an application that creates images of images.

I first saw this effect a long time ago on a poster advertisement for the Truman show. I always wondered how they made the effect of compiling images together to form, when looked at a certain distance, an image.  The program I made this week creates the effect by downloading Flickr images.]]></description>
			<content:encoded><![CDATA[<p>For my Experimental Digital Media class at Georgia Tech.</p>
<p><a href="http://www.k2xl.com/lab/picofpics/PictureOfPicture.php"><img src="http://img19.imageshack.us/img19/9361/rszpic0.jpg" alt="" width="304" height="286" /></a></p>
<p><a href="http://www.k2xl.com/lab/picofpics/PictureOfPicture.php">Click here to view</a><br />
(Must have Flash Player 10)</p>
<p>The Internet has provided a new means of data expression. I decided to play with the idea of machine aesthetics by developing an application that creates images of images.</p>
<p>I first saw this effect a long time ago on a <a href="http://img510.imageshack.us/img510/5716/trumanshowver1.jpg">poster advertisement for the Truman show</a>. I always wondered how they made the effect of compiling images together to form, when looked at a certain distance, an image.  The program I made this week creates the effect by downloading <a href="http://www.flickr.com">Flickr</a> images.</p>
<p>The algorithm is very straightforward (I also mention some ideas for expansion on the Flash). Basically the program downloads Flickr images either by the most recent, based on a search term, or from a username&#8217;s public photos via the <a href="http://code.google.com/p/as3flickrlib/">as3flickrlib</a>. While downloading, the application calculates and caches each photos average RGB color average (the main reason why my algorithm is fast). The program, based on the user&#8217;s supplied number of rows and columns, calculates the average RGB color of each divided cell and finds the image with the average color that has the closest 3D distance to the cell&#8217;s average color. The effect is pretty cool. I offer the ability to have a very high resolution (which basically expands the original image before running the algorithm to near the max of Flash Player 10&#8242;s bitmapData&#8217;s limit). The picture effect is  best seen with the highest resolution.</p>
<p>Lastly, thanks to Flash Player 10, saving images is added. I use the JPGEncoder from <a href="http://code.google.com/p/as3corelib/">as3corelib</a>. Unfortunately, the JPGEncoder was too slow as its algorithm is synchronous. Upon Googling &#8220;<a href="http://www.google.com/search?rlz=1C1GGLS_enUS291US305&amp;sourceid=chrome&amp;ie=UTF-8&amp;q=Asynchronous+JPG+Encoder">Asynchronous JPG Encoder</a>,&#8221; I found a <a href="http://www.switchonthecode.com/tutorials/flex-tutorial-an-asynchronous-jpeg-encoder">cool Asynchrnous JPG Encoder class by SwitchOnTheCode.com</a>. While I have crtiticisms on the class&#8217;s asynchronous technique choice, the class does what it says it does.</p>
<p>Anyway, if there is enough support, I may release the class as open source on Google Code. I think there are a lot of ways to alter the algorithm to produce different kinds of image results.</p>
]]></content:encoded>
			<wfw:commentRss>http://k2xl.com/wordpress/picture-of-pictures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

