<?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>semifluid.com</title>
	<atom:link href="http://semifluid.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://semifluid.com</link>
	<description>Intermediate in flow properties between solids and liquids; highly viscous.</description>
	<lastBuildDate>Mon, 07 May 2012 13:42:03 +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>QR code contact information stereogram</title>
		<link>http://semifluid.com/2012/03/14/qr-code-contact-information-stereogram/</link>
		<comments>http://semifluid.com/2012/03/14/qr-code-contact-information-stereogram/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 02:17:03 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://semifluid.com/?p=1235</guid>
		<description><![CDATA[I felt that my resume/curriculum vitae needed a quick way for people to get in touch with me, so I generated a QR code to encode my contact information. The QR code is scannable using a barcode reader app on most modern smartphones and will automatically pop up with my email and website contact information. [...]]]></description>
			<content:encoded><![CDATA[<p>I felt that my <a href="http://semifluid.com/about/resume/" target="_blank">resume/curriculum vitae</a> needed a quick way for people to get in touch with me, so I generated a <a href="http://en.wikipedia.org/wiki/QR_code" target="_blank">QR code</a> to encode my contact information. The QR code is scannable using a barcode reader app on most modern smartphones and will automatically pop up with my email and website contact information. I wanted the code to stand out, so, rather than <a href="http://hackaday.com/2011/08/11/how-to-put-your-logo-in-a-qr-code/" target="_blank">embedding a logo/image into the center</a>, I decided to go the psychophysical route and create a stereogram!<br />
<a href="http://semifluid.com/wp-content/uploads/2012/03/Contact-Information-Stereogram.png"><img class="aligncenter size-large wp-image-1236" title="Contact-Information-Stereogram" src="http://semifluid.com/wp-content/uploads/2012/03/Contact-Information-Stereogram-1024x551.png" alt="" width="600" height="322" /></a><br />
To view, focus eyes behind the image (diverge) or in front (converge, cross-eyed) so that the two images combine into one.</p>
<p>The stereogram was created by shifting a surface of pixels to the left in one image and right in the other (see an example in Wikipedia&#8217;s <a href="http://en.wikipedia.org/wiki/Random_dot_stereogram" target="_blank">Random Dot Stereogram</a> entry). When the two images are perceptually fused, you perceive the shift as a change in depth of the surface (more info in Wikipedia&#8217;s <a href="http://en.wikipedia.org/wiki/Autostereogram#Mechanisms_for_viewing" target="_blank">Autostereogram</a> entry). The shift needed to be small enough that the codes would still be scannable (see Wikipedia <a href="https://en.wikipedia.org/wiki/QR_code#Error_correction" target="_blank">again</a>), but provide a convincing amount of depth.</p>
<p>I&#8217;ve also attached an animated version (also scannable!) using the left and right images as frames (See <a href="http://www.springerlink.com/content/2l232r84343r8728/" target="_blank">Lee (1970) Binocular stereopsis without spatial disparity</a> for additional discussion):<br />
<span id="more-1235"></span></p>
<p><a href="http://semifluid.com/wp-content/uploads/2012/03/Contact-Information-Stereogram.gif"><img class="aligncenter size-full wp-image-1241" title="Contact-Information-Stereogram" src="http://semifluid.com/wp-content/uploads/2012/03/Contact-Information-Stereogram.gif" alt="" width="326" height="350" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://semifluid.com/2012/03/14/qr-code-contact-information-stereogram/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching hosts</title>
		<link>http://semifluid.com/2012/01/04/switching-hosts/</link>
		<comments>http://semifluid.com/2012/01/04/switching-hosts/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 18:10:20 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://semifluid.com/?p=638</guid>
		<description><![CDATA[I&#8217;ve switched hosting providers, so I am currently transitioning my blog from the old provider to the new one. There are a number of broken links and a number of issues that I am trying to resolve (specifically with my old folder organization structure for JAL code), but hopefully this will all be cleaned up [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve switched hosting providers, so I am currently transitioning my blog from the old provider to the new one. There are a number of broken links and a number of issues that I am trying to resolve (specifically with my old folder organization structure for JAL code), but hopefully this will all be cleaned up soon!</p>
<p><a title="426 - Upgrade Required by GirlieMac, on Flickr" href="http://www.flickr.com/photos/girliemac/6509400771/"><img class="aligncenter" src="http://farm8.staticflickr.com/7167/6509400771_33a1f59890.jpg" alt="426 - Upgrade Required" width="500" height="400" /></a></p>
<p><strong>Update 01/09/2012</strong>: Still slowly transitioning the old posts to WordPress.  Unfortunately, there isn&#8217;t an easy way (that I am aware of) to convert my old static-page format into the dynamic WordPress format, meaning that I have to upload each image individually and fix the code in the posts.  So, unfortunately, it&#8217;s taking longer than I would prefer.  In addition, I have been transitioning from YouTube to locally hosted videos, but unfortunately, that has been a battle as well.  So, things are in a bit of disarray at this point, but will get better soon (I promise!).</p>
<p><strong>Update 02/29/2012</strong>: Ok, done! (I hope&#8230;)</p>
<p><a href="http://www.flickr.com/photos/girliemac/6512628175/" title="200 - OK by GirlieMac, on Flickr"><img class="aligncenter" src="http://farm8.staticflickr.com/7153/6512628175_6a4e8ab6ba.jpg" width="500" height="400" alt="200 - OK"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://semifluid.com/2012/01/04/switching-hosts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Repel DEET Numbers Game</title>
		<link>http://semifluid.com/2011/08/17/repel-deet-numbers-game/</link>
		<comments>http://semifluid.com/2011/08/17/repel-deet-numbers-game/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 17:45:35 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Consumerism]]></category>

		<guid isPermaLink="false">http://www.semifluid.com/?p=608</guid>
		<description><![CDATA[Repel produces a number of DEET products intended to scare away those little flying buggers that seem to be everywhere on these warm summer nights. While walking through my local Target, I noticed that there were varying concentrations available for purchase at my local store (please excuse the hand-held photos): 23% DEET 40% DEET 100% [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.repel.com/" target="_blank">Repel</a> produces a number of <a href="https://secure.wikimedia.org/wikipedia/en/wiki/DEET" target="_blank">DEET</a> products intended to scare away those little flying buggers that seem to be everywhere on these warm summer nights. While walking through my local Target, I noticed that there were varying concentrations available for purchase at my local store (please excuse the hand-held photos):</p>
<table border="0" align="center">
<tbody>
<tr>
<td style="text-align: center;"><strong>23% DEET</strong></td>
<td style="text-align: center;"><strong>40% DEET</strong></td>
<td style="text-align: center;"><strong>100% DEET</strong></td>
</tr>
<tr>
<td><a href="http://www.semifluid.com/wp-content/uploads/2011/08/RepelDEET23.jpg"><img class="size-medium wp-image-609 aligncenter" title="RepelDEET23" src="http://www.semifluid.com/wp-content/uploads/2011/08/RepelDEET23-179x300.jpg" alt="" width="179" height="300" /></a></td>
<td><a href="http://www.semifluid.com/wp-content/uploads/2011/08/RepelDEET40.jpg"><img class="size-medium wp-image-610 aligncenter" title="RepelDEET40" src="http://www.semifluid.com/wp-content/uploads/2011/08/RepelDEET40-179x300.jpg" alt="" width="179" height="300" /></a></td>
<td><a href="http://www.semifluid.com/wp-content/uploads/2011/08/RepelDEET100.jpg"><img class="size-medium wp-image-611 aligncenter" title="RepelDEET100" src="http://www.semifluid.com/wp-content/uploads/2011/08/RepelDEET100-179x300.jpg" alt="" width="179" height="300" /></a></td>
</tr>
</tbody>
</table>
<p>After looking a bit closer at the labels though, I noticed something peculiar in the &#8220;Active Ingredient&#8221; list&#8230;</p>
<p><span id="more-608"></span></p>
<p>Although the 23% and 40% concentrations included the proper percentages of DEET in their formulations, the 100% DEET repellent had only 98.11% DEET.  Here are crops from the above photos:</p>
<table border="0" align="center">
<tbody>
<tr>
<td style="text-align: center;"><strong>23% DEET <strong>Crop</strong><br />
</strong></td>
<td style="text-align: center;"><strong>40% DEET Crop<br />
</strong></td>
<td style="text-align: center;"><strong>100% DEET <strong>Crop</strong><br />
</strong></td>
</tr>
<tr>
<td><a href="http://www.semifluid.com/wp-content/uploads/2011/08/RepelDEET23crop.jpg"><img class="size-medium wp-image-613 aligncenter" title="RepelDEET23crop" src="http://www.semifluid.com/wp-content/uploads/2011/08/RepelDEET23crop-300x225.jpg" alt="" width="180" height="135" /></a></td>
<td><a href="http://www.semifluid.com/wp-content/uploads/2011/08/RepelDEET40crop.jpg"><img class="size-medium wp-image-614 aligncenter" title="RepelDEET40crop" src="http://www.semifluid.com/wp-content/uploads/2011/08/RepelDEET40crop-300x225.jpg" alt="" width="180" height="135" /></a></td>
<td><a href="http://www.semifluid.com/wp-content/uploads/2011/08/RepelDEET100crop.jpg"><img class="size-medium wp-image-615 aligncenter" title="RepelDEET100crop" src="http://www.semifluid.com/wp-content/uploads/2011/08/RepelDEET100crop-300x225.jpg" alt="" width="180" height="135" /></a></td>
</tr>
</tbody>
</table>
<p>All of the other variants include the labeled percentages of DEET, but Repel decided that the 100% variant would not. Instead, it contains 100% DEET* (where the asterisk notes that the percentage is now the &#8220;Relative % DEET&#8221;).  Hmm&#8230; so what exactly does &#8220;Relative % DEET&#8221; mean?  I could not find any information on the packaging (old or <a href="http://www.repel.com/~/media/Repel/Files/Labels/011423941085.ashx" target="_blank">new</a>) nor could I find information on the internet, so who knows?</p>
<p>I called Repel (1-888-880-1181), which is a subsidiary of United Industries Corporation, to find out why there were incongruities with the labeling.  The young woman I spoke with told me that although the 23% and 40% formulations include the percentage stated on the label, the 100% formulation (that only has 98.11% DEET) was marketed as such due to industry nomenclature.  She could not tell me what &#8220;Relative % DEET&#8221; meant.</p>
<p>It appears as though Repel has realized &#8220;Relative % DEET&#8221; could not be easily quantified or marketed without the asterisk, so they have removed the percentage sign from <a href="http://www.repel.com/~/media/Repel/Files/Labels/011423941085.ashx" target="_blank">newer packaging</a>, labeling the product as simply &#8220;Repel 100&#8243;.  However, many online stores are still marketing the Repel as containing 100% DEET:</p>
<table border="0" align="center">
<tbody>
<tr>
<td style="text-align: center;"><strong>Walmart.com: <a href="http://www.walmart.com/ip/Repel-100-Percent-Deet-Pump-4-oz/16561282" target="_blank">Repel 100 Percent Deet Pump, 4 oz</a></strong></td>
<td style="text-align: center;"><strong>Amazon.com: <a href="http://www.amazon.com/Repel-Insect-Repellent-Spray-402000/dp/B000LGN3Z2" target="_blank">Repel 100 1 oz Insect Repellent Pump Spray 100% DEET 402000</a><br />
</strong></td>
</tr>
<tr>
<td><a href="http://www.semifluid.com/wp-content/uploads/2011/08/Walmart.png"><img class="size-medium wp-image-617 aligncenter" title="Walmart" src="http://www.semifluid.com/wp-content/uploads/2011/08/Walmart-300x193.png" alt="" width="210" height="135" /></a></td>
<td><a href="http://www.semifluid.com/wp-content/uploads/2011/08/Walmart.png"><img class="size-medium wp-image-617 aligncenter" title="Walmart" src="http://www.semifluid.com/wp-content/uploads/2011/08/Walmart-300x193.png" alt="" width="210" height="135" /></a></td>
</tr>
</tbody>
</table>
<p>Although this is a minor example, some companies allow their marketing departments a bit too much freedom, so it is important to be a savvy consumer (e.g., see: <a href="http://consumerist.com/2011/01/lawsuit-says-taco-bell-ground-beef-is-really-just-taco-meat-filling.html" rel="bookmark">Lawsuit: Taco Bell Ground Beef Is Really Just &#8220;Meat Filling&#8221;</a>).  So, when looking at varying concentrations, <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Caveat_emptor" target="_blank">caveat emptor</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://semifluid.com/2011/08/17/repel-deet-numbers-game/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Calculating the COM of a Spherical Plot</title>
		<link>http://semifluid.com/2010/06/30/calculating-the-com-of-a-spherical-plot/</link>
		<comments>http://semifluid.com/2010/06/30/calculating-the-com-of-a-spherical-plot/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 21:15:39 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Mathematica]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Center of Gravity]]></category>
		<category><![CDATA[Center of Mass]]></category>
		<category><![CDATA[COG]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Coordinates]]></category>
		<category><![CDATA[Integral]]></category>
		<category><![CDATA[Spherical]]></category>

		<guid isPermaLink="false">http://www.semifluid.com/?p=319</guid>
		<description><![CDATA[What is everyone excited for??? More math! Ok, maybe not, but I&#8217;ll come back to the electronics projects later (including investigating the Parallax RFID reader, Arduino FIO, and heck, maybe even some more LED fun). In the meantime, let&#8217;s get back to math. What do the volume calculations look like, and how would one go [...]]]></description>
			<content:encoded><![CDATA[<p>What is everyone excited for??? More math! Ok, maybe not, but I&#8217;ll come back to the electronics projects later (including investigating the <a href="http://www.parallax.com/tabid/768/ProductID/114/Default.aspx">Parallax RFID reader</a>, <a href="http://arduino.cc/en/Main/ArduinoBoardFio">Arduino FIO</a>, and heck, maybe even some more <a href="http://semifluid.com/2010/06/28/8x8-rgb-led-display/">LED fun</a>). In the meantime, let&#8217;s get back to math.</p>
<p><a href="http://www.semifluid.com/wp-content/uploads/2010/06/sphere.png"><img class="aligncenter size-full wp-image-326" title="sphere" src="http://www.semifluid.com/wp-content/uploads/2010/06/sphere.png" alt="" width="360" height="402" /></a></p>
<p>What do the volume calculations look like, and how would one go about calculating the center of mass/geometric centroid of a spherical plot? More after the break&#8230;<br />
<span id="more-319"></span><br />
So, using our good buddy, Wolfram Mathworld, we know that the spherical coordinate <a href="http://mathworld.wolfram.com/VolumeElement.html">volume element</a>, basically the volume we will be using when integrating the solid, is equal to:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=dV%20%3D%20%5Crho%5E2%20%5Csin%28%5Cphi%29%20%5C%2C%20d%5Crho%20%5C%2C%20d%5Cphi%20%5C%2C%20d%5Ctheta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='dV = \rho^2 \sin(\phi) \, d\rho \, d\phi \, d\theta' title='dV = \rho^2 \sin(\phi) \, d\rho \, d\phi \, d\theta' class='latex' /></p>
<p>Note that we are going to use the <a href="https://secure.wikimedia.org/wikipedia/en/wiki/ISO_31-11">ISO 31-11 convention</a> for our coordinate system, meaning that <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\theta' title='\theta' class='latex' /> is the &#8220;longitude&#8221; and ranges from <img src='http://s.wordpress.com/latex.php?latex=0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='0' title='0' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=2%5Cpi&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='2\pi' title='2\pi' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%5Cphi&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\phi' title='\phi' class='latex' /> is the &#8220;latitude&#8221; and ranges from <img src='http://s.wordpress.com/latex.php?latex=0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='0' title='0' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=%5Cpi&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\pi' title='\pi' class='latex' />, and <img src='http://s.wordpress.com/latex.php?latex=%5Crho&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\rho' title='\rho' class='latex' /> is the radius at any given point.</p>
<p>Integrating this around a sphere gives us the volume of the sphere:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=V%20%3D%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20%5C%21%20%5Crho%5E2%20%5Csin%28%5Cphi%29%20%5C%2C%20d%5Crho%20%5C%2C%20d%5Cphi%20%5C%2C%20d%5Ctheta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V = \int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho^2 \sin(\phi) \, d\rho \, d\phi \, d\theta' title='V = \int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho^2 \sin(\phi) \, d\rho \, d\phi \, d\theta' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=V%20%3D%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cfrac%7B1%7D%7B3%7D%20r%5E3%20%5Csin%28%5Cphi%29%20%5C%2C%20d%5Cphi%20%5C%2C%20d%5Ctheta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V = \int_0^{2\pi} \! \int_o^{\pi} \! \frac{1}{3} r^3 \sin(\phi) \, d\phi \, d\theta' title='V = \int_0^{2\pi} \! \int_o^{\pi} \! \frac{1}{3} r^3 \sin(\phi) \, d\phi \, d\theta' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=V%20%3D%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cfrac%7B2%7D%7B3%7D%20r%5E3%20%5C%2C%20d%5Ctheta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V = \int_0^{2\pi} \! \frac{2}{3} r^3 \, d\theta' title='V = \int_0^{2\pi} \! \frac{2}{3} r^3 \, d\theta' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=V%20%3D%20%5Cfrac%7B4%7D%7B3%7D%20%5Cpi%20r%5E3&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V = \frac{4}{3} \pi r^3' title='V = \frac{4}{3} \pi r^3' class='latex' /></p>
<p>To convert from spherical to Cartesian coordinates, we have to simply use the following:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=x%20%3D%20%5Crho%5Csin%28%5Cphi%29%5Ccos%28%5Ctheta%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x = \rho\sin(\phi)\cos(\theta)' title='x = \rho\sin(\phi)\cos(\theta)' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=y%20%3D%20%5Crho%5Csin%28%5Cphi%29%5Csin%28%5Ctheta%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y = \rho\sin(\phi)\sin(\theta)' title='y = \rho\sin(\phi)\sin(\theta)' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=z%20%3D%20%5Crho%5Ccos%28%5Cphi%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='z = \rho\cos(\phi)' title='z = \rho\cos(\phi)' class='latex' /></p>
<p>So, to solve for the x, y, and z centers of mass, we will need to convert from spherical cooridnates to Cartesian coordinates. We will do this while calculating the <a href="http://mathworld.wolfram.com/FunctionCentroid.html">function centroid</a> for each axis. The basic formula is:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM%20%3D%20%5Cfrac%7B%5Cint%20%5C%21%20x%20f%28x%29%20%5C%2C%20dx%7D%7B%5Cint%20%5C%21%20f%28x%29%20%5C%2C%20dx%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM = \frac{\int \! x f(x) \, dx}{\int \! f(x) \, dx}' title='COM = \frac{\int \! x f(x) \, dx}{\int \! f(x) \, dx}' class='latex' /></p>
<p>Our <img src='http://s.wordpress.com/latex.php?latex=f%28x%29%20%5C%2C%20dx&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='f(x) \, dx' title='f(x) \, dx' class='latex' /> in this case is the <img src='http://s.wordpress.com/latex.php?latex=dV&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='dV' title='dV' class='latex' /> from above and so the basic forms for the COM for each of the three axes is:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bx%7D%20%3D%20%5Cfrac%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20%5C%21%20x%20%5C%2C%20dV%7D%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20dV%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{x} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! x \, dV}{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} dV}' title='COM_{x} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! x \, dV}{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} dV}' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7By%7D%20%3D%20%5Cfrac%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20%5C%21%20y%20%5C%2C%20dV%7D%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20dV%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{y} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! y \, dV}{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} dV}' title='COM_{y} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! y \, dV}{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} dV}' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bz%7D%20%3D%20%5Cfrac%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20%5C%21%20z%20%5C%2C%20dV%7D%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20dV%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{z} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! z \, dV}{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} dV}' title='COM_{z} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! z \, dV}{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} dV}' class='latex' /></p>
<p>So, substituting our Cartesian coordinate conversions and our <img src='http://s.wordpress.com/latex.php?latex=dV&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='dV' title='dV' class='latex' /> from above:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bx%7D%20%3D%20%5Cfrac%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20%5C%21%20%5Crho%5Csin%28%5Cphi%29%5Ccos%28%5Ctheta%29%20%5Crho%5E2%20%5Csin%28%5Cphi%29%20%5C%2C%20d%5Crho%20%5C%2C%20d%5Cphi%20%5C%2C%20d%5Ctheta%7D%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20d%5Crho%20%5C%2C%20d%5Cphi%20%5C%2C%20d%5Ctheta%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{x} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho\sin(\phi)\cos(\theta) \rho^2 \sin(\phi) \, d\rho \, d\phi \, d\theta}{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} d\rho \, d\phi \, d\theta}' title='COM_{x} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho\sin(\phi)\cos(\theta) \rho^2 \sin(\phi) \, d\rho \, d\phi \, d\theta}{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} d\rho \, d\phi \, d\theta}' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7By%7D%20%3D%20%5Cfrac%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20%5C%21%20%5Crho%5Csin%28%5Cphi%29%5Csin%28%5Ctheta%29%20%5Crho%5E2%20%5Csin%28%5Cphi%29%20%5C%2C%20d%5Crho%20%5C%2C%20d%5Cphi%20%5C%2C%20d%5Ctheta%7D%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20d%5Crho%20%5C%2C%20d%5Cphi%20%5C%2C%20d%5Ctheta%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{y} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho\sin(\phi)\sin(\theta) \rho^2 \sin(\phi) \, d\rho \, d\phi \, d\theta}{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} d\rho \, d\phi \, d\theta}' title='COM_{y} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho\sin(\phi)\sin(\theta) \rho^2 \sin(\phi) \, d\rho \, d\phi \, d\theta}{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} d\rho \, d\phi \, d\theta}' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bz%7D%20%3D%20%5Cfrac%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20%5C%21%20%5Crho%5Ccos%28%5Cphi%29%20%5Crho%5E2%20%5Csin%28%5Cphi%29%20%5C%2C%20d%5Crho%20%5C%2C%20d%5Cphi%20%5C%2C%20d%5Ctheta%7D%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20d%5Crho%20%5C%2C%20d%5Cphi%20%5C%2C%20d%5Ctheta%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{z} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho\cos(\phi) \rho^2 \sin(\phi) \, d\rho \, d\phi \, d\theta}{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} d\rho \, d\phi \, d\theta}' title='COM_{z} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho\cos(\phi) \rho^2 \sin(\phi) \, d\rho \, d\phi \, d\theta}{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} d\rho \, d\phi \, d\theta}' class='latex' /></p>
<p>Simplified:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bx%7D%20%3D%20%5Cfrac%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20%5C%21%20%5Crho%5E3%20%5Csin%28%5Cphi%29%5E2%20%5Ccos%28%5Ctheta%29%20%5C%2C%20d%5Crho%20%5C%2C%20d%5Cphi%20%5C%2C%20d%5Ctheta%7D%7BV%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{x} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho^3 \sin(\phi)^2 \cos(\theta) \, d\rho \, d\phi \, d\theta}{V}' title='COM_{x} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho^3 \sin(\phi)^2 \cos(\theta) \, d\rho \, d\phi \, d\theta}{V}' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7By%7D%20%3D%20%5Cfrac%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20%5C%21%20%5Crho%5E3%20%5Csin%28%5Cphi%29%5E2%20%5Csin%28%5Ctheta%29%20%5C%2C%20d%5Crho%20%5C%2C%20d%5Cphi%20%5C%2C%20d%5Ctheta%7D%7BV%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{y} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho^3 \sin(\phi)^2 \sin(\theta) \, d\rho \, d\phi \, d\theta}{V}' title='COM_{y} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho^3 \sin(\phi)^2 \sin(\theta) \, d\rho \, d\phi \, d\theta}{V}' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bz%7D%20%3D%20%5Cfrac%7B%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_o%5E%7B%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br%7D%20%5C%21%20%5Crho%5E3%20%5Csin%28%5Cphi%29%20%5Ccos%28%5Cphi%29%20%5C%2C%20d%5Crho%20%5C%2C%20d%5Cphi%20%5C%2C%20d%5Ctheta%7D%7BV%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{z} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho^3 \sin(\phi) \cos(\phi) \, d\rho \, d\phi \, d\theta}{V}' title='COM_{z} = \frac{\int_0^{2\pi} \! \int_o^{\pi} \! \int_0^{r} \! \rho^3 \sin(\phi) \cos(\phi) \, d\rho \, d\phi \, d\theta}{V}' class='latex' /></p>
<p>Solving these for a constant (i.e., <img src='http://s.wordpress.com/latex.php?latex=r&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='r' title='r' class='latex' />) leads to:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bx%7D%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{x} = 0' title='COM_{x} = 0' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7By%7D%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{y} = 0' title='COM_{y} = 0' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bz%7D%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{z} = 0' title='COM_{z} = 0' class='latex' /></p>
<p>No big surprise, because, as we would assume, the center of mass for a sphere should be at the origin, <img src='http://s.wordpress.com/latex.php?latex=%280%2C0%2C0%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(0,0,0)' title='(0,0,0)' class='latex' />.</p>
<p>Now, instead of a perfect circle, let&#8217;s try a different shape, say defined by:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=r%28%5Cphi%2C%5Ctheta%29%20%3D%201%2B%5Csin%28%5Cfrac%7B%5Ctheta%7D%7B2%7D%29%5Csin%28%5Cphi%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='r(\phi,\theta) = 1+\sin(\frac{\theta}{2})\sin(\phi)' title='r(\phi,\theta) = 1+\sin(\frac{\theta}{2})\sin(\phi)' class='latex' /></p>
<p>A shape that looks somewhat like a peach and leads to COM values of:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bx%7D%20%3D%20%5Cfrac%7B-%5Cfrac%7B784%7D%7B225%7D-%5Cfrac%7B41%5Cpi%5E2%7D%7B128%7D%7D%7B5%5Cpi%7D%20%5Capprox%20-0.423&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{x} = \frac{-\frac{784}{225}-\frac{41\pi^2}{128}}{5\pi} \approx -0.423' title='COM_{x} = \frac{-\frac{784}{225}-\frac{41\pi^2}{128}}{5\pi} \approx -0.423' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7By%7D%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{y} = 0' title='COM_{y} = 0' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bz%7D%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{z} = 0' title='COM_{z} = 0' class='latex' /></p>
<p style="text-align: center;"><a href="http://www.semifluid.com/wp-content/uploads/2010/06/Peach1.png"><img class="size-medium wp-image-354 alignnone" title="Peach1" src="http://www.semifluid.com/wp-content/uploads/2010/06/Peach1-273x300.png" alt="" width="273" height="300" /></a><a href="http://www.semifluid.com/wp-content/uploads/2010/06/Peach2.png"><img class="size-medium wp-image-354 alignnone" title="Peach2" src="http://www.semifluid.com/wp-content/uploads/2010/06/Peach2-273x300.png" alt="" width="273" height="300" /></a></p>
<p>Or a spiraling shell:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=r%28%5Cphi%2C%5Ctheta%29%20%3D%201%2B%5Ctheta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='r(\phi,\theta) = 1+\theta' title='r(\phi,\theta) = 1+\theta' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bx%7D%20%3D%20%5Cfrac%7B6%5Cpi%5E2%28-3%2B6%5Cpi%2B4%5Cpi%5E2%29%7D%7B-1%2B%281%2B2%5Cpi%29%5E4%7D%20%5Capprox%201.165&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{x} = \frac{6\pi^2(-3+6\pi+4\pi^2)}{-1+(1+2\pi)^4} \approx 1.165' title='COM_{x} = \frac{6\pi^2(-3+6\pi+4\pi^2)}{-1+(1+2\pi)^4} \approx 1.165' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7By%7D%20%3D%20%5Cfrac%7B6%5Cpi%5E2%281%2B%5Cpi%29%28-5%2B2%5Cpi%2B2%5Cpi%5E2%29%7D%7B-1%2B%281%2B2%5Cpi%29%5E4%7D%20%5Capprox%20-1.833&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{y} = \frac{6\pi^2(1+\pi)(-5+2\pi+2\pi^2)}{-1+(1+2\pi)^4} \approx -1.833' title='COM_{y} = \frac{6\pi^2(1+\pi)(-5+2\pi+2\pi^2)}{-1+(1+2\pi)^4} \approx -1.833' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bz%7D%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{z} = 0' title='COM_{z} = 0' class='latex' /></p>
<p style="text-align: center;"><a href="http://www.semifluid.com/wp-content/uploads/2010/06/Shell1.png"><img class="alignnone size-medium wp-image-361" title="Shell1" src="http://www.semifluid.com/wp-content/uploads/2010/06/Shell1-207x300.png" alt="" width="207" height="300" /></a><a href="http://www.semifluid.com/wp-content/uploads/2010/06/Shell2.png"><img class="alignnone size-medium wp-image-360" title="Shell2" src="http://www.semifluid.com/wp-content/uploads/2010/06/Shell2-207x300.png" alt="" width="207" height="300" /></a></p>
<p>Or perhaps something really out there:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=r%28%5Cphi%2C%5Ctheta%29%20%3D%201%2B%5Csin%283%5Ctheta%29%5Csin%284%5Cphi%29%2B%5Csin%28%5Ctheta%29%5Csin%28%5Cfrac%7B%5Cphi%7D%7B3%7D%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='r(\phi,\theta) = 1+\sin(3\theta)\sin(4\phi)+\sin(\theta)\sin(\frac{\phi}{3})' title='r(\phi,\theta) = 1+\sin(3\theta)\sin(4\phi)+\sin(\theta)\sin(\frac{\phi}{3})' class='latex' /></p>
<p>With COM values of:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bx%7D%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{x} = 0' title='COM_{x} = 0' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7By%7D%20%3D%20%5Cfrac%7B32383290752127%7D%7B62456794017280%7D%20%5Capprox%200.518&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{y} = \frac{32383290752127}{62456794017280} \approx 0.518' title='COM_{y} = \frac{32383290752127}{62456794017280} \approx 0.518' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bz%7D%20%3D%20-%5Cfrac%7B359881023%7D%7B2416474112%7D%20%5Capprox%20-0.149&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{z} = -\frac{359881023}{2416474112} \approx -0.149' title='COM_{z} = -\frac{359881023}{2416474112} \approx -0.149' class='latex' /></p>
<p style="text-align: center;"><a href="http://www.semifluid.com/wp-content/uploads/2010/06/Weird1.png"><img class="alignnone size-medium wp-image-366" title="Weird1" src="http://www.semifluid.com/wp-content/uploads/2010/06/Weird1-251x300.png" alt="" width="251" height="300" /></a><a href="http://www.semifluid.com/wp-content/uploads/2010/06/Weird2.png"><img class="alignnone size-medium wp-image-367" title="Weird2" src="http://www.semifluid.com/wp-content/uploads/2010/06/Weird2-251x300.png" alt="" width="251" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://semifluid.com/2010/06/30/calculating-the-com-of-a-spherical-plot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculating the COM of a 3D Surface of Revolution</title>
		<link>http://semifluid.com/2010/06/29/calculating-the-com-of-a-3d-surface-of-revolution/</link>
		<comments>http://semifluid.com/2010/06/29/calculating-the-com-of-a-3d-surface-of-revolution/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 20:10:53 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Mathematica]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.semifluid.com/?p=242</guid>
		<description><![CDATA[My current research at Rutgers focuses on identifying the cognitive mechanisms that are employed when perceiving the shape and structure of 3D objects. One of the little problems that I had to overcome was finding out how to calculate the center of mass/gravity of a 3D surface of revolution analytically. Specifically, I needed to calculate [...]]]></description>
			<content:encoded><![CDATA[<p>My current research at Rutgers focuses on identifying the cognitive mechanisms that are employed when perceiving the shape and structure of 3D objects. One of the little problems that I had to overcome was finding out how to calculate the center of mass/gravity of a 3D <a href="http://mathworld.wolfram.com/SurfaceofRevolution.html">surface of revolution</a> analytically. Specifically, I needed to calculate the COM for <a href="http://mathworld.wolfram.com/ConicalFrustum.html">conical frustums</a> with and without an attached part (which was also analytically generated).</p>
<p><a href="http://www.semifluid.com/wp-content/uploads/2010/06/Cylinders-with-Parts-COM-Calculate-v9-Low-Salience.png"><img class="aligncenter size-full wp-image-245" title="Cylinders with Parts COM Calculate v9 - Low Salience" src="http://www.semifluid.com/wp-content/uploads/2010/06/Cylinders-with-Parts-COM-Calculate-v9-Low-Salience.png" alt="" width="362" height="353" /></a></p>
<p>Unfortunately, it wasn&#8217;t as easy to derive as I assumed, but the steps toward that end are pretty straightforward.  After the break you can see the general equation I ultimately derived for calculating the COM in 3D-space.<br />
<span id="more-242"></span><br />
A conical frustum will be defined with attributes <img src='http://s.wordpress.com/latex.php?latex=R_%7B1%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R_{1}' title='R_{1}' class='latex' /> (the top radius), <img src='http://s.wordpress.com/latex.php?latex=R_%7B2%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R_{2}' title='R_{2}' class='latex' /> (the bottom radius), and <img src='http://s.wordpress.com/latex.php?latex=h&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='h' title='h' class='latex' /> (the height of the truncated cone).</p>
<p>The radius of the frustum at any given height <img src='http://s.wordpress.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='z' title='z' class='latex' /> is:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=r_%7Bfr%7D%28z%29%3D%5Cfrac%7Bh-z%7D%7Bh%7D%20R_%7B1%7D%20%2B%20%5Cfrac%7Bz%7D%7Bh%7D%20R_%7B2%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='r_{fr}(z)=\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2}' title='r_{fr}(z)=\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2}' class='latex' /></p>
<p>The area of this slice at any given height <img src='http://s.wordpress.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='z' title='z' class='latex' /> is:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=A%28z%29%20%3D%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br_%7Bfr%7D%28z%29%7D%20%5C%21%20r%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%20%3D%20%5Cpi%20r_%7Bfr%7D%28z%29%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A(z) = \int_0^{2\pi} \! \int_0^{r_{fr}(z)} \! r \, dr \, d\theta = \pi r_{fr}(z)^2' title='A(z) = \int_0^{2\pi} \! \int_0^{r_{fr}(z)} \! r \, dr \, d\theta = \pi r_{fr}(z)^2' class='latex' /></p>
<p>Then the volume can be calculated by integrating across all heights:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=V%20%3D%20%5Cint_0%5E%7Bh%7D%20%5C%21%20A%28z%29%20%2C%20dz&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V = \int_0^{h} \! A(z) , dz' title='V = \int_0^{h} \! A(z) , dz' class='latex' /></p>
<p>Combine these three equations together and we have:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=V%20%3D%20%5Cint_0%5E%7Bh%7D%20%5C%21%20%5Cpi%20%28%5Cfrac%7Bh-z%7D%7Bh%7D%20R_%7B1%7D%20%2B%20%5Cfrac%7Bz%7D%7Bh%7D%20R_%7B2%7D%29%5E2%20%5C%2C%20dz%20%3D%20%5Cfrac%7B1%7D%7B3%7D%20h%20%5Cpi%20%28R_%7B1%7D%5E2%20%2B%20R_%7B1%7D%20R_%7B2%7D%20%2B%20R_%7B2%7D%5E2%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V = \int_0^{h} \! \pi (\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2})^2 \, dz = \frac{1}{3} h \pi (R_{1}^2 + R_{1} R_{2} + R_{2}^2)' title='V = \int_0^{h} \! \pi (\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2})^2 \, dz = \frac{1}{3} h \pi (R_{1}^2 + R_{1} R_{2} + R_{2}^2)' class='latex' /></p>
<p>Ok, so now we have the radius, area, and volume of the conical frustum. Using this information, we can now calculate the center of mass.</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bx%7D%20%3D%20%5Cfrac%7B1%7D%7BV%7D%20%5Cint_0%5Eh%20%5C%21%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br_%7Bfr%7D%28z%29%7D%20%5C%21%20r%5E2%20%5Ccos%28%5Ctheta%29%20A%28z%29%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%20%5C%2C%20dz%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{x} = \frac{1}{V} \int_0^h \! \int_0^{2\pi} \! \int_0^{r_{fr}(z)} \! r^2 \cos(\theta) A(z) \, dr \, d\theta \, dz = 0' title='COM_{x} = \frac{1}{V} \int_0^h \! \int_0^{2\pi} \! \int_0^{r_{fr}(z)} \! r^2 \cos(\theta) A(z) \, dr \, d\theta \, dz = 0' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7By%7D%20%3D%20%5Cfrac%7B1%7D%7BV%7D%20%5Cint_0%5Eh%20%5C%21%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br_%7Bfr%7D%28z%29%7D%20%5C%21%20r%5E2%20%5Csin%28%5Ctheta%29%20A%28z%29%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%20%5C%2C%20dz%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{y} = \frac{1}{V} \int_0^h \! \int_0^{2\pi} \! \int_0^{r_{fr}(z)} \! r^2 \sin(\theta) A(z) \, dr \, d\theta \, dz = 0' title='COM_{y} = \frac{1}{V} \int_0^h \! \int_0^{2\pi} \! \int_0^{r_{fr}(z)} \! r^2 \sin(\theta) A(z) \, dr \, d\theta \, dz = 0' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bz%7D%20%3D%20%5Cfrac%7B1%7D%7BV%7D%20%5Cint_0%5Eh%20%5C%21%20z%20A%28z%29%20%5C%2C%20dz&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{z} = \frac{1}{V} \int_0^h \! z A(z) \, dz' title='COM_{z} = \frac{1}{V} \int_0^h \! z A(z) \, dz' class='latex' /></p>
<p>Doing a little substitution with <img src='http://s.wordpress.com/latex.php?latex=COM_%7Bz%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{z}' title='COM_{z}' class='latex' />:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bz%7D%20%3D%20%5Cfrac%7B1%7D%7BV%7D%20%5Cint_0%5E%7Bh%7D%20%5C%21%20z%20%5Cpi%20%28%5Cfrac%7Bh-z%7D%7Bh%7D%20R_%7B1%7D%20%2B%20%5Cfrac%7Bz%7D%7Bh%7D%20R_%7B2%7D%29%5E2%20%5C%2C%20dz&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{z} = \frac{1}{V} \int_0^{h} \! z \pi (\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2})^2 \, dz' title='COM_{z} = \frac{1}{V} \int_0^{h} \! z \pi (\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2})^2 \, dz' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%3D%20%5Cfrac%7B1%7D%7BV%7D%20%5Cfrac%7Bh%5E2%20%5Cpi%20%28R_%7B1%7D%5E2%20%2B%202%20R_%7B1%7D%20R_%7B2%7D%20%2B%203%20R_%7B2%7D%5E2%29%7D%7B12%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='= \frac{1}{V} \frac{h^2 \pi (R_{1}^2 + 2 R_{1} R_{2} + 3 R_{2}^2)}{12}' title='= \frac{1}{V} \frac{h^2 \pi (R_{1}^2 + 2 R_{1} R_{2} + 3 R_{2}^2)}{12}' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%3D%20%5Cfrac%7Bh%20%28R_%7B1%7D%5E2%20%2B%202%20R_%7B1%7D%20R_%7B2%7D%20%2B%203%20R_%7B2%7D%5E2%29%7D%7B4%28R_%7B1%7D%5E2%20%2B%20R_%7B1%7D%20R_%7B2%7D%20%2B%20R_%7B2%7D%5E2%29%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='= \frac{h (R_{1}^2 + 2 R_{1} R_{2} + 3 R_{2}^2)}{4(R_{1}^2 + R_{1} R_{2} + R_{2}^2)}' title='= \frac{h (R_{1}^2 + 2 R_{1} R_{2} + 3 R_{2}^2)}{4(R_{1}^2 + R_{1} R_{2} + R_{2}^2)}' class='latex' /></p>
<p>Note that because the conical frustum is radially symmetric around the z-axis, the COM for both x and y will be 0. This obviously will not be the case for shapes with more complex surfaces of revolution, but is a nice little proof.</p>
<p>Complex, you want complex??</p>
<p>So, we will add a simple part onto the shape (like the one in the image above), defined using both a radial function, <img src='http://s.wordpress.com/latex.php?latex=f_%7Brad%7D%28%5Ctheta%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='f_{rad}(\theta)' title='f_{rad}(\theta)' class='latex' />, and a vertical function, <img src='http://s.wordpress.com/latex.php?latex=f_%7Bvert%7D%28z%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='f_{vert}(z)' title='f_{vert}(z)' class='latex' />. The functions themselves can be any analytical functions, as long as they are continuous. And frankly, it doesn&#8217;t matter for this proof, so we&#8217;ll leave them undefined for the time being.</p>
<p>Remember how simple the radius at any given height was? (Just to remind you: <img src='http://s.wordpress.com/latex.php?latex=r_%7Bfr%7D%28z%29%3D%5Cfrac%7Bh-z%7D%7Bh%7D%20R_%7B1%7D%20%2B%20%5Cfrac%7Bz%7D%7Bh%7D%20R_%7B2%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='r_{fr}(z)=\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2}' title='r_{fr}(z)=\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2}' class='latex' />). Now we need to add our radial and vertical functions, making the function dependent upon not only height, but also angle:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=r_%7Bfr%7D%28z%2C%5Ctheta%29%3D%5Cfrac%7Bh-z%7D%7Bh%7D%20R_%7B1%7D%20%2B%20%5Cfrac%7Bz%7D%7Bh%7D%20R_%7B2%7D%20%2B%20f_%7Bvert%7D%28z%29%20f_%7Brad%7D%28theta%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='r_{fr}(z,\theta)=\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(theta)' title='r_{fr}(z,\theta)=\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(theta)' class='latex' /></p>
<p>Given that the radius is now a bit more complex, the area of this slice at any given height <img src='http://s.wordpress.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='z' title='z' class='latex' /> is now:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=A%28z%29%20%3D%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br_%7Bfr%7D%28z%2C%5Ctheta%29%7D%20%5C%21%20r%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A(z) = \int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r \, dr \, d\theta' title='A(z) = \int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r \, dr \, d\theta' class='latex' /></p>
<p>Then the volume is now a bit more complicated:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=V%20%3D%20%5Cint_0%5E%7Bh%7D%20%5C%21%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br_%7Bfr%7D%28z%2C%5Ctheta%29%7D%20%5C%21%20r%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%20%5C%2C%20dz&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V = \int_0^{h} \! \int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r \, dr \, d\theta \, dz' title='V = \int_0^{h} \! \int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r \, dr \, d\theta \, dz' class='latex' /></p>
<p>And now we can calculate the COMs:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bx%7D%20%3D%20%5Cfrac%7B1%7D%7BV%7D%20%5Cint_0%5Eh%20%5C%21%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br_%7Bfr%7D%28z%2C%5Ctheta%29%7D%20%5C%21%20r%5E2%20%5Ccos%28%5Ctheta%29%20%28%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br_%7Bfr%7D%28z%2C%5Ctheta%29%7D%20%5C%21%20r%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%29%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%20%5C%2C%20dz&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{x} = \frac{1}{V} \int_0^h \! \int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r^2 \cos(\theta) (\int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r \, dr \, d\theta) \, dr \, d\theta \, dz' title='COM_{x} = \frac{1}{V} \int_0^h \! \int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r^2 \cos(\theta) (\int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r \, dr \, d\theta) \, dr \, d\theta \, dz' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7By%7D%20%3D%20%5Cfrac%7B1%7D%7BV%7D%20%5Cint_0%5Eh%20%5C%21%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br_%7Bfr%7D%28z%2C%5Ctheta%29%7D%20%5C%21%20r%5E2%20%5Csin%28%5Ctheta%29%20%28%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br_%7Bfr%7D%28z%2C%5Ctheta%29%7D%20%5C%21%20r%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%29%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%20%5C%2C%20dz&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{y} = \frac{1}{V} \int_0^h \! \int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r^2 \sin(\theta) (\int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r \, dr \, d\theta) \, dr \, d\theta \, dz' title='COM_{y} = \frac{1}{V} \int_0^h \! \int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r^2 \sin(\theta) (\int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r \, dr \, d\theta) \, dr \, d\theta \, dz' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bz%7D%20%3D%20%5Cfrac%7B1%7D%7BV%7D%20%5Cint_0%5Eh%20%5C%21%20z%20%28%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7Br_%7Bfr%7D%28z%2C%5Ctheta%29%7D%20%5C%21%20r%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%29%20%5C%2C%20dz&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{z} = \frac{1}{V} \int_0^h \! z (\int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r \, dr \, d\theta) \, dz' title='COM_{z} = \frac{1}{V} \int_0^h \! z (\int_0^{2\pi} \! \int_0^{r_{fr}(z,\theta)} \! r \, dr \, d\theta) \, dz' class='latex' /></p>
<p>The good news, all you really need to define is <img src='http://s.wordpress.com/latex.php?latex=r_%7Bfr%7D%28z%2Ctheta%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='r_{fr}(z,theta)' title='r_{fr}(z,theta)' class='latex' /> and h. The bad news, pentuple integrals. Substituting all of the necessary equations, we get these monstrosities:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bx%7D%20%3D%20%5Cfrac%7B%5Cint_0%5Eh%20%5C%21%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7B%5Cfrac%7Bh-z%7D%7Bh%7D%20R_%7B1%7D%20%2B%20%5Cfrac%7Bz%7D%7Bh%7D%20R_%7B2%7D%20%2B%20f_%7Bvert%7D%28z%29%20f_%7Brad%7D%28%5Ctheta%29%7D%20%5C%21%20r%5E2%20%5Ccos%28%5Ctheta%29%20%28%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7B%5Cfrac%7Bh-z%7D%7Bh%7D%20R_%7B1%7D%20%2B%20%5Cfrac%7Bz%7D%7Bh%7D%20R_%7B2%7D%20%2B%20f_%7Bvert%7D%28z%29%20f_%7Brad%7D%28%5Ctheta%29%7D%20%5C%21%20r%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%29%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%20%5C%2C%20dz%7D%7B%5Cint_0%5E%7Bh%7D%20%5C%21%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7B%5Cfrac%7Bh-z%7D%7Bh%7D%20R_%7B1%7D%20%2B%20%5Cfrac%7Bz%7D%7Bh%7D%20R_%7B2%7D%20%2B%20f_%7Bvert%7D%28z%29%20f_%7Brad%7D%28%5Ctheta%29%7D%20%5C%21%20r%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%20%5C%2C%20dz%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{x} = \frac{\int_0^h \! \int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r^2 \cos(\theta) (\int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r \, dr \, d\theta) \, dr \, d\theta \, dz}{\int_0^{h} \! \int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r \, dr \, d\theta \, dz}' title='COM_{x} = \frac{\int_0^h \! \int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r^2 \cos(\theta) (\int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r \, dr \, d\theta) \, dr \, d\theta \, dz}{\int_0^{h} \! \int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r \, dr \, d\theta \, dz}' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7By%7D%20%3D%20%5Cfrac%7B%5Cint_0%5Eh%20%5C%21%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7B%5Cfrac%7Bh-z%7D%7Bh%7D%20R_%7B1%7D%20%2B%20%5Cfrac%7Bz%7D%7Bh%7D%20R_%7B2%7D%20%2B%20f_%7Bvert%7D%28z%29%20f_%7Brad%7D%28%5Ctheta%29%7D%20%5C%21%20r%5E2%20%5Csin%28%5Ctheta%29%20%28%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7B%5Cfrac%7Bh-z%7D%7Bh%7D%20R_%7B1%7D%20%2B%20%5Cfrac%7Bz%7D%7Bh%7D%20R_%7B2%7D%20%2B%20f_%7Bvert%7D%28z%29%20f_%7Brad%7D%28%5Ctheta%29%7D%20%5C%21%20r%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%29%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%20%5C%2C%20dz%7D%7B%5Cint_0%5E%7Bh%7D%20%5C%21%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7B%5Cfrac%7Bh-z%7D%7Bh%7D%20R_%7B1%7D%20%2B%20%5Cfrac%7Bz%7D%7Bh%7D%20R_%7B2%7D%20%2B%20f_%7Bvert%7D%28z%29%20f_%7Brad%7D%28%5Ctheta%29%7D%20%5C%21%20r%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%20%5C%2C%20dz%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{y} = \frac{\int_0^h \! \int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r^2 \sin(\theta) (\int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r \, dr \, d\theta) \, dr \, d\theta \, dz}{\int_0^{h} \! \int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r \, dr \, d\theta \, dz}' title='COM_{y} = \frac{\int_0^h \! \int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r^2 \sin(\theta) (\int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r \, dr \, d\theta) \, dr \, d\theta \, dz}{\int_0^{h} \! \int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r \, dr \, d\theta \, dz}' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=COM_%7Bz%7D%20%3D%20%5Cfrac%7B%5Cint_0%5Eh%20%5C%21%20z%20%28%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7B%5Cfrac%7Bh-z%7D%7Bh%7D%20R_%7B1%7D%20%2B%20%5Cfrac%7Bz%7D%7Bh%7D%20R_%7B2%7D%20%2B%20f_%7Bvert%7D%28z%29%20f_%7Brad%7D%28%5Ctheta%29%7D%20%5C%21%20r%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%29%20%5C%2C%20dz%7D%7B%5Cint_0%5E%7Bh%7D%20%5C%21%20%5Cint_0%5E%7B2%5Cpi%7D%20%5C%21%20%5Cint_0%5E%7B%5Cfrac%7Bh-z%7D%7Bh%7D%20R_%7B1%7D%20%2B%20%5Cfrac%7Bz%7D%7Bh%7D%20R_%7B2%7D%20%2B%20f_%7Bvert%7D%28z%29%20f_%7Brad%7D%28%5Ctheta%29%7D%20%5C%21%20r%20%5C%2C%20dr%20%5C%2C%20d%5Ctheta%20%5C%2C%20dz%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='COM_{z} = \frac{\int_0^h \! z (\int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r \, dr \, d\theta) \, dz}{\int_0^{h} \! \int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r \, dr \, d\theta \, dz}' title='COM_{z} = \frac{\int_0^h \! z (\int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r \, dr \, d\theta) \, dz}{\int_0^{h} \! \int_0^{2\pi} \! \int_0^{\frac{h-z}{h} R_{1} + \frac{z}{h} R_{2} + f_{vert}(z) f_{rad}(\theta)} \! r \, dr \, d\theta \, dz}' class='latex' /></p>
<p>Not very pretty, ehh? Well, in the meantime, I&#8217;ll leave the final calculations for you to work on. Suffice to say, it is a pain in the butt.</p>
]]></content:encoded>
			<wfw:commentRss>http://semifluid.com/2010/06/29/calculating-the-com-of-a-3d-surface-of-revolution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>8&#215;8 RGB LED Display</title>
		<link>http://semifluid.com/2010/06/28/8x8-rgb-led-display/</link>
		<comments>http://semifluid.com/2010/06/28/8x8-rgb-led-display/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 02:21:23 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[LEDs]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC16F628]]></category>
		<category><![CDATA[Controller]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[RGB]]></category>

		<guid isPermaLink="false">http://www.semifluid.com/?p=213</guid>
		<description><![CDATA[So, this project was sidelined until I had to make another BatchPCB purchase.  Thankfully it wasn&#8217;t too long until I had the opportunity to work on it again! The current setup is basically 4 of the original 4 RGB LED Controller boards and 12 of the updated DR1r3 boards. All 16 are wired in parallel [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">So, this project was sidelined until I had to make another BatchPCB purchase.  Thankfully it wasn&#8217;t too long until I had the opportunity to work on it again!  The current setup is basically 4 of the <a href="http://semifluid.com/2009/01/06/pic16f628-4-rgb-led-pwm-controller/">original 4 RGB LED Controller boards</a> and 12 of the <a href="http://semifluid.com/2010/02/16/4-rgb-led-controller-update/">updated DR1r3 boards</a>.  All 16 are wired in parallel and being controlled by my desktop machine.  You can see an extended version of this RGB test sequence after the break and I&#8217;m also including the (uncommented, sorry!) <a href="http://processing.org/" target="_blank">Processing 1.1</a> code that I used to control the boards.</p>
<div align="center">
	<video id="wp_mep_1" controls="controls" width="480" height="270" poster="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplayCloseup.png" preload="none" class="mejs-player " data-mejsoptions='{"features":["playpause","current","progress","duration","volume","tracks","fullscreen"]}'>
		<source src="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplayCloseup.mp4" type="video/mp4" />
		<source src="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplayCloseup.webm" type="video/webm" />
		<source src="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplayCloseup.ogv" type="video/ogg" />
		<object width="480" height="270" type="application/x-shockwave-flash" data="http://semifluid.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://semifluid.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplayCloseup.mp4" />			
		</object>		
	</video>
</div>
<div style="height: 16px;">
</div>
<p><span id="more-213"></span></p>
<p>Here&#8217;s an extended cut of the video display (which is displaying an RGB Test Sequence).  Note that the current maximum throughput is approximately 12-13 frames per second due to the RS-232 baud rate bottleneck, but I&#8217;m looking for ways to speed up the data transfer without requiring a faster oscillator.:</p>
<div align="center">
	<video id="wp_mep_2" controls="controls" width="480" height="270" poster="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplay.png" preload="none" class="mejs-player " data-mejsoptions='{"features":["playpause","current","progress","duration","volume","tracks","fullscreen"]}'>
		<source src="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplay.mp4" type="video/mp4" />
		<source src="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplay.webm" type="video/webm" />
		<source src="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplay.ogv" type="video/ogg" />
		<object width="480" height="270" type="application/x-shockwave-flash" data="http://semifluid.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://semifluid.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplay.mp4" />			
		</object>		
	</video>
</div>
<div style="height: 16px;">
</div>
<p>The <a href="http://processing.org/" target="_blank">Processing 1.1</a> code:<br />
<a href="http://www.semifluid.com/wp-content/uploads/2010/06/VideoDisplay.zip">VideoDisplay</a> (includes the .pde file and the video used)</p>
]]></content:encoded>
			<wfw:commentRss>http://semifluid.com/2010/06/28/8x8-rgb-led-display/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
<enclosure url="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplayCloseup.ogv" length="12262276" type="video/ogg" />
<enclosure url="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplay.ogv" length="60536842" type="video/ogg" />
<enclosure url="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplay.mp4" length="23686891" type="video/mp4" />
<enclosure url="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplayCloseup.mp4" length="5766496" type="video/mp4" />
<enclosure url="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplayCloseup.webm" length="1646625" type="video/webm" />
<enclosure url="http://semifluid.com/wp-content/uploads/2010/06/8x8PIC16F628RGBLEDdisplay.webm" length="6849338" type="video/webm" />
		</item>
		<item>
		<title>4 RGB LED Controller Update</title>
		<link>http://semifluid.com/2010/02/16/4-rgb-led-controller-update/</link>
		<comments>http://semifluid.com/2010/02/16/4-rgb-led-controller-update/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 17:44:18 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[C Projects]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[LEDs]]></category>
		<category><![CDATA[PIC Projects]]></category>
		<category><![CDATA[PIC16F628]]></category>
		<category><![CDATA[Controller]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[Lights]]></category>
		<category><![CDATA[RGB]]></category>

		<guid isPermaLink="false">http://www.semifluid.com/?p=191</guid>
		<description><![CDATA[I recently began working on a consulting project that required the creation of some PCBs.  Since I have had such great success with BatchPCB.com in the past, I decided to use them again to fab the custom PCBs.  The BatchPCB purchasing system adds a few static fees (set-up, handling, and shipping), so I felt that [...]]]></description>
			<content:encoded><![CDATA[<p>I recently began working on a consulting project that required the creation of some PCBs.  Since I have had such great success with BatchPCB.com in the <a href="http://semifluid.com/2009/01/06/pic16f628-4-rgb-led-pwm-controller/" target="_self">past</a>, I decided to use them again to fab the custom PCBs.  The BatchPCB purchasing system adds a few static fees (set-up, handling, and shipping), so I felt that this was as good a time as any to make some additional of my <a href="http://semifluid.com/2009/01/06/pic16f628-4-rgb-led-pwm-controller/" target="_self">PIC16F628 4 RGB LED PWM Controller</a> boards with a couple of modifications.</p>
<p><a href="http://www.semifluid.com/wp-content/uploads/2010/02/DSC_1877.jpg"><img class="aligncenter size-medium wp-image-197" title="4 RGB LED Controller Boards" src="http://www.semifluid.com/wp-content/uploads/2010/02/DSC_1877-300x200.jpg" alt="" width="300" height="200" /></a></p>
<p><span id="more-191"></span>As I noted in the previous post, there was an error on the first revision of the board and a pull-up resistor on RA5 (pin 4 in the schematic above) was necessary.  I added the MCLR resistor to the board along with a couple of other modifications:</p>
<ul>
<li>Removed the extraneous capacitors, we only need one.</li>
<li>Added a breakout for the one remaining I/O pin.</li>
<li>Added a small perfboard to the PCB with +5V and ground lines.</li>
<li>Relocated the resistors to make them <em>much easier </em>to solder.  I may use a SIL resistor array in the future.</li>
</ul>
<p>I kept the LED locations exactly the same because, hey, if I put all of the time and effort into the 4 boards that I previously ordered, then I might as well keep the same form factor.  My scheme for the short-term is to create a 4&#215;4 array of the 4 RGB LED Controller boards, which will give me a 20cmx20cm 8&#215;8 RGB LED display.</p>
<p>Here are some pictures of the boards:</p>
<p style="text-align: center;"><a href="http://www.semifluid.com/wp-content/uploads/2010/02/DSC_1874.jpg"><img class="size-thumbnail wp-image-196 alignnone" title="4 RGB LED Controller Board Front" src="http://www.semifluid.com/wp-content/uploads/2010/02/DSC_1874-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://www.semifluid.com/wp-content/uploads/2010/02/DSC_1872.jpg"><img class="size-thumbnail wp-image-195 alignnone" title="4 RGB LED Controller Board Back" src="http://www.semifluid.com/wp-content/uploads/2010/02/DSC_1872-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://www.semifluid.com/wp-content/uploads/2010/02/DSC_1871.jpg"><img class="size-thumbnail wp-image-194 alignnone" title="4 RGB LED Controller Board Front and Back" src="http://www.semifluid.com/wp-content/uploads/2010/02/DSC_1871-150x150.jpg" alt="" width="150" height="150" /></a><a href="http://www.semifluid.com/wp-content/uploads/2010/02/DSC_1868.jpg"> <img class="alignnone size-thumbnail wp-image-193" title="4 RGB LED Controller Boards Group" src="http://www.semifluid.com/wp-content/uploads/2010/02/DSC_1868-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p style="text-align: left;">Here is the updated schematic and board (note, you can open the BRD and SCH files in <a href="http://www.cadsoftusa.com/" target="_blank">Eagle Layout Editor</a>):</p>
<p style="text-align: center;"><a href="http://www.semifluid.com/wp-content/uploads/2010/02/PIC16F628-4-RGB-LED-DR1r3-Eagle-Schematic.png"><img class="alignnone size-thumbnail wp-image-206" title="PIC16F628 4 RGB LED DR1r3 Eagle Schematic" src="http://www.semifluid.com/wp-content/uploads/2010/02/PIC16F628-4-RGB-LED-DR1r3-Eagle-Schematic-150x150.png" alt="" width="150" height="150" /></a> <a href="http://www.semifluid.com/wp-content/uploads/2010/02/PIC16F628-4-RGB-LED-DR1r3-Eagle-Board.png"><img class="alignnone size-thumbnail wp-image-205" title="PIC16F628 4 RGB LED DR1r3 Eagle Board" src="http://www.semifluid.com/wp-content/uploads/2010/02/PIC16F628-4-RGB-LED-DR1r3-Eagle-Board-150x150.png" alt="" width="150" height="150" /></a></p>
<ul>
<li><a href="http://www.semifluid.com/wp-content/uploads/2010/02/PIC16F628-4-RGB-LED-DR1r3.brd">PIC16F628 4 RGB LED DR1r3 Eagle Board</a></li>
</ul>
<p style="text-align: left;">And finally, here is an updated firmware that improves the PWM performance:</p>
<ul>
<li><a href="http://www.semifluid.com/wp-content/uploads/2010/02/16F628-Serial-4-LED-PWM-4-bit-exp-DR1r8.c">16F628 Serial 4 LED PWM &#8211; 4-bit exp DR1r8.c</a></li>
<li><a href="http://www.semifluid.com/wp-content/uploads/2010/02/16F628-Serial-4-LED-PWM-4-bit-exp-DR1r8.hex">16F628 Serial 4 LED PWM &#8211; 4-bit exp DR1r8.hex</a></li>
</ul>
<p>I will make sure to post when I have the full array put together (I currently only have 12 of the 16 boards I need for the 4&#215;4 array).</p>
]]></content:encoded>
			<wfw:commentRss>http://semifluid.com/2010/02/16/4-rgb-led-controller-update/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Life of a Graduate Student</title>
		<link>http://semifluid.com/2010/02/15/life-of-a-graduate-student/</link>
		<comments>http://semifluid.com/2010/02/15/life-of-a-graduate-student/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 01:07:07 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Visual Illusion Sensation Perception Aftereffect Afterimage]]></category>

		<guid isPermaLink="false">http://www.semifluid.com/?p=186</guid>
		<description><![CDATA[I have been neglecting semifluid.com for sometime now, but fear not! I will post new projects shortly as I try to dig through the comments.  My time has been split between coursework (which is diminishing), research, and teaching.  As I send revisions of papers back and forth with my advisor, I will devote time to [...]]]></description>
			<content:encoded><![CDATA[<p>I have been neglecting <a href="http://semifluid.com">semifluid.com</a> for sometime now, but fear not!  I will post new projects shortly as I try to dig through the comments.  My time has been split between coursework (which is diminishing), research, and teaching.  As I send revisions of papers back and forth with my advisor, I will devote time to updating the site.  In the meantime, here are 3 videos demonstrating aftereffects that I created for my sensation and perception lab:</p>
<div align="center">
	<video id="wp_mep_3" controls="controls" width="480" height="270" poster="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectSpiral.png" preload="none" class="mejs-player " data-mejsoptions='{"features":["playpause","current","progress","duration","volume","tracks","fullscreen"]}'>
		<source src="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectSpiral.mp4" type="video/mp4" />
		<source src="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectSpiral.webm" type="video/webm" />
		<source src="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectSpiral.ogv" type="video/ogg" />
		<object width="480" height="270" type="application/x-shockwave-flash" data="http://semifluid.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://semifluid.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectSpiral.mp4" />			
		</object>		
	</video>
</div>
<div style="height: 16px;">
</div>
<p><span id="more-186"></span></p>
<div align="center">
	<video id="wp_mep_4" controls="controls" width="480" height="270" poster="http://semifluid.com/wp-content/uploads/2010/02/OpponentAftereffect.png" preload="none" class="mejs-player " data-mejsoptions='{"features":["playpause","current","progress","duration","volume","tracks","fullscreen"]}'>
		<source src="http://semifluid.com/wp-content/uploads/2010/02/OpponentAftereffect.mp4" type="video/mp4" />
		<source src="http://semifluid.com/wp-content/uploads/2010/02/OpponentAftereffect.webm" type="video/webm" />
		<source src="http://semifluid.com/wp-content/uploads/2010/02/OpponentAftereffect.ogv" type="video/ogg" />
		<object width="480" height="270" type="application/x-shockwave-flash" data="http://semifluid.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://semifluid.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://semifluid.com/wp-content/uploads/2010/02/OpponentAftereffect.mp4" />			
		</object>		
	</video>
</div>
<div style="height: 16px;">
</div>
<div align="center">
	<video id="wp_mep_5" controls="controls" width="480" height="270" poster="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectWaterfall.png" preload="none" class="mejs-player " data-mejsoptions='{"features":["playpause","current","progress","duration","volume","tracks","fullscreen"]}'>
		<source src="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectWaterfall.mp4" type="video/mp4" />
		<source src="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectWaterfall.webm" type="video/webm" />
		<source src="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectWaterfall.ogv" type="video/ogg" />
		<object width="480" height="270" type="application/x-shockwave-flash" data="http://semifluid.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://semifluid.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectWaterfall.mp4" />			
		</object>		
	</video>
</div>
<div style="height: 16px;">
</div>
]]></content:encoded>
			<wfw:commentRss>http://semifluid.com/2010/02/15/life-of-a-graduate-student/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectSpiral.mp4" length="0" type="video/mp4" />
<enclosure url="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectSpiral.ogv" length="0" type="video/ogg" />
<enclosure url="http://semifluid.com/wp-content/uploads/2010/02/OpponentAftereffect.mp4" length="15589879" type="video/mp4" />
<enclosure url="http://semifluid.com/wp-content/uploads/2010/02/OpponentAftereffect.ogv" length="2128466" type="video/ogg" />
<enclosure url="http://semifluid.com/wp-content/uploads/2010/02/OpponentAftereffect.webm" length="899211" type="video/webm" />
<enclosure url="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectWaterfall.mp4" length="0" type="video/mp4" />
<enclosure url="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectWaterfall.ogv" length="0" type="video/ogg" />
<enclosure url="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectSpiral.webm" length="2525911" type="video/webm" />
<enclosure url="http://semifluid.com/wp-content/uploads/2010/02/MotionAftereffectWaterfall.webm" length="1717958" type="video/webm" />
		</item>
	</channel>
</rss>

