<?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>DevLog</title>
	<atom:link href="http://bluethen.com/wordpress/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://bluethen.com/wordpress</link>
	<description></description>
	<lastBuildDate>Fri, 10 Feb 2012 03:49:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Ragdoll Animator</title>
		<link>http://bluethen.com/wordpress/index.php/processing-app/ragdoll-animator/</link>
		<comments>http://bluethen.com/wordpress/index.php/processing-app/ragdoll-animator/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 19:55:22 +0000</pubDate>
		<dc:creator>BlueThen</dc:creator>
				<category><![CDATA[Processing App]]></category>
		<category><![CDATA[Processing.js]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://bluethen.com/wordpress/?p=829</guid>
		<description><![CDATA[Click here to try out Ragdoll Animator Very crude example animation: here. Copy/paste it into the textarea at the animator page, then click &#8220;Load from textarea.&#8221; For the past two weeks I&#8217;ve been working on a simple Verlet-based Animator. Everytime you click &#8220;Add Frame&#8221; (or press spacebar), the animator tries to predict your next frame [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/RagdollAnimator"><img src="http://bluethen.com/wordpress/wp-content/uploads/2011/08/rdaPost.jpg" alt="" title="rdaPost" width="200" height="350" class="alignleft size-full wp-image-830" /></a>
<p style="line-height:20pt;"><a href="/RagdollAnimator">Click here to try out Ragdoll Animator</a></p>
<p>Very crude example animation: <a href="http://pastebin.com/xM9p0YUi">here</a>. Copy/paste it into the textarea at the <a href="/RagdollAnimator">animator page</a>, then click &#8220;Load from textarea.&#8221;</p>
<p>For the past two weeks I&#8217;ve been working on a simple Verlet-based Animator. Everytime you click &#8220;Add Frame&#8221; (or press spacebar), the animator tries to predict your next frame by apply motion to the stickman. You can even simulate it in real time by holding spacebar and grabbing the stickman and flinging him around. There&#8217;s a lot of other cool things you can do here, but I&#8217;ll leave it to you to find out.</p>
<p>Ragdoll Animator, like most of my stuff, was programmed in <a href="http://processing.org/">Processing</a>. Instead of compiling it as a Java Applet this time I instead used <a href="http://processingjs.org/">Processing.js</a>.</p>
<p>The creation of Ragdoll Animator was made with the help of some of the Processing.js dev team, especially <a href="http://twitter.com/TheRealPomax">Pomax</a>, who was willing to tolerate my countless questions about code design.</p>
<p>For animators: My animation example is very crude and I&#8217;m certain other people are more capable than me at making something neat. Paste your animations at <a href="http://pastebin.com/">PasteBin</a> and <a href="http://twitter.com/intent/tweet?hashtags=ragdollanimator&#038;via=BlueThen&#038;text=http://bluethen.com/RagdollAnimator/">tweet them</a>! I&#8217;ll be sure to include animations tweeted in later blog posts.</p>
<p>Source code info after the break.<br />
<span id="more-829"></span><br />
For programmers and aspiring programmers: I&#8217;ve included the source to Ragdoll Animator in its webpage. <a href="/RagdollAnimator/source.zip">Here&#8217;s a shortcut to the source</a>. Comments are scattered throughout the code to better help you understand how it works. I designed the program to be able to be ran as a Applet compiled through <a href="http://processing.org/">Processing</a>. If you truly wish, you can also run it using Processing.js, which is included in the source. The biggest difference between the Javascript and Java versions is that the data is saved differently. Data in javascript is encoded using <a href="http://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch">LZW compression</a>, where-as data in the Java version isn&#8217;t encoded using any sort of compression.</p>
 <img src="http://bluethen.com/wordpress/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=829" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://bluethen.com/wordpress/index.php/processing-app/ragdoll-animator/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Changes to Curtain</title>
		<link>http://bluethen.com/wordpress/index.php/dev-log/changes-to-curtain/</link>
		<comments>http://bluethen.com/wordpress/index.php/dev-log/changes-to-curtain/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 21:10:11 +0000</pubDate>
		<dc:creator>BlueThen</dc:creator>
				<category><![CDATA[Dev Log]]></category>
		<category><![CDATA[Processing App]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://bluethen.com/wordpress/?p=817</guid>
		<description><![CDATA[Click here to see How to Make a Fabric Simulator Click here to see How to Make a Fabric Simulator Part 2 Yesterday and today I made some long needed changes to Curtain&#8216;s code. Most of it is behind the scenes stuff. The most noticeable change will be how it interacts with the mouse. It [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/wordpress/index.php/processing-apps/curtain/"><img src="http://bluethen.com/wordpress/wp-content/uploads/2011/07/anotherCurtainPost.jpg" alt="" title="Curtain" width="200" height="350" class="alignleft size-full wp-image-818" /></a></p>
<p style="line-height:20pt;"><a href="/wordpress/index.php/processing-app/curtain/">Click here to see How to Make a Fabric Simulator</a></p>
<p style="line-height:20pt;"><a href="/wordpress/index.php/processing-app/updated-cloth-simulator-and-how-to-improve-your-verlet-cloth-simulator/">Click here to see How to Make a Fabric Simulator Part 2</a></p>
<p style="line-height:20pt;">Yesterday and today I made some long needed changes to <a href="/wordpress/index.php/processing-apps/curtain/">Curtain</a>&#8216;s code. Most of it is behind the scenes stuff. The most noticeable change will be how it interacts with the mouse. It should now be a lot smoother and when the user is tearing (right clicking), it wont just tear at points it sees the cursor at, but it&#8217;ll tear ALL points between the cursor&#8217;s current and previous positions. Meaning it&#8217;s now a lot easier to slice the curtain in half with just one swipe.</p>
<p style="line-height:20pt;">You might also notice changes in the speed since the majority of the changes are optimization. You&#8217;ll only notice it if Curtain was laggy or slow for you before this update. To try out the newly optimized <a href="/wordpress/index.php/processing-apps/curtain/">Curtain</a>, check it out here. You can also check out its source <a href="http://www.openprocessing.org/visuals/?visualID=20140">here </a>or <a href="http://www.hawkee.com/apps/17175554/">here</a>. To see a list of updates, jump to the end of the post.</p>
<p><span id="more-817"></span></p>
<p style="line-height:20pt;">In addition to cleaning up some of Curtain, I&#8217;ve made a completely new version of the fabric simulator with my main emphasis on performance. Check it out <a href="/secretApplets/superFabric/applet/">here</a>.</p>
<p style="line-height:20pt;">Changes made to Curtain:</p>
<ul>
<li>Removed unnecessary &#8220;fixedDeltaTimeSeconds = fixedDeltaTime/1000&#8243; in code.</li>
<li>leftOverDeltaTime now properly accumulates</li>
<li>Made changes to Particle.updateInteraction (it&#8217;s moved to along side the physics update)</li>
<li>Simplified some function parameters (namely Link&#8217;s constructors and function inside Particle)</li>
<li>Moved Link drawing into Link, instead of Particle</li>
<li>Removed translate(width/2,height/2) in draw</li>
<li>Removed a for loop for drawing, and put the drawing into the physics loop with the condition of it only running on the last loop</li>
<li>Moved the pinned constraint in Particle&#8217;s update() to solveConstraints()</li>
<li>Interaction now takes into account every point between pmouse and mouse</li>
</ul>
<p></br></p>
 <img src="http://bluethen.com/wordpress/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=817" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://bluethen.com/wordpress/index.php/dev-log/changes-to-curtain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nebula Generator</title>
		<link>http://bluethen.com/wordpress/index.php/processing-app/nebula-generator/</link>
		<comments>http://bluethen.com/wordpress/index.php/processing-app/nebula-generator/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 02:33:26 +0000</pubDate>
		<dc:creator>BlueThen</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[Processing App]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[algorithmic]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[beautiful]]></category>
		<category><![CDATA[nebula]]></category>
		<category><![CDATA[procedural]]></category>

		<guid isPermaLink="false">http://bluethen.com/wordpress/?p=781</guid>
		<description><![CDATA[A lot of the pictures in Algorithmic Art were made using a program I started on a few days ago. I took Curtain and made it 3D. The fabric gets created in the center of the screen, with different parts of it being accelerated in all directions. It&#8217;s rendered onto the screen semi-transparently over and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bluethen.com/wordpress/index.php/nebula-generator/"><img src="http://bluethen.com/wordpress/wp-content/uploads/2011/07/nebGenPos.jpg" alt="" title="Nebula Generator" width="200" height="350" class="alignleft size-full wp-image-799" /></a>
<p style="line-height:20pt;">A lot of the pictures in <a href="/wordpress/index.php/algorithmic-art/" title="Algorithmic Art" target="_blank">Algorithmic Art </a>were made using a program I started on a few days ago. I took <a href="/wordpress/index.php/processing-apps/curtain/" title="Curtain" target="_blank">Curtain</a> and made it 3D. The fabric gets created in the center of the screen, with different parts of it being accelerated in all directions. It&#8217;s rendered onto the screen semi-transparently over and over and eventually you get a very organic nebula-like piece of art.</p>
<p style="line-height:20pt;">I feel like a lot of what makes the pictures amazing is watching the nebula itself grow. I cleaned it up, and <a href="/wordpress/index.php/processing-apps/nebula-generator/" title="Nebula Generator" target="_blank">released the applet online which you can try by clicking here</a>. I&#8217;ve also uploaded the source on <a href="http://www.openprocessing.org/visuals/?visualID=30891" title="Nebula Generator on OpenProcessing" target="_blank">OpenProcessing</a> and <a href="http://www.hawkee.com/apps/19319423/" title="Nebula Generator on Hawkee" target="_blank">Hawkee</a></p>
<p style="line-height:20pt;">Don&#8217;t forget I have a <a href="http://twitter.com/bluethen">Twitter</a>, also a <a href="http://plus.google.com/110896868830191907860">Google Plus profile</a>.</p>
 <img src="http://bluethen.com/wordpress/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=781" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://bluethen.com/wordpress/index.php/processing-app/nebula-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Algorithmic Art</title>
		<link>http://bluethen.com/wordpress/index.php/art/algorithmic-art/</link>
		<comments>http://bluethen.com/wordpress/index.php/art/algorithmic-art/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 19:46:03 +0000</pubDate>
		<dc:creator>BlueThen</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[beautiful]]></category>
		<category><![CDATA[colorful]]></category>
		<category><![CDATA[nebula]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://bluethen.com/wordpress/?p=775</guid>
		<description><![CDATA[I added a page (link at the top of each page) for showcasing pictures generated using algorithms. Every now and then I might post a series of pictures and make a post here about them, but I mostly talk about the art on Twitter. Follow me if you haven&#8217;t already!]]></description>
			<content:encoded><![CDATA[<p><a href="http://bluethen.com/wordpress/wp-content/uploads/2011/07/algArtPost.jpg"><img src="http://bluethen.com/wordpress/wp-content/uploads/2011/07/algArtPost.jpg" alt="" title="Alg Art Post" width="200" height="350" class="alignleft size-full wp-image-776" /></a>
<p style="line-height:20pt;">I added <a href="/wordpress/index.php/algorithmic-art/">a page</a> (link at the top of each page) for showcasing pictures generated using algorithms. Every now and then I might post a series of pictures and make a post here about them, but I mostly talk about the art on <a href="http://twitter.com/bluethen">Twitter</a>. Follow me if you haven&#8217;t already!</p>
 <img src="http://bluethen.com/wordpress/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=775" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://bluethen.com/wordpress/index.php/art/algorithmic-art/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Circus Fluid source released</title>
		<link>http://bluethen.com/wordpress/index.php/processing-app/circus-fluid-source-released/</link>
		<comments>http://bluethen.com/wordpress/index.php/processing-app/circus-fluid-source-released/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 18:57:25 +0000</pubDate>
		<dc:creator>BlueThen</dc:creator>
				<category><![CDATA[Processing App]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[circus]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[colorful]]></category>
		<category><![CDATA[fluid]]></category>
		<category><![CDATA[hue]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[wave]]></category>

		<guid isPermaLink="false">http://bluethen.com/wordpress/?p=698</guid>
		<description><![CDATA[I cleaned up the code, added some comments, and released the source to Circus Fluid. It looks a bit different than the older version: the shadows are deeper, and the colors are smoother. Please leave feedback/criticism wherever you like. The source can be viewed either on OpenProcessing or Hawkee. If there&#8217;s anywhere else I should [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.openprocessing.org/visuals/?visualID=29833"><img src="http://bluethen.com/wordpress/wp-content/uploads/2011/06/circusFluidSource.jpg" alt="" title="circusFluidSource" width="200" height="350" class="alignleft size-full wp-image-699" /></a>
<p style="line-height:20pt;">I cleaned up the code, added some comments, and released the source to <a href="http://bluethen.com/wordpress/index.php/processing-apps/circus-fluid/">Circus Fluid</a>. It looks a bit different than the older version: the shadows are deeper, and the colors are smoother. Please leave feedback/criticism wherever you like.</p>
<p style="line-height:20pt;">The source can be viewed either on <a href="http://www.openprocessing.org/visuals/?visualID=29833">OpenProcessing </a>or <a href="http://www.hawkee.com/apps/18703078/">Hawkee</a>. If there&#8217;s anywhere else I should start releasing sources and applets, let me know!</p>
 <img src="http://bluethen.com/wordpress/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=698" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://bluethen.com/wordpress/index.php/processing-app/circus-fluid-source-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Circus Fluid</title>
		<link>http://bluethen.com/wordpress/index.php/processing-app/circus-fluid/</link>
		<comments>http://bluethen.com/wordpress/index.php/processing-app/circus-fluid/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 14:34:10 +0000</pubDate>
		<dc:creator>BlueThen</dc:creator>
				<category><![CDATA[Processing App]]></category>
		<category><![CDATA[circus]]></category>
		<category><![CDATA[colorful]]></category>
		<category><![CDATA[fluid]]></category>
		<category><![CDATA[hues]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[rainbow]]></category>

		<guid isPermaLink="false">http://bluethen.com/wordpress/?p=683</guid>
		<description><![CDATA[This weekend I made a trippy fluid applet. The brightness of each pixel is determined by the velocity, and the hue is determined by the density. This uses a simple algorithm that&#8217;s explained pretty well at in this powerpoint here. Click here to see the fluid. Also check out my Twitter.]]></description>
			<content:encoded><![CDATA[<p><a href="http://bluethen.com/wordpress/wp-content/uploads/2011/06/trippyFluidPost.jpg"><img src="http://bluethen.com/wordpress/wp-content/uploads/2011/06/trippyFluidPost.jpg" alt="" title="trippyFluidPost" width="200" height="350" class="alignleft size-full wp-image-686" /></a>
<p style="line-height:20pt;">This weekend I made a trippy fluid applet. The brightness of each pixel is determined by the velocity, and the hue is determined by the density. This uses a simple algorithm that&#8217;s explained pretty well at in this powerpoint <a href="http://www.cs.ubc.ca/~rbridson/fluidsimulation/GameFluids2007.pdf">here</a>.</p>
<p style="line-height:20pt;"><a href="http://bluethen.com/wordpress/index.php/processing-apps/circus-fluid/">Click here to see the fluid.</a></p>
<p style="line-height:20pt;">Also check out <a href="http://twitter.com/bluethen">my Twitter</a>.</p>
 <img src="http://bluethen.com/wordpress/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=683" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://bluethen.com/wordpress/index.php/processing-app/circus-fluid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Verlet Car</title>
		<link>http://bluethen.com/wordpress/index.php/processing-app/verlet-car/</link>
		<comments>http://bluethen.com/wordpress/index.php/processing-app/verlet-car/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 20:34:30 +0000</pubDate>
		<dc:creator>BlueThen</dc:creator>
				<category><![CDATA[Processing App]]></category>
		<category><![CDATA[car]]></category>
		<category><![CDATA[hawkee]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[rainbow]]></category>
		<category><![CDATA[verlet]]></category>
		<category><![CDATA[verlet integration]]></category>

		<guid isPermaLink="false">http://bluethen.com/wordpress/?p=632</guid>
		<description><![CDATA[Today I&#8217;ve further extended the verlet algorithm and created a Car from it. At the moment it&#8217;s just a box with wheels, but in the future I&#8217;d like to allow weight-shifting to it, so it can be played it be like those motocross games. When and if I finish it, I&#8217;ll clean up the code [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bluethen.com/wordpress/index.php/processing-apps/car/"><img src="http://bluethen.com/wordpress/wp-content/uploads/2011/04/verletCarPos.jpg" alt="" title="verletCarPos" width="200" height="350" class="alignleft size-full wp-image-633" /></a>
<p style="line-height:20pt;">Today I&#8217;ve further extended the verlet algorithm and created a <a href="/wordpress/index.php/processing-apps/car/">Car </a>from it. At the moment it&#8217;s just a box with wheels, but in the future I&#8217;d like to allow weight-shifting to it, so it can be played it be like those <a href="http://www.addictinggames.com/maxdirtbike.html">motocross</a> games. When and if I finish it, I&#8217;ll clean up the code and open-source it on <a href="http://www.openprocessing.org/">http://www.openprocessing.org/</a> and <a href="http://www.hawkee.com/">http://www.hawkee.com</a>.</p>
<p style="line-height:20pt;">Also check out my Twitter: <a href="http://twitter.com/bluethen">@BlueThen</a>.</p>
 <img src="http://bluethen.com/wordpress/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=632" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://bluethen.com/wordpress/index.php/processing-app/verlet-car/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter: @BlueThen</title>
		<link>http://bluethen.com/wordpress/index.php/personal/twitter-bluethen/</link>
		<comments>http://bluethen.com/wordpress/index.php/personal/twitter-bluethen/#comments</comments>
		<pubDate>Sun, 13 Mar 2011 01:34:51 +0000</pubDate>
		<dc:creator>BlueThen</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://bluethen.com/wordpress/?p=627</guid>
		<description><![CDATA[For quick updates and thoughts, I&#8217;ll be posting on Twitter: @BlueThen Thanks!]]></description>
			<content:encoded><![CDATA[<p style="line-height:20pt;">For quick updates and thoughts, I&#8217;ll be posting on Twitter: <a href="http://twitter.com/bluethen">@BlueThen</a><br />
Thanks!</p>
 <img src="http://bluethen.com/wordpress/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=627" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://bluethen.com/wordpress/index.php/personal/twitter-bluethen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ragdoll Aquarium</title>
		<link>http://bluethen.com/wordpress/index.php/processing-app/ragdoll-aquarium/</link>
		<comments>http://bluethen.com/wordpress/index.php/processing-app/ragdoll-aquarium/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 17:16:54 +0000</pubDate>
		<dc:creator>BlueThen</dc:creator>
				<category><![CDATA[Processing App]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[ragdoll]]></category>
		<category><![CDATA[ragdolls]]></category>
		<category><![CDATA[simulator]]></category>
		<category><![CDATA[verlet]]></category>
		<category><![CDATA[verlet integration]]></category>

		<guid isPermaLink="false">http://bluethen.com/wordpress/?p=620</guid>
		<description><![CDATA[Short post here. As promised, here&#8217;s the source to the ragdoll applet I released a few weeks back: http://www.openprocessing.org/visuals/?visualID=22598 Press &#8216;r&#8217; to reset. Click and drag to interact. In this applet, we make use of the Verlet Integration method from Curtain, and create little ragdolls. I did my best to comment the code for others [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.openprocessing.org/visuals/?visualID=22598"><img src="http://bluethen.com/wordpress/wp-content/uploads/2011/03/ragdollicon.jpg" alt="" title="Ragdoll Aquarium" width="100" height="100" class="alignleft size-full wp-image-622" /></a>
<p style="line-height:20pt;">Short post here. As promised, here&#8217;s the source to the ragdoll applet I released a few weeks back: <a href="http://www.openprocessing.org/visuals/?visualID=22598">http://www.openprocessing.org/visuals/?visualID=22598</a></p>
<p style="line-height:20pt;">Press &#8216;r&#8217; to reset. Click and drag to interact.</p>
<p style="line-height:20pt;">In this applet, we make use of the Verlet Integration method from Curtain, and create little ragdolls.</p>
<p>I did my best to comment the code for others to use.</p>
 <img src="http://bluethen.com/wordpress/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=620" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://bluethen.com/wordpress/index.php/processing-app/ragdoll-aquarium/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with Ragdolls</title>
		<link>http://bluethen.com/wordpress/index.php/processing-app/fun-with-ragdolls-2/</link>
		<comments>http://bluethen.com/wordpress/index.php/processing-app/fun-with-ragdolls-2/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 21:21:30 +0000</pubDate>
		<dc:creator>BlueThen</dc:creator>
				<category><![CDATA[Processing App]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[body]]></category>
		<category><![CDATA[length]]></category>
		<category><![CDATA[mass]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[proportions]]></category>
		<category><![CDATA[ragdoll]]></category>
		<category><![CDATA[ragdolls]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[verlet]]></category>
		<category><![CDATA[verlet integration]]></category>

		<guid isPermaLink="false">http://bluethen.com/wordpress/?p=578</guid>
		<description><![CDATA[Since I finished Curtain, I&#8217;ve been experimenting with simulating ragdolls. Click here to play with some ragdolls. For programmers out there interested in the source: hang tight. I haven&#8217;t finished cleaning up the source completely yet, but it&#8217;ll be released soon (All my sources are released at OpenProcessing). There&#8217;s something about ragdolls that I enjoy [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.bluethen.com/wordpress/index.php/processing-apps/ragdolls/"><img src="http://bluethen.com/wordpress/wp-content/uploads/2011/02/ragdollPost.jpg" alt="" title="ragdollPost" width="200" height="350" class="alignleft size-full wp-image-561" /></a>
<p style="line-height:20pt;">Since I finished Curtain, I&#8217;ve been experimenting with simulating ragdolls. <a href="http://www.bluethen.com/wordpress/index.php/processing-apps/ragdolls/">Click here to play with some ragdolls</a>. For programmers out there interested in the source: hang tight. I haven&#8217;t finished cleaning up the source completely yet, but it&#8217;ll be released soon (All my sources are released at <a href="http://www.openprocessing.org/portal/?userID=3044">OpenProcessing</a>).</p>
<p style="line-height:20pt;">There&#8217;s something about ragdolls that I enjoy a lot. You can swing them, fling them, smash &#8216;em and put &#8216;em in a pot. What I made wasn&#8217;t exactly full body 3D ragdolls, but it&#8217;s set the path for further ragdoll fun for myself. Check the rest of the post for further ragdoll mechanics and what-not. Keep in mind the &#8220;constraints&#8221;, &#8220;masses&#8221;, and other stuff involve the algorithms in my Verlet Integration tutorial. (<a href="http://bluethen.com/wordpress/index.php/processing-app/curtain/">Part 1</a>, <a href="http://bluethen.com/wordpress/index.php/processing-app/updated-cloth-simulator-and-how-to-improve-your-verlet-cloth-simulator/">Part 2</a>)</p>
<p><span id="more-578"></span><br />
</p>
<h3>Human Proportions</h3>
<p style="line-height:20pt;">(Some of these links may include drawn nudity. So be warned, those at work with sensitive bosses) The first problem that I had to tackle was human proportions. I wanted all of the body parts to be proportionally correct. Not that the simulation is meant to be accurate, but it sets up a good resource for myself in the future.</p>
<p style="line-height:20pt;">In my code the ragdoll is created with a set height. The headLength is calculated by taking the height and dividing by 7.5. Most resources imply that a body is typically 7 to 7.5 heads high. It is normally less than that as the person gets younger (3 for a baby, 4 for a toddler, 5 for a child, and so on). In classical art <a href="http://www.the-philosopher.co.uk/humaes/greek.htm">the ideal human is often portrayed as 8 heads tall,</a> although it depended on the artist and their style.</p>
<p style="line-height:20pt;">One of the more well known studies of proportions was <a href="http://en.wikipedia.org/wiki/Vitruvian_Man">Leonardo da Vinci&#8217;s Vitruvian Man.</a> Another detailed resource includes <a href="http://www.idrawdigital.com/2009/01/tutorial-anatomy-and-proportion/">idrawdigital&#8217;s tutorial on Anatomy and Proportion</a> and an even more detailed one (which measures everything with head widths and head lengths conveniently) is <a href="http://www.idrawdigital.com/2009/01/tutorial-anatomy-and-proportion/">Donald A. Jusko&#8217;s Human Portions article</a>.</p>
<p style="line-height:20pt;">Here&#8217;s what I had, which might not be consistent with the links I&#8217;ve posted, but atleast they look right:</p>
<ul>
<li>headLength = bodyHeight / 7.5</li>
<li>headWidth = headLength * 3/4</li>
<li>head (center) to shoulder = headLength * 5/4</li>
<li>elbow (same for both) to shoulder = headLength * 3/2</li>
<li>hand to elbow = headLength * 2</li>
<li>pelvis to shoulder = headLength * 15/2</li>
<li>knee to pelvis = headLength * 2</li>
<li>foot to knee = headLength * 2</li>
</ul>
<p></p>
<h3>Human Limb Masses</h3>
<p style="line-height:20pt;">Human body length proportions is one of those things that was easy to look up. There are numerous artists out there who have their own articles regarding human proportions out there for other artists. One thing that isn&#8217;t exactly used in art though, is human body masses. Taking masses into account in a simple ragdoll simulation might not seem necessary but it is when you start giving your ragdoll muscle flexors and extenzors. When you program your ragdoll to start waving its hand, with physics and all, you don&#8217;t want the body to be flying around because of it. If the body is significantly heavier than the arm alone, then you wont get that effect.</p>
<p style="line-height:20pt;">After looking, I found one excellent resource for this. In a military article called <a href="http://www.humanics-es.com/ADA304353.pdf">Anthropometry and Mass Distribution for Human Analogues</a>, there&#8217;s a handy table of masses for different body parts on page 37 and other human anatomy resources elsewhere in the article. These are the masses I&#8217;ve used (keep in mind these are masses at different joints, rather than masses for limbs):</p>
<ul>
<li>Head mass: 4</li>
<li>Mass at shoulder: 26</li>
<li>Mass at elbow: 2</li>
<li>Mass at hand: 2</li>
<li>Mass at pelvis: 15</li>
<li>Mass at knee: 10</li>
<li>Mass at foot: 5</li>
</ul>
<p></p>
<h3>Human Constraints</h3>
<p><center><br />
<table align="center" >
<tr>
<td valign="top">
<div id="attachment_587" class="wp-caption alignnone" style="width: 110px"><img src="http://bluethen.com/wordpress/wp-content/uploads/2011/02/helloRagdoll.jpeg" alt="" title="helloRagdoll" width="100" height="150" class="size-full wp-image-587" /><p class="wp-caption-text">Why hello, Mr. Ragoll.</p></div>
</td>
<td valign="top">
<div id="attachment_589" class="wp-caption alignnone" style="width: 110px"><img src="http://bluethen.com/wordpress/wp-content/uploads/2011/02/uncomfortableRagdoll.jpg" alt="" title="uncomfortableRagdoll" width="100" height="150" class="size-full wp-image-589" /><p class="wp-caption-text">What's that, Mr. Ragdoll? You're uncomfortable? We got to do something about this!</p></div>
</td>
<td valign="top">
<div id="attachment_606" class="wp-caption alignnone" style="width: 110px"><img src="http://bluethen.com/wordpress/wp-content/uploads/2011/02/yayConstraints.jpeg" alt="" title="yayConstraints" width="100" height="150" class="size-full wp-image-606" /><p class="wp-caption-text">Ah that did it! The feet are pushed down with a constraint from the shoulder to the feet, and the head is pushed up with a constraint from it to the pelvis!</p></div>
</td>
</tr>
</table>
<p></center></p>
<p style="line-height:20pt;">In the images above, you can see that the stick man can get stuck in very awkward positions. Especially with the head, which can point down towards the body&#8217;s feet. Another awkward position for the ragdoll is the feet pointing in the air. These might be possible if our stickman is extremely flexible, but for the sake of realism, we add some constraints.</p>
<p style="line-height:20pt;">Most people add angle restraints to their ragdolls. They keep the knee from having a too small of an angle with the pelvis to torso as well as the head and other limbs. This could work, but I&#8217;d rather avoid trigonometry for the sake of speed. One quick fix is to create a very low-stiff constraint between the feet and the shoulders with the distance equaling the total length of the calf, thigh, and pelvis to shoulder. When I say low stiff, I mean <strong>low</strong>, mine is set to 0.001.</p>
<p style="line-height:20pt;">For the head you can create a link between it and the pelvis. Knowing that even the most flexible people can&#8217;t bend their heads upside down, I made this stiffness a bit stronger than the leg one (0.02).</p>
<p style="line-height:20pt;">If you had a joint for the abdomen, you could create a constraint from the pelvis to shoulder, to give the ragdoll some decent posture. Of course, these constraints are all invisible.</p>
<p></p>
<h3>Muscles</h3>
<p style="line-height:20pt;">My program doesn&#8217;t include muscles, but I&#8217;ll explain them anyways. Muscles can pretty much work exactly like the constraints above. For the knee, you can add an invisible constraint from the pelvis to the foot. </p>
<p>If you want this knee to <strong>flex</strong> you set the constraint distance to a low amount and turn up the stiffness. <br />If you want the knee to <strong>extend</strong> then you set the constraint distance to the total leg length, and turn up the stiffness. <br />For <strong>relaxing</strong> you just set the stiffness to 0. <br />You basically create a constraint for the 2 point masses attached to the joint you want a muscle for, and change its resting distance and stiffness.</p>
<p style="line-height:20pt;">It works well in theory. The biggest problem with this method, however, is that you don&#8217;t have control over which direction any joint can go. They could go left or right. You might have a lot more control if the ragdoll was more detailed and in 3D, but this method isn&#8217;t practical if you want your ragdoll to walk. In our scenario it would probably be best to use angles to move joints.</p>
<h3>To be continued?</h3>
<p style="line-height:20pt;">I haven&#8217;t made as much progress in this area as I wanted. My original plans was to program a ragdoll, program a &#8220;brain&#8221; for it using genetic algorithms and some fancy neural networking stuffs, then teach it to walk. Because of the problems with the muscles, I wasn&#8217;t able to get this done conveniently yet. If you want to give it a try, please do! This seems like a very satisfying project to do so I hope to get something done in the future.</p>
<p style="line-height:20pt;">As for 3D ragdolls, I hope to get something like that going as well. Right now I&#8217;m attempting to animate the ragdoll manually. Most resources I&#8217;ve come across say you should store angles for each &#8220;frame&#8221; of a ragdoll animation then set it respectively. I&#8217;d like it to be a little more dynamic. So I&#8217;m having the ragdoll &#8220;analyze&#8221; the terrain in front of it, then move its knee and foot joints towards it. We&#8217;ll see how it turns out in the end.</p>
<h3>Resources</h3>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Vitruvian_Man">Leonardo da Vinci&#8217;s Vitruvian Man.</a> </li>
<li><a href="http://www.idrawdigital.com/2009/01/tutorial-anatomy-and-proportion/">idrawdigital&#8217;s tutorial on Anatomy and Proportion</a></li>
<li><a href="http://www.idrawdigital.com/2009/01/tutorial-anatomy-and-proportion/">Donald A. Jusko&#8217;s Human Portions article</a> &#8211; a very detailed analysis of human body proportions, using head lengths and widths.</li>
<li><a href="http://www.humanics-es.com/ADA304353.pdf">Anthropometry and Mass Distribution for Human Analogues</a> &#8211; Human body parts, their masses and other details.</li>
</ul>
 <img src="http://bluethen.com/wordpress/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=578" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://bluethen.com/wordpress/index.php/processing-app/fun-with-ragdolls-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

