<?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>20papercups :: Michael Marner&#039;s Website &#187; Programming</title>
	<atom:link href="http://www.20papercups.net/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.20papercups.net</link>
	<description>The (awesome) website of Michael Marner</description>
	<lastBuildDate>Tue, 15 Nov 2011 01:09:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Java Arithmetic Suppliment &#8211; Exponents</title>
		<link>http://www.20papercups.net/java-vtm-tutorials/java-arithmetic-suppliment-exponents/</link>
		<comments>http://www.20papercups.net/java-vtm-tutorials/java-arithmetic-suppliment-exponents/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 01:18:01 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Java Video Tutorials]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=445</guid>
		<description><![CDATA[Hey So over on Youtube someone asked me about doing exponents in Java. I didn&#8217;t talk about this in episode 3 of my Java tutorial, so I have created a short supplementary  video looking at some of the more advanced mathematical functions in Java. Short, and to the point. Here it is:]]></description>
			<content:encoded><![CDATA[<p>Hey</p>
<p>So over on Youtube someone asked me about doing exponents in Java. I didn&#8217;t talk about this in episode 3 of my Java tutorial, so I have created a short supplementary  video looking at some of the more advanced mathematical functions in Java. Short, and to the point. Here it is:</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/ndRep31eC6w" frameborder="0" allowfullscreen></iframe></p>
<p><span id="more-445"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/java-vtm-tutorials/java-arithmetic-suppliment-exponents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How OpenNI Nearly Spoiled The Show</title>
		<link>http://www.20papercups.net/programming/how-openni-nearly-spoiled-the-show/</link>
		<comments>http://www.20papercups.net/programming/how-openni-nearly-spoiled-the-show/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 10:37:01 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Border Project]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[Half Real]]></category>
		<category><![CDATA[kinect]]></category>
		<category><![CDATA[OpenNI]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=420</guid>
		<description><![CDATA[So, for the last few months I&#8217;ve taken a break from the PhD to do some work for a theatre show for The Border Project, Half Real. There&#8217;s a lot of technology in the show. In particular, most of the set is projected, and we are using a Microsoft Kinect to track the actors on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.20papercups.net/wp-content/uploads/2011/09/halfreal-1.jpg"><img class="alignleft size-thumbnail wp-image-424" title="Half Real" src="http://www.20papercups.net/wp-content/uploads/2011/09/halfreal-1-150x150.jpg" alt="Half Real" width="150" height="150" /></a>So, for the last few months I&#8217;ve taken a break from the PhD to do some work for a theatre show for <a title="The Border Project" href="http://www.theborderproject.com" target="_blank">The Border Project</a>, <a title="Half Real" href="http://www.theborderproject.com/project-half-real.html" target="_blank">Half Real</a>.</p>
<p>There&#8217;s a lot of technology in the show. In particular, most of the set is projected, and we are using a Microsoft Kinect to track the actors on stage, and modifying the projections based on their location.</p>
<p>I&#8217;m working on Linux, and using <a title="OpenNI" href="http://www.openni.org/" target="_blank">OpenNI</a> for interfacing with the Kinect. Things <em>almost</em> worked perfectly. In this post I will document the trials and tribulations of getting the Kinect to work for Half Real.</p>
<p><span id="more-420"></span>I often fall into <a title="Not Invented Here Syndrome" href="http://en.wikipedia.org/wiki/Not_Invented_Here" target="_blank">Not Invented Here Syndrome</a>, and so slowly I&#8217;m trying to get out of it. Obviously, interfacing with hardware like the Kinect is not something I really wanted to do during a 3 month theatre development. My Spatial Augmented Reality framework is built on Linux, so I basically had the option of <a href="http://openkinect.org/wiki/Main_Page" target="_blank">Libfreenect</a> or <a href="http://www.openni.org/" target="_blank">OpenNI</a>. OpenNI appears to be more mature, and so that&#8217;s what I went with.</p>
<p><iframe src="http://www.youtube.com/embed/4nowWxi75jE" frameborder="0" width="640" height="360"></iframe></p>
<p>As you can see, I&#8217;m only really tracking the position of the actors &#8211; we aren&#8217;t using any of the gesture recognition stuff.</p>
<p>During development everything looked peachy. However, during production week when we started running through the whole show, a <em>major</em> issue popped up. It turns out there is a bug buried deep in OpenNI that eventually rears its ugly head if you have a few people running around at the same time:</p>
<pre>Program received signal SIGSEGV, Segmentation fault.
 0x00007ffff215574d in Segmentation::checkOcclusion(int, int, int, int)</pre>
<p>This is a big problem. See, this is a theatre show, where the entire set is projected. If the system crashes, the stage goes black. The operator has to restart and bring the projections up to the right point in the show. It turned out that in our tech previews, the software was crashing 2-3 times per show. This was simply unacceptable.</p>
<p>Thankfully, I was only interested in the positions of the actors. This meant I could run the tracking in a completely different process and send the data to the projection system without too much overhead. So, on the day before I finished working for the project, I had to completely rewrite how the tracking worked.</p>
<h3>The Data We Need</h3>
<p>As I said, we only need position. I didn&#8217;t have to send through any camera images, gesture information, etc. All I needed was:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">struct</span> KinectMessage
<span style="color: #008000;">&#123;</span>
    <span style="color: #0000ff;">uint8_t</span> actor_id<span style="color: #008080;">;</span>
    <span style="color: #0000ff;">float</span>   quality<span style="color: #008080;">;</span>
    <span style="color: #0000ff;">float</span>   x<span style="color: #008080;">;</span>
    <span style="color: #0000ff;">float</span>   y<span style="color: #008080;">;</span>
    <span style="color: #0000ff;">float</span>   z<span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span></pre></div></div>

<p>The process that interfaces with the Kinect simply sent these messages over a TCP connection to the projection system for every actor on stage. TCP worked pretty well. Both processes run on the same system, and the Kinect only updates at 30fps anyway. So you know, there&#8217;s only 510 bytes per second, per actor that needed to be transferred. If I was transferring images, a better <a href="http://en.wikipedia.org/wiki/Inter-process_communication" target="_blank">IPC</a> technique would be required.</p>
<h3>While True</h3>
<p>At this point, the hard work was done. Simply wrap the tracking process in a shell script that loops forever, rerunning the process when the segfault occurs. The projectors never go to black, and the worst case is the tracking lags for a a couple of seconds. Not perfect, but infinitely better.</p>
<p>I guess the moral of this post is to be wary of relying on 3rd party libraries that are not particularly mature. And if you have to (you don&#8217;t have much choice if you want to talk to the Kinect), wrap it up so it can&#8217;t screw you over. TCP worked for me, because I didn&#8217;t need to transfer much data. Even if you were doing the skeleton tracking and gestures, there isn&#8217;t a lot of data to send. If you need the images from the camera, TCP <em>may</em> not be for you. But there are plenty of other IPC techniques that could handle that amount of data (even pipes would do it). I guess the good news is OpenNI is Open Source, so in theory someone can get around to fixing it.</p>
<p>Hope this helps someone.</p>
<p>Michael</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/programming/how-openni-nearly-spoiled-the-show/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kinect on Ubuntu with OpenNI</title>
		<link>http://www.20papercups.net/programming/kinect-on-ubuntu-with-openni/</link>
		<comments>http://www.20papercups.net/programming/kinect-on-ubuntu-with-openni/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 05:06:57 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Augmented Reality]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[kinect]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[NITE]]></category>
		<category><![CDATA[OpenNI]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=408</guid>
		<description><![CDATA[I&#8217;ve spent all this morning trying to talk to the Microsoft Kinect using OpenNI. As it turns out, the process is not exceptionally difficult, it&#8217;s just there doesn&#8217;t seem to be any up to date documentation on getting it all working. So, this post should fill the void. I describe how to get access to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.20papercups.net/wp-content/uploads/2011/06/kinect.png"><img class="size-thumbnail wp-image-409 alignleft" title="self portrait" src="http://www.20papercups.net/wp-content/uploads/2011/06/kinect-150x150.png" alt="" width="150" height="150" /></a></p>
<p>I&#8217;ve spent all this morning trying to talk to the Microsoft Kinect using <a href="http://openni.org/" target="_blank">OpenNI</a>. As it turns out, the process is not exceptionally difficult, it&#8217;s just there doesn&#8217;t seem to be any up to date documentation on getting it all working. So, this post should fill the void. I describe how to get access to the Kinect working using Ubuntu 11.04, OpenNI, and NITE.<span id="more-408"></span>To talk to the Kinect, there are two basic parts: OpenNI itself, and a Sensor module that is actually responsible for communicating with the hardware. Then, if you need it, there is NITE, which is another module for OpenNI that does skeletal tracking, gestures, and stuff. Depending on how you plan on using the data from the Kinect, you may not need NITE at all.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<h3>Step 1: Prerequisites</h3>
<p>We need to install a bunch of packages for all this to work. Thankfully, the readme file included with OpenNI lists all these. However, to make life easier, this is (as of writing) what you need to install, in addition to all the development packages you (hopefully) already have.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">git</span> build-essential python libusb-<span style="color: #000000;">1.0</span>-<span style="color: #000000;">0</span>-dev freeglut3-dev</pre></div></div>

<p>There are also some optional packages that you can install, depending on whether you want documentation, Mono bindings, etc. Note that on earlier versions the install failed if you didn&#8217;t have doxygen installed, even though it is listed as optional.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> doxygen graphviz mono-complete</pre></div></div>

<h3>Step 2: OpenNI</h3>
<p>OpenNI is a framework for working with what they are calling <em>natural interaction</em> devices.Anyway, this is how it is installed:</p>
<p>Check out from Git</p>
<p>OpenNI is hosted on Github, so checking it out is simple:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> clone https:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>OpenNI<span style="color: #000000; font-weight: bold;">/</span>OpenNI.git</pre></div></div>

<p>From there, change into the Platform/Linux-x86/CreateRedist directory, and run the RedistMaker script. Note that even though the directory is named x86, this same directory builds 64 bit versions just fine. So, don&#8217;t fret if you&#8217;re on 64bit Linux.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> OpenNI<span style="color: #000000; font-weight: bold;">/</span>Platform<span style="color: #000000; font-weight: bold;">/</span>Linux-x86<span style="color: #000000; font-weight: bold;">/</span>CreateRedist
.<span style="color: #000000; font-weight: bold;">/</span>RedistMaker</pre></div></div>

<p>The RedistMaker script will compile everything for you. You then need to change into the Redist directory and run the install script to install the software on your system.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>Redist
<span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>install.sh</pre></div></div>

<h3>Step 3: Kinect Sensor Module</h3>
<p>OpenNI doesn&#8217;t actually provide anything for talking to the hardware, it is more just a framework for working with different sensors and devices. You need to install a Sensor module for actually doing the hardware interfacing. Think of an OpenNI sensor module as a device driver for the hardware. You&#8217;ll also note on the OpenNI website that they have a Sensor module that you can download. Don&#8217;t do this though, because that sensor module doesn&#8217;t talk to the Kinect. I love how well documented all this is, don&#8217;t you?</p>
<p>The sensor module you want is also on GitHub, but from a different user. So, we can check out the code. We also need to get the kinect branch, not master.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> clone https:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>avin2<span style="color: #000000; font-weight: bold;">/</span>SensorKinect
<span style="color: #7a0874; font-weight: bold;">cd</span> SensorKinect</pre></div></div>

<p>The install process for the sensor is pretty much the same as for OpenNI itself:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> Platform<span style="color: #000000; font-weight: bold;">/</span>Linux-x86<span style="color: #000000; font-weight: bold;">/</span>CreateRedist
.<span style="color: #000000; font-weight: bold;">/</span>RedistMaker
<span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>Redist
<span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>install.sh</pre></div></div>

<p>On Ubuntu, regular users are only given read permission to unknown USB devices. The install script puts in some udev rules to fix this, but if you find that none of the samples work unless you run them as root, try unplugging and plugging the Kinect back in again, to make the new rules apply.</p>
<h3>Step 4: Test the OpenNI Samples</h3>
<p>At this point, you have enough installed to get data from the Kinect. The easiest way to verify this is to run one of the OpenNI samples.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> OpenNI<span style="color: #000000; font-weight: bold;">/</span>Platform<span style="color: #000000; font-weight: bold;">/</span>Linux-x86<span style="color: #000000; font-weight: bold;">/</span>Bin<span style="color: #000000; font-weight: bold;">/</span>Release
.<span style="color: #000000; font-weight: bold;">/</span>Sample-NiSimpleViewer</pre></div></div>

<p>You should see a yellow-black depth image. At this point, you&#8217;re left with (optionally) installing the higher level NITE module.</p>
<h3>Step 5: Install NITE (optional)</h3>
<p>Firstly, you need to obtain NITE. For some reason, the link on PrimeSense&#8217;s homepage results in a 404 error. After quite a bit of searching around yesterday, I found the correct link:</p>
<p><a href="http://www.openni.org/downloadfiles/opennimodules/openni-compliant-middleware-binaries/33-latest-unstable" target="_blank">http://www.openni.org/downloadfiles/opennimodules/openni-compliant-middleware-binaries/33-latest-unstable</a></p>
<p>Download either the 32 or 64 bit version, depending on your platform. As of writing they only have versions for Ubuntu 10.10, but these seem to work fine with 11.04 as well.</p>
<p>Extract the archive, and run the installer:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>install.sh</pre></div></div>

<p>At some point, you will be asked for a license key. A working license key can be found <a href="http://www.google.com/search?q=NITE+license+key" target="_blank">just about anywhere on the Internet</a>. I don&#8217;t think PrimeSense care, or maybe this is a non-commercial license or something. But whatever, just copy that license into the console, including the equals sign at the end, and NITE will install just fine.</p>
<h3>Conclusion</h3>
<p>After following these steps, you will be able to write programs that use the Microsoft Kinect through OpenNI and NITE middleware. I hope this helps someone, because I spent a lot of time screwing around this morning trying to get it all to work. Like I said, the process is pretty straight forward, it just hasn&#8217;t been written down in one place (or I suck at google).</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/programming/kinect-on-ubuntu-with-openni/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Graphics Applications and Libraries Month at Packt Publishing</title>
		<link>http://www.20papercups.net/random-news/graphics-applications-and-libraries-month-at-packt-publishing/</link>
		<comments>http://www.20papercups.net/random-news/graphics-applications-and-libraries-month-at-packt-publishing/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 23:13:40 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random News]]></category>
		<category><![CDATA[Augmented Reality]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[openscenegraph]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=371</guid>
		<description><![CDATA[Hey guys So a little while ago I said that I was going to review the new Open Scene Graph 3: Beginners Guide book from Packt Publishing. Unfortunately, I still haven&#8217;t had time to do the review. However, I thought I would mention that all through April Packt Publishing are running discounts on all of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.20papercups.net/wp-content/uploads/2011/04/packt_logo.png"><img class="alignleft size-full wp-image-372" title="packt_logo" src="http://www.20papercups.net/wp-content/uploads/2011/04/packt_logo.png" alt="" width="104" height="45" /></a>Hey guys</p>
<p>So a little while ago I said that I was going to review the new <a href="http://link.packtpub.com/NwneHs">Open Scene Graph 3: Beginners Guide</a> book from Packt Publishing. Unfortunately, I <em>still</em> haven&#8217;t had time to do the review. However, I thought I would mention that all through April Packt Publishing are running discounts on all of their Graphics books!</p>
<blockquote><p><span style="color: #000000;"><span style="font-family: Calibri;"><span style="font-size: small;">During April, Packt will be running a series of discounts and promotions on a selection of its Open Source Graphic books wherein readers can avail exclusive discounts of 20% and 30% off the cover price of Graphic print books and eBooks.</span></span></span></p></blockquote>
<p><span style="color: #000000;"><span style="font-family: Calibri;"><span style="font-size: small;">So, I suggest you go check out what they have to offer:</span></span></span></p>
<p><a href="http://www.packtpub.com/article/graphic-open-source" target="_blank">http://www.packtpub.com/article/graphic-open-source</a></p>
<p>Cheers<br />
Michael</p>
<p><small><em>Full Disclosure: I have nothing to do with Packt Publishing. However, they did give me a free e-book version of the OSG3 Beginners Guide for me to review. I feel a little bit guilty that I haven&#8217;t done the review yet. Other than that, I have no affiliation with Packt Publishing, and I didn&#8217;t get anything for posting this. So I haven&#8217;t sold out. In my opinion, someone going out of their way to produce documentation and reference books for Open Source Software is a good thing!</em></small></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/random-news/graphics-applications-and-libraries-month-at-packt-publishing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Videos Now On Youtube</title>
		<link>http://www.20papercups.net/random-news/java-videos-now-on-youtube/</link>
		<comments>http://www.20papercups.net/random-news/java-videos-now-on-youtube/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 06:24:08 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Java Video Tutorials]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random News]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[vtm]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=366</guid>
		<description><![CDATA[Hi Everyone Just a quick note to say that I&#8217;ve put all the Java video tutorials up on Youtube. Things have changed since I started making the videos &#8211; Youtube has finally allowed videos longer than 15 minutes, which means I can upload them without having to slice them all up. Youtube Playlist Cheers Michael]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.20papercups.net/wp-content/uploads/2008/12/fonzie.jpeg"><img class="alignleft size-full wp-image-12" title="fonzie" src="http://www.20papercups.net/wp-content/uploads/2008/12/fonzie.jpeg" alt="" width="120" height="120" /></a>Hi Everyone</p>
<p>Just a quick note to say that I&#8217;ve put all the Java video tutorials up on Youtube. Things have changed since I started making the videos &#8211; Youtube has finally allowed videos longer than 15 minutes, which means I can upload them without having to slice them all up.</p>
<p><a href="http://www.youtube.com/view_play_list?p=A7C651F65A0C41F7" target="_blank">Youtube Playlist</a></p>
<p>Cheers<br />
Michael</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/random-news/java-videos-now-on-youtube/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Publication: Adaptive Color Marker for SAR Environments</title>
		<link>http://www.20papercups.net/random-news/adaptive-color-marker/</link>
		<comments>http://www.20papercups.net/random-news/adaptive-color-marker/#comments</comments>
		<pubDate>Sun, 20 Mar 2011 03:36:12 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Augmented Reality]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random News]]></category>
		<category><![CDATA[UniSA]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[publication]]></category>
		<category><![CDATA[sar]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=357</guid>
		<description><![CDATA[Hey Everyone So right now I am at the IEEE Symposium on 3D User Interfaces in Singapore. We have a couple of publications which I&#8217;ll be posting over the next few days. First up is Adaptive Color Marker for SAR Environments. In a previous study we created interactive virtual control panels by projecting onto otherwise [...]]]></description>
			<content:encoded><![CDATA[<p>Hey Everyone</p>
<p>So right now I am at the IEEE Symposium on 3D User Interfaces in Singapore. We have a couple of publications which I&#8217;ll be posting over the next few days. First up is<em> Adaptive Color Marker for SAR Environments</em>. In a <a href="http://www.youtube.com/watch?v=6SAjX8-iBOc" target="_blank">previous study</a> we created interactive virtual control panels by projecting onto otherwise blank designs. We used a simple orange marker to track the position of the user&#8217;s finger. However, in a SAR environment, this approach suffers from several problems:</p>
<ul>
<li>The tracking system can&#8217;t track the marker if we project the same colour as the marker.</li>
<li>Projecting onto the marker changes it&#8217;s appearance, causing tracking to fail.</li>
<li>Users could not tell when they were pressing virtual controls, because their finger occluded the projection.</li>
</ul>
<p>We address these problems with an active colour marker. We use a colour sensor to detect what is being projected onto the marker, and change the colour of the marker to an <em>opposite</em> colour, so that tracking continues to work. In addition, we can use the active marker as a form of visual feedback. For example, we can change the colour to indicate a virtual button press.</p>
<p>I&#8217;ve added the publication to my publications page, and here&#8217;s the video of the marker in action.</p>
<p><iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/s8m9JAe9fZ0" frameborder="0" allowfullscreen></iframe></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/random-news/adaptive-color-marker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Tutorial 4 &#8211; Rebase vs. Merge</title>
		<link>http://www.20papercups.net/tutorials/git-tutorial-4-rebase-vs-merge/</link>
		<comments>http://www.20papercups.net/tutorials/git-tutorial-4-rebase-vs-merge/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 22:29:51 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Git Video Tutorials]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[pull]]></category>
		<category><![CDATA[rebase]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=349</guid>
		<description><![CDATA[After over a year, here&#8217;s the next instalment of my Git tutorial! In this video we look at the difference between rebasing and pulling from remote repositories. Sorry it took so long! &#160; &#160;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.20papercups.net/wp-content/uploads/2011/03/git-logo.png"><img src="http://www.20papercups.net/wp-content/uploads/2011/03/git-logo-150x150.png" alt="" title="git-logo" width="150" height="150" class="alignleft size-thumbnail wp-image-354" /></a>After over a year, here&#8217;s the next instalment of my Git tutorial! In this video we look at the difference between rebasing and pulling from remote repositories. Sorry it took so long!<br />
<span id="more-349"></span><br />
&nbsp;<br />
<iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/Ss7oAh0Vi_8" frameborder="0" allowfullscreen></iframe><br />
&nbsp;</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/tutorials/git-tutorial-4-rebase-vs-merge/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Behaviours Demo &#8211; Android Programming</title>
		<link>http://www.20papercups.net/programming/behaviours-demo-android-programming/</link>
		<comments>http://www.20papercups.net/programming/behaviours-demo-android-programming/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 23:37:54 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[3dbuzz]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[andriod]]></category>
		<category><![CDATA[nexus one]]></category>
		<category><![CDATA[opengl]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=347</guid>
		<description><![CDATA[Hey Everyone So this week I became a member sponsor on www.3dbuzz.com. The first thing I had a look at was their XNA Behaviour Programming videos, which are the first in their set on AI programming. However, not being particularly interested in XNA, I implemented the algorithms presented in the videos for Android. Here&#8217;s a [...]]]></description>
			<content:encoded><![CDATA[<p>Hey Everyone</p>
<p>So this week I became a member sponsor on www.3dbuzz.com. The first thing I had a look at was their XNA Behaviour Programming videos, which are the first in their set on AI programming. However, not being particularly interested in XNA, I implemented the algorithms presented in the videos for Android.</p>
<p>Here&#8217;s a video of the demo running on my Nexus One:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/zFFex-MXm_w?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/zFFex-MXm_w?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Since I was on Android and only using the Android and OpenGL ES libraries, I had to write a lot of low level code to replace the XNA functionality that 3DBuzz&#8217;s videos rely on. I also had to implement an on-screen joystick. I might write up a couple of posts on the more interesting parts of the code (what is not in the videos) soon.</p>
<p>Thanks<br />
Michael</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/programming/behaviours-demo-android-programming/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenSceneGraph 3.0 Beginner&#8217;s Guide &#8211; book review coming soon!</title>
		<link>http://www.20papercups.net/random-news/openscenegraph-3-0-beginners-guide-book-review-coming-soon/</link>
		<comments>http://www.20papercups.net/random-news/openscenegraph-3-0-beginners-guide-book-review-coming-soon/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 02:11:34 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random News]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[openscenegraph]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=344</guid>
		<description><![CDATA[Hi Everyone The guys over at Packt Publishing have kindly asked me to review a new book on programming with OpenSceneGraph. I haven&#8217;t looked at the book yet, but will get the review done sometime this week. In the mean time, checkout the book: http://link.packtpub.com/NwneHs]]></description>
			<content:encoded><![CDATA[<p><a class="moz-txt-link-freetext" href="http://link.packtpub.com/NwneHs"><a href="http://link.packtpub.com/NwneHs"><img class="alignleft size-medium wp-image-345" title="OpenSceneGraph 3.0 Beginner's Guide" src="http://www.20papercups.net/wp-content/uploads/2011/01/OSG-243x300.jpg" alt="" width="243" height="300" /></a></a></p>
<p>Hi Everyone</p>
<p>The guys over at Packt Publishing have kindly asked  me to review a new book on programming with OpenSceneGraph. I haven&#8217;t  looked at the book yet, but will get the review done sometime this week.  In the mean time, checkout the book:</p>
<p><a href="http://link.packtpub.com/NwneHs">http://link.packtpub.com/NwneHs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/random-news/openscenegraph-3-0-beginners-guide-book-review-coming-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Augmented Foam Sculpting for Capturing 3D Models</title>
		<link>http://www.20papercups.net/unisa/augmented-foam-sculpting/</link>
		<comments>http://www.20papercups.net/unisa/augmented-foam-sculpting/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 03:43:21 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Augmented Reality]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[UniSA]]></category>
		<category><![CDATA[foam cutter]]></category>
		<category><![CDATA[industrial design]]></category>
		<category><![CDATA[sar]]></category>
		<category><![CDATA[sculpting]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=305</guid>
		<description><![CDATA[This weekend I presented my paper, Augmented Foam Sculpting for Capturing 3D Models, at the International symposium on 3D user interfaces. Since the conference has passed, I have added the video to youtube and the paper to my publications page. First, the video, then some discussion after the jump. Foam Sculpting The inspiration for this [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend I presented my <a href="http://www.20papercups.net/wp-content/uploads/2009/09/foamcutter.pdf">paper</a>, Augmented Foam Sculpting for Capturing 3D Models, at the International symposium on 3D user interfaces. Since the conference has passed, I have added the video to youtube and the paper to my publications page. First, the video, then some discussion after the jump.</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/VPUT2l5JvT0&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/VPUT2l5JvT0&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<h3><span id="more-305"></span>Foam Sculpting</h3>
<p>The inspiration for this work came out of a project we did with some industrial design students. Their job was to create some input devices for my SAR Airbrushing system. First up, we had a  meeting where I showed them a very early stages of development version of the system, to give them an idea of what we were doing. They went away and came up with ideas for input devices, and in the next meeting had a bunch of sketches ready. We discussed the sketches; what we liked and what we didn&#8217;t like. Next, they brought us foam mockups of some of the designs. We discussed these, and then eventually they came back with full CAD models ready for 3D printing. They did a great job by the way. But it got us thinking:</p>
<p><em><strong>How can we make this process better?</strong></em></p>
<p>Augmented Foam Sculpting is the result of this work. It allows a designer/artist to simultaneously create a physical design mockup and matching virtual model. This is a Good Thing™, because it utilises the skills and tools that designers are already using.</p>
<p>The system works by tracking the position and orientation of both the hot wire foam cutter, and the piece of foam the user is sculpting. We can track the motion of the hot wire as it passes through the foam. From there, we can create geometry that matches the cut path, and perform a Boolean difference operation on the foam geometry, to replicate the cut in the virtual model (Before any of you &#8220;Booleans are evil&#8221; people get to me, I&#8217;d like to point out I&#8217;m only dealing with, and creating, triangle meshes. There are no 11 sided polygons here).</p>
<p>Using projectors, we can add extra information to the foam as the user sculpts. We implemented 2 visualisations to aid designers when creating specific models. <strong>Cut Animation</strong> displays cuts to be made as animated lines on the foam surface. Once a cut has been made, the system moves to the next one. This visualisation could be used to recreate a previous object, or to instruct novices. An algorithm could be developed to calculate the actual cuts that need to be made, reducing the amount of planning needed when making an object.</p>
<p>The second visualisation, <strong>Target</strong>, projects a target model so that it appears to be inside the foam. The foam is coloured based on how much needs to be removed to match a target model. This could be used to create variations on a previous model.</p>
<p>Finally, we can use 3D procedural textures to change the appearance of the foam. For example, we implemented a wood grain 3D texture. This works pretty well, because as you cut away the foam, the texture updates to appear as though the wood was actually cut. 3D textures are also ideal because we don&#8217;t need to generate texture coordinates after each cut.</p>
<p>For all the details, please have a read of the paper. If you have any questions/comments/feedback/abuse, please comment on this post, or send me an email.</p>
<p>Michael</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/unisa/augmented-foam-sculpting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

