<?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>Vershun's Brain Dump</title>
	<atom:link href="http://www.vershun.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vershun.com</link>
	<description>Worthless Mind Excretion</description>
	<lastBuildDate>Sun, 14 Feb 2010 02:45:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Decentralized Distributed Flash Proof of Concept</title>
		<link>http://www.vershun.com/computers/decentralized-distributed-flash-proof-of-concept.html</link>
		<comments>http://www.vershun.com/computers/decentralized-distributed-flash-proof-of-concept.html#comments</comments>
		<pubDate>Sun, 14 Feb 2010 02:45:22 +0000</pubDate>
		<dc:creator>Vershun</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[decentralized]]></category>
		<category><![CDATA[distributed computing]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.vershun.com/?p=304</guid>
		<description><![CDATA[Finished my lil&#8217; project I&#8217;ve been working on.  You can view it by clicking the link below.
View the app and participate in the network.
It doesn&#8217;t really have a name, but for the purposes of this post I&#8217;ll refer to it as DDFPOC (Decentralized Distributed Flash Proof-Of-Concept).
DDFPOC is a prototype for a new way of [...]]]></description>
			<content:encoded><![CDATA[<p>Finished my lil&#8217; project I&#8217;ve been working on.  You can view it by clicking the link below.</p>
<p><a href="http://www.vershun.com/projects/decentralizedpoc/ui/DecentralizedProcessing.html">View the app and participate in the network.</a></p>
<p>It doesn&#8217;t really have a name, but for the purposes of this post I&#8217;ll refer to it as DDFPOC (Decentralized Distributed Flash Proof-Of-Concept).</p>
<p>DDFPOC is a prototype for a new way of utilizing web traffic for computational purposes.  Inspired by projects like <a href="http://boinc.berkeley.edu/">BOINC</a> and <a href="http://folding.stanford.edu/">Folding@Home</a>, I wanted to find a way to have casual web surfers participate in a computational network just by visiting a webpage.  Deviating from the BOINC and Folding@Home models and my prior <a href="http://www.vershun.com/computers/hidden-flash-applications-as-distributed-computing-clients.html">Flash-based distributed computing POC</a>, I also wanted information sharing across the clients as opposed to a central location that aggregates all the separate work units together.  Finally, I wanted to have a visual representation of the network so the users could see what&#8217;s happening within the network and what the work units were doing.</p>
<p><strong>Implementation Details</strong></p>
<p>The client-side application was programmed entirely in Flex and uses the awesome dependency graph provided with <a href="http://flare.prefuse.org/">Flare</a>.  The server-side code is in PHP5.  The Flash application makes framework and worker requests to the server in set intervals.  The framework requests are to get the status of the network &#8212; who is currently in the network, who&#8217;s connected to who, and statistics.  The worker messages are for sending and receiving messages about the current worker.</p>
<p>Spoiler: it&#8217;s not really decentralized.  I didn&#8217;t make the program to do Flash-to-Flash communication, so messages passed between clients are routed through the server.</p>
<div id="attachment_305" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.vershun.com/wp-content/uploads/2010/02/implementationNetwork.jpg"><img class="size-medium wp-image-305" title="implementationNetwork" src="http://www.vershun.com/wp-content/uploads/2010/02/implementationNetwork-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">Green is a message in, red is that same message out.</p></div>
<p>There are 2 main parts to both the Flex and the PHP: the framework and the worker.  For Flex, the worker module only has to implement an interface.  If this project continues forward (which I doubt due to my project ADD), I would like to be able to add and remove worker modules during runtime.  That way the client could choose which project they would like to donate their CPU cycles to (much like BOINC).  The PHP is a bit more messy, and there&#8217;s a couple places where the implementation of the worker is coupled with the user management (such as clearing out expired users).  Aside from these few places, though, the PHP worker is pretty encapsulated and I don&#8217;t think it would be much work to make it entirely so.</p>
<p><strong>What&#8217;s With The Number Guesser?</strong></p>
<p>I chose to implement a random number guesser as the first POC worker for the following reasons: it&#8217;s easy to understand, the knowledge sharing is trivial, it didn&#8217;t have to be very visual.</p>
<p>On the PHP side: if there is no work unit out (a number had recently been found), the PHP worker generates a new number between 1-1000 and informs the client that there&#8217;s a new work unit.</p>
<p>On the Flash side: keep guessing numbers between 1-1000 until you find the answer or someone else does.</p>
<p>The knowledge sharing works as follows:  keep track of the numbers you guess and tell the neighbors you&#8217;re linked to what numbers you&#8217;ve tried.  When a neighbor informs you of their guesses, add them to your &#8220;already guessed&#8221; pile.  Forward on to your neighbor&#8217;s guesses to your neighbors.  Eventually the network will guess the number using all of the clients&#8217; memory of guessed numbers.</p>
<p><strong>In The Future</strong></p>
<p>This project was made to be throw-away, but if it were to continue forward I&#8217;d first like to completely decouple the framework and worker on the server side.  Next would be making the Flash worker load dynamically.</p>
<p>What I&#8217;d love to see is an actual application for this.</p>
<p><strong>Notes</strong></p>
<p>Keep in mind this is a POC and isn&#8217;t well tested, I expect bugs <img src='http://www.vershun.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
<p>Also, if there&#8217;s any interest I&#8217;d be happy to release the source code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vershun.com/computers/decentralized-distributed-flash-proof-of-concept.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick update</title>
		<link>http://www.vershun.com/uncategorized/quick-update.html</link>
		<comments>http://www.vershun.com/uncategorized/quick-update.html#comments</comments>
		<pubDate>Sat, 16 Jan 2010 09:14:58 +0000</pubDate>
		<dc:creator>Vershun</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.vershun.com/?p=302</guid>
		<description><![CDATA[Once again, an &#8220;I&#8217;m sorry I haven&#8217;t posted in forever&#8221; post.
My weight-gaining fun is over.
It started out great, and over the course of 2 weeks I gained around 12 pounds and I could express my joy with both my smile and the smile-shape my blossoming second chin made.  Disaster struck when I started putting [...]]]></description>
			<content:encoded><![CDATA[<p>Once again, an &#8220;I&#8217;m sorry I haven&#8217;t posted in forever&#8221; post.</p>
<p>My weight-gaining fun is over.</p>
<p>It started out great, and over the course of 2 weeks I gained around 12 pounds and I could express my joy with both my smile and the smile-shape my blossoming second chin made.  Disaster struck when I started putting on a pair of jeans and had to squeeze to get that button in the hole.  I signed up to be a fatty, not to replace all my clothing.</p>
<p>So now I&#8217;m back to being scrawny (thanks cigs) and I&#8217;m quite comfortable with it.  I suppose in life one has to give up some dreams in order to obtain more important ones (never shopping for clothes).</p>
<p>I&#8217;m working on a project now that I&#8217;m aiming to be out before Feb.  It&#8217;s just a toy POC flash app that demonstrates pseudo-decentralized distributed computing visually from within a browser, but the nerd in me is excited about it.</p>
<p>P.S.  I&#8217;m sorry I haven&#8217;t posted in forever.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vershun.com/uncategorized/quick-update.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another Random Blog (More Trash On The Internet)</title>
		<link>http://www.vershun.com/random/another-random-blog-more-trash-on-the-internet.html</link>
		<comments>http://www.vershun.com/random/another-random-blog-more-trash-on-the-internet.html#comments</comments>
		<pubDate>Wed, 09 Dec 2009 01:20:57 +0000</pubDate>
		<dc:creator>Vershun</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.vershun.com/?p=297</guid>
		<description><![CDATA[So I found a domain I owned and forgot to do anything with, so I&#8217;m going to try to do some longer posts on this site and reserve my other site for short, random, and girlie/emo shit.
Anyway, if anyone is interested it&#8217;s at http://www.aleatorics.com
Also, if you&#8217;re a gamer and play Modern Warfare 2 a friend [...]]]></description>
			<content:encoded><![CDATA[<p>So I found a domain I owned and forgot to do anything with, so I&#8217;m going to try to do some longer posts on this site and reserve my other site for short, random, and girlie/emo shit.</p>
<p>Anyway, if anyone is interested it&#8217;s at <a href="http://www.aleatorics.com">http://www.aleatorics.com</a></p>
<p>Also, if you&#8217;re a gamer and play Modern Warfare 2 a friend and I have compiled a <a href="http://www.mw2titles.com">list of modern warfare 2 titles</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vershun.com/random/another-random-blog-more-trash-on-the-internet.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>November and December:  A Warning</title>
		<link>http://www.vershun.com/uncategorized/november-and-december-a-warning.html</link>
		<comments>http://www.vershun.com/uncategorized/november-and-december-a-warning.html#comments</comments>
		<pubDate>Wed, 18 Nov 2009 03:17:41 +0000</pubDate>
		<dc:creator>Vershun</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.vershun.com/?p=294</guid>
		<description><![CDATA[I will fucking eat you.
With my 25th birthday nearing (hint: I like Qdoba gift certificates.  And hookers), my metabolism has decided that it has tortured me enough and it&#8217;s time for it to die in a deliciously blubbery coffin.  My goal is straightforward and simple: to become jolly big in time for Christmas. [...]]]></description>
			<content:encoded><![CDATA[<p>I will fucking eat you.</p>
<p>With my 25th birthday nearing (hint: I like Qdoba gift certificates.  And hookers), my metabolism has decided that it has tortured me enough and it&#8217;s time for it to die in a deliciously blubbery coffin.  My goal is straightforward and simple: to become jolly big in time for Christmas.  This will be accomplished by maximizing my caloric intake, minimizing my tobacco usage (farewell once again my sweet, sweet&#8230; sweet&#8230; sweet fire sticks), and participating in a whole lotta sitting-around-doing-shittism.</p>
<p>My last cigarette was Saturday, when I weighed 166.  I&#8217;m currently weighing in at a 170 and sky is the limit (or a cardiac arrest).</p>
<p>I&#8217;ll keep this blog a bit more updated for the next month while I, much like a bear preparing for hibernation, stuff myself full of hot, dense meat (nohomo) for the winter.</p>
<p>Also, check out this site for <a href="http://www.modernwarfare2titles.com">Modern Warfare 2 Titles</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vershun.com/uncategorized/november-and-december-a-warning.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Counterfeit Food</title>
		<link>http://www.vershun.com/signs/counterfeit-food.html</link>
		<comments>http://www.vershun.com/signs/counterfeit-food.html#comments</comments>
		<pubDate>Mon, 26 Oct 2009 03:23:47 +0000</pubDate>
		<dc:creator>Vershun</dc:creator>
				<category><![CDATA[Signs]]></category>

		<guid isPermaLink="false">http://www.vershun.com/?p=285</guid>
		<description><![CDATA[For reasons best left unsaid, I took a 6-7 mile walk home this Saturday starting at 3 AM.
I did run across this though, which made the walk a little more enjoyable.

]]></description>
			<content:encoded><![CDATA[<p>For reasons best left unsaid, I took a 6-7 mile walk home this Saturday starting at 3 AM.</p>
<p>I did run across this though, which made the walk a little more enjoyable.</p>
<p><img src="http://www.vershun.com/wp-content/uploads/2009/10/counterfeit-country-buffet-300x225.jpg" alt="Well that explains their ham." title="Well that explains their ham." width="300" height="225" class="aligncenter size-medium wp-image-286" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vershun.com/signs/counterfeit-food.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Waking Dreams</title>
		<link>http://www.vershun.com/random/waking-dreams.html</link>
		<comments>http://www.vershun.com/random/waking-dreams.html#comments</comments>
		<pubDate>Tue, 20 Oct 2009 05:30:14 +0000</pubDate>
		<dc:creator>Vershun</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.vershun.com/?p=280</guid>
		<description><![CDATA[Here&#8217;s something weird: I talk to imaginary people.  Sometimes, that is.  They&#8217;re not really imaginary friends &#8212; some of them are complete dicks &#8212; but they&#8217;re certainly not physical manifestations by any means.  It&#8217;s more of a drug-induced phenomenon, but with the drug being sleep.
I&#8217;ve always been a sleepwalker.  I remember [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s something weird: I talk to imaginary people.  Sometimes, that is.  They&#8217;re not really imaginary friends &#8212; some of them are complete dicks &#8212; but they&#8217;re certainly not physical manifestations by any means.  It&#8217;s more of a drug-induced phenomenon, but with the drug being sleep.</p>
<p>I&#8217;ve always been a sleepwalker.  I remember a few occasions when my friend&#8217;s parents would tell me I came downstairs long after I went asleep, walked around for a bit, and went back to where I was sleeping.  It&#8217;s fairly typical at that age to sleepwalk so no one really worried too much about it.  </p>
<p>My worst sleepwalking event happened at age 11 when I was at a cub scout camp.  My dad and I were sleeping in the same tent and when I got up my dad asked me where I was going.  &#8220;Bathroom,&#8221; I responded.  I woke up about a quarter of a mile away from camp, barefoot standing on a dirt road.</p>
<p>Sleepwalking fun fact:  sleepwalking generally occurs in phase 4 of sleep, a state in which your brain doesn&#8217;t retain any memories.  When you wake up from sleepwalking, your last memory is of you falling asleep.</p>
<p>The camp was in a forest so I didn&#8217;t have a good view of the surrounding area.  I knew what road I was on (there was only one road in and out of camp), but the road wound back and forth so I had no landmark to know where I was.  So I just ran in the direction I was facing.  Luckily, I hit the medical lodge which has staff on it 24/7, and a bewildered teenager drove me back to camp.</p>
<p>Sleepwalking died off during my early teen years.  Good thing too, since I was utilizing so much of my energy being an asshole and harboring my general disdain for everything.</p>
<p>So I hit 16 and being to have some trouble sleeping.  I develop a mild case of insomnia.  Sometimes when I did sleep, sleepwalking returned in a weird, bastardized version.</p>
<p>It all started out pretty mundane.  I would sit up in bed and think I was in wrong room (this is the feeling in dreams people sometimes describe as &#8220;you know I was, like, in my house but it, like, WASN&#8217;T my house&#8230; you know?&#8221;  Special note: if you&#8217;re telling me about your dream, that where I generally stop listening). Then I&#8217;d &#8220;wake up,&#8221; realize it was my room, and go back to bed.  The whole ordeal probably lasted seconds, and it didn&#8217;t happen often, so I chalked it up to stress and sleep deprivation. </p>
<p> So that&#8217;s how it was for six months or so.  After that, things started to get weird.</p>
<p>My first vivid memory of one of these things is I sat up in bed and saw that the floor was getting wet.  A slow stream of water was coming in from underneath my door and soaking everything.  I got up and moved everything that was on my floor to the dressers, bookshelves, my bed&#8230; anywhere where they wouldn&#8217;t get wet (I had a lot of shit on my floor).  Knowing that everything was safe and dry, I went back to sleep.</p>
<p>That wasn&#8217;t my only experience with water.  My poor girlfriend at the time woke up to me looking at her with a worried expression.  &#8220;Move up a bit&#8230; you&#8217;re going to get wet.&#8221;</p>
<p>People first appeared in my waking dreams freshman year of college.  There were numerous nights where I had to tiptoe around a multitude of sleeping bodies.  One time I woke up and saw the wrong person in my roommate&#8217;s bed.  I figured I must be in the wrong dorm room.  I was halfway down the hall, in my boxers, before I woke up.</p>
<p>I had a throwing knife stint early in college.  In my typical disgusting fashion, I&#8217;d throw everything in my pockets out on the floor before collapsing in bed.  This particular night I happened to be throwing earlier, so next to my bed lay my beautiful, perfectly-weighted knife.</p>
<p>Have you ever seen The Grudge?</p>
<p>The girl who crawls down the stairs at the end of The Grudge, sounding like a permanent dry heave, stared at my from the top of my closet.  Normally in my half-asleep daze, these hallucinations don&#8217;t really freak me out&#8230; this one was an exception.  I grabbed my knife, cocked my arm back (good form for under the covers if-I-do-say-so-myself) and then realized something very bad was about to happen and promptly woke up.</p>
<p>A while later, with the same girl that I was so concerned with staying dry years before, woke up to me staring at my closet.  &#8220;What&#8217;s the matter?&#8221; she asked, probably scared to death I was going to attack my closet (she&#8217;d heard of The Grudge girl who had taken residence my closet).  </p>
<p>&#8220;The person in my closet is telling us to leave,&#8221; I said.<br />
&#8220;What?!&#8221;<br />
&#8220;Oh&#8230; uhh nevermind.&#8221;  </p>
<p>And I went back to sleep.  I probably should have told her it was a dream, but in my defense, I was fucking tired.</p>
<p>People who sleep around me a lot generally got used to these little outbursts.  When I went camping with my best friend and old roommate, Doug, I woke up seeing bugs crawling all over our tent.</p>
<p>&#8220;There&#8217;s bugs all over our tent.&#8221;<br />
&#8220;You&#8217;re doing your dream thing dude.&#8221;<br />
&#8220;No I&#8217;m not.  Turn on your fucking flashlight.&#8221;<br />
Tired fumbling, light switches on.<br />
&#8220;Oh&#8230; I was dreaming.&#8221;<br />
&#8220;God damn it.&#8221;</p>
<p>Sometimes it&#8217;s a little insulting.  One time I was working late and I went into the kitchen to grab a beer and ran into Doug.  I asked him a random question I had been meaning to ask him earlier that day.  So whatever, I was disheveled, and the question probably wasn&#8217;t contextually significant by any means, but I still got a little pissed when he answered, &#8220;You&#8217;re dreaming.  Go back to bed.&#8221;</p>
<p>It was the place that Doug and I were roommates in that I had the weirdest series of waking dreams I&#8217;ve ever had.  I had never have repeats of people; in every waking dream they&#8217;re different.  Furthermore, I get them rather infrequently.  So when the same two people showed up every night for a week, things got a little uncomfortable.</p>
<p>My computer chair always faced my bed when I was asleep.  This is because I&#8217;d internet a bit (OK, a lot) before I went to sleep, then plant my feet on the ground and reverse pendulum into bed.  Every night for a week, I woke up to some guy in the chair, staring at me.  Something was very wrong with him&#8230; he looked like he was in the first stages of decay (or perhaps just had a touch of zombie flu).  A girl, probably around 10 years old, was in the corner of my room, hugging her shins tightly, her face buried in her knees, staring at me.  A hole was in the upper part of her forehead.  I tried to talk to them, engage them in some way, nothing.  They just watched.</p>
<p>I didn&#8217;t sleep much that week.</p>
<p>My dreams stopped for a long while.  When I was on the road last year I don&#8217;t think I had one (thank God).  In this new place, however, I&#8217;ve had quite a few.  I walked out of my room to see a woman reading at my table.</p>
<p>&#8220;Hi.&#8221;<br />
&#8220;Hi.&#8221;<br />
Wakeup.</p>
<p>I went clay shooting a couple weeks ago.  It was amazing.  I talked myself into purchasing a new shotgun the following week.  Two days after shooting I chased two guys dressed in black from my living room into my study yelling &#8220;GET THE FUCK OUT OF HERE!&#8221;  I decided firearms aren&#8217;t the best thing for me to have laying around the house.</p>
<p>So who knows what&#8217;s going on.  All I know is although sometimes it&#8217;s kinda awkward (try dream walking in a 12 bunk hostel room full of strangers sometime), it&#8217;s at least generally pretty entertaining.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vershun.com/random/waking-dreams.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Call me old fashioned</title>
		<link>http://www.vershun.com/random/call-me-old-fashioned.html</link>
		<comments>http://www.vershun.com/random/call-me-old-fashioned.html#comments</comments>
		<pubDate>Sat, 05 Sep 2009 01:11:52 +0000</pubDate>
		<dc:creator>Vershun</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.vershun.com/?p=277</guid>
		<description><![CDATA[But I wish porn stars would take off their wedding rings before filming.
]]></description>
			<content:encoded><![CDATA[<p>But I wish porn stars would take off their wedding rings before filming.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vershun.com/random/call-me-old-fashioned.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stupid Purchase</title>
		<link>http://www.vershun.com/random/stupid_purchase.html</link>
		<comments>http://www.vershun.com/random/stupid_purchase.html#comments</comments>
		<pubDate>Tue, 25 Aug 2009 03:23:20 +0000</pubDate>
		<dc:creator>Vershun</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.vershun.com/?p=269</guid>
		<description><![CDATA[In attempt #23581 to quit smoking, I spent $15 on flavored toothpicks:


That wasn&#8217;t my stupid purchase though.

]]></description>
			<content:encoded><![CDATA[<p>In attempt #23581 to quit smoking, I spent $15 on flavored toothpicks:</p>
<p><img src="http://www.vershun.com/wp-content/uploads/2009/08/treeteaoiltoothpicks.jpg" alt="Tree Tea Oil Toothpicks" title="Tree Tea Oil Toothpicks" width="575" height="270" class="aligncenter size-full wp-image-270" /></p>
<p><br/><br/><br/><br/><br/><br/><br/><br/></p>
<p>That wasn&#8217;t my stupid purchase though.</p>
<p><img src="http://www.vershun.com/wp-content/uploads/2009/08/treeteaoiltoothpickswithcigs.jpg" alt="Tree Tea Oil Toothpicks and Cigs" title="Tree Tea Oil Toothpicks and Cigs" width="800" height="315" class="aligncenter size-full wp-image-271" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vershun.com/random/stupid_purchase.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Barebones application for visualizing swarms (2D)</title>
		<link>http://www.vershun.com/computers/visualizing-swarms/barebones-application-for-visualizing-swarms-2d.html</link>
		<comments>http://www.vershun.com/computers/visualizing-swarms/barebones-application-for-visualizing-swarms-2d.html#comments</comments>
		<pubDate>Sun, 17 May 2009 04:36:41 +0000</pubDate>
		<dc:creator>Vershun</dc:creator>
				<category><![CDATA[Visualizing Swarms]]></category>

		<guid isPermaLink="false">http://www.vershun.com/?p=254</guid>
		<description><![CDATA[So I&#8217;ve decided to play around a bit for my own giggles and make some swarm stuff.  Emergent behavior is the bee&#8217;s knees and I think it will be a lot of fun to code up some visual representations of it.
This is the very first step in the processes.  It&#8217;s not quite a &#8220;framework,&#8221; but [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve decided to play around a bit for my own giggles and make some swarm stuff.  Emergent behavior is the bee&#8217;s knees and I think it will be a lot of fun to code up some visual representations of it.</p>
<p>This is the very first step in the processes.  It&#8217;s not quite a &#8220;framework,&#8221; but more of a template.  Click to activate the ants, slide to change the speed.</p>
<p><object width="505" height="375" data="http://www.vershun.com/projects/ants_template/ants.swf" type="application/x-shockwave-flash"><param name="quality" value="high" /><param name="bgcolor" value="#869ca7" /><param name="allowScriptAccess" value="sameDomain" /><param name="src" value="http://www.vershun.com/projects/ants_template/srcview" /></object></p>
<p>You can right click and view source.  The code is very rudimentary and the only slightly interesting part is how the ants decide to move.</p>
<blockquote>
<pre>var stuckCounter:int = 90;

do
{
	var randomAngle:uint = rotation + ((Math.random() * stuckCounter) - (stuckCounter / 2));
	var randomDistance:uint = Math.random() * 70 + 10;

	var randX:int = randomDistance * Math.cos(randomAngle * (Ant.TO_RADIANS));
	var randY:int = randomDistance * Math.sin(randomAngle * (Ant.TO_RADIANS));
	stuckCounter++;
} while (environment.isObstructionInPath(x, y, x + randX, y + randY));</pre>
</blockquote>
<p>The code is pretty self explanatory (hopefully), but basically the ant is choosing a random direction within its scope (45 degrees both left and right of it&#8217;s current rotation), generates a random distance to travel, and checks with the environment to make sure there&#8217;s no obstructions within its projected trajectory.  If there&#8217;s an obstruction, add 1 degree to the randomizer and repeat.  Using randomly chosen angles along with a slow increase in the randomized range helps give a more realistic look of obstacle avoidance than other methods (say, flipping rotation).</p>
<p>I&#8217;ll be adding more to this section when I get some motivated down time to play, but this week it&#8217;s all about the R&#038;R.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vershun.com/computers/visualizing-swarms/barebones-application-for-visualizing-swarms-2d.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some Meetings this Week</title>
		<link>http://www.vershun.com/random/some-meetings-this-week.html</link>
		<comments>http://www.vershun.com/random/some-meetings-this-week.html#comments</comments>
		<pubDate>Thu, 16 Apr 2009 06:10:19 +0000</pubDate>
		<dc:creator>Vershun</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.vershun.com/?p=248</guid>
		<description><![CDATA[What:  Off-the-wagon AA Meeting
Where:  Alley behind Pat&#8217;s Pub
When:  Sunday 3AM
Topic:  This meeting will mainly be for warmth.  Dan said he&#8217;ll bring the booze.
What:  Smokers Break Group
Where:  Right outside the building
When:  During the time we should be working
Topic:  We will vary topic of conversation from the latest office gossip to newest cancer treatments.
What:  Consortium of Public School Students
Where:  Karen&#8217;s Mom&#8217;s Basement
When:  Tuesday after school
Topic:  We will delve into [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What:</strong>  Off-the-wagon AA Meeting<br />
<strong>Where:</strong>  Alley behind Pat&#8217;s Pub<br />
<strong>When:</strong>  Sunday 3AM<br />
<strong>Topic:</strong>  This meeting will mainly be for warmth.  Dan said he&#8217;ll bring the booze.</p>
<p><strong>What</strong>:  Smokers Break Group<br />
<strong>Where</strong>:  Right outside the building<br />
<strong>When</strong>:  During the time we should be working<br />
<strong>Topic</strong>:  We will vary topic of conversation from the latest office gossip to newest cancer treatments.</p>
<p><strong>What</strong>:  Consortium of Public School Students<br />
<strong>Where</strong>:  Karen&#8217;s Mom&#8217;s Basement<br />
<strong>When</strong>:  Tuesday after school<br />
<strong>Topic</strong>:  We will delve into the proper use and handling of handheld firearms.  Moving target practice afterward for interested parties.</p>
<p><strong>What</strong>:  Hipster Colloquium<br />
<strong>Where</strong>:  The local coffee shop.  No, not THAT corporate trash one, the other one.<br />
<strong>When</strong>:  Jill&#8217;s break<br />
<strong>Topic</strong>:  We&#8217;ll pseudo-intellectually complain about important things such as society, government, and foreign affairs.  Other issues that we&#8217;re too worthless to ever change will also be discussed.  Toward the end of the meeting we&#8217;ll express our overwhelming individuality by discussing obscure music we all listen to and planning new fleeting trends that we all follow.</p>
<p><strong>What</strong>:  A Banker&#8217;s Dozen<br />
<strong>Where</strong>:  Central Park (location might be moved to the Plaza Hotel pending a government subsidy)<br />
<strong>When</strong>:  12 PM, Friday (after hours)<br />
<strong>Topic</strong>:  Fantastic presentation from some of the leading experts on how to use the government and taxpayer money to profit from a failing business.  This will be followed by an open discussion on new investment strategies, such as buying expired milk for cheap in hopes it turns into Gouda cheese.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vershun.com/random/some-meetings-this-week.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
