<?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>BlackHC's Adventures in the Dev World &#187; Coding</title>
	<atom:link href="http://blog.blackhc.net/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.blackhc.net</link>
	<description>Just another weblog</description>
	<lastBuildDate>Wed, 16 Nov 2011 23:12:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>A Long Journey: Acceler8 and TBB</title>
		<link>http://blog.blackhc.net/2011/11/a-long-journey-acceler8-and-tbb/</link>
		<comments>http://blog.blackhc.net/2011/11/a-long-journey-acceler8-and-tbb/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 22:40:13 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[University]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=883</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2011/11/a-long-journey-acceler8-and-tbb/" title="A Long Journey: Acceler8 and TBB"></a>A month has passed with Intel's Acceler8 competition and it has finally come to an end. It's been a long way from implementing the first sequential algorithm to having a fully-fledged parallel version. I have never worked with Intel's Threading &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2011/11/a-long-journey-acceler8-and-tbb/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2011/11/a-long-journey-acceler8-and-tbb/" title="A Long Journey: Acceler8 and TBB"></a><p>A month has passed with <a href="http://software.intel.com/fr-fr/articles/Acceler8EN/" target="_blank">Intel's Acceler8 competition</a> and it has finally come to an end. It's been a long way from implementing the first sequential algorithm to having a fully-fledged parallel version.</p>
<p>I have never worked with Intel's Threading Building Block library before and it was a nice opportunity to examine it, since it offered a better abstraction than OpenMP or pthreads.</p>
<p>The documentation is very good and you quickly learn how to work with the library. One of the caveats is that I didn't have to use a low-level synchronization construct once in the development and everything worked fine without any race conditions or similar . The <strong>parallel_*</strong> functions (eg <strong>parallel_for</strong>, <strong>parallel_reduce</strong>, and <strong>parallel_scan</strong>) together with <strong>icc</strong>'s C++0x support (lambda functions) allowed for very concise code and little programming overhead.</p>
<p>The implementation builds on Kadane's algorithm for the two dimensional case using prefix sums. One implementation that gets across the basic idea can be found <a href="http://input-output.org/2010/01/27/maximum-subarray-sum-problem--in-2d">here</a>. Mine is similar and I simply parallelized as much as possible.</p>
<p>As you can see the outer two loops iterate over a two-dimensional range that is pretty much an upper right triangle of the whole possible domain. For this I've implemented a custom <strong>range</strong> that allows for better load balancing. A range in TBB defines an iteration range of any kind and supports a <strong>split</strong> operation that is used internally by the task scheduler to distribute the range dynamically on multiple threads as it sees fit.</p>
<p>Last but not least I came up with a way to parallelize the 1D part of Kadane's algorithm that is being used by splitting the column range into linear subranges and merging the subsolutions into one solution, ie a classical divide and conquer approach.</p>
<p>Because it's the most abstract yet interesting part of our implementation, I'm going to go into more detail here. <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>How can you find the maximum subarray of a 1D array, if you know the maximum subarray of the two "halves" (they don't have to be split evenly)?<br />
Well, you don't, you need more information.</p>
<p>We calculate the following information for each chunk:</p>
<ul>
<li>maximum subarray that starts at the beginning of the chunk</li>
<li>maximum subarray that ends at the end of the chunk</li>
<li>total sum</li>
<li>maximum subarray</li>
</ul>
<p>It's easy to figure out how to merge these values for two neighboring chunks into the values of the merged chunk.<br />
The merged maximum subarray that starts at the beginning of the merged chunk is either said value for the left chunk or the total sum of the left chunk + that value of the right chunk.<br />
You can figure out how it works for the maximum subarray that ends at the end of the merged chunk <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
The maximum subarray is just the biggest of all merged values or the left maximum subarray or right one.</p>
<p>Using this idea you can use a simple <strong>parallel_reduce</strong> to parallelize Kadane's algorithm.</p>
<p>Of course, there is some overhead but for the right problem sizes this will be faster than the sequential algorithm as always.</p>
<p>Two more take-aways:</p>
<ul>
<li>Always try to use language features like templates or lambda expressions to reduce duplicate code or make the code more concise.</li>
<li>Write unit tests. I have used <a href="http://code.google.com/p/googletest/">googletest</a> which is a very small but very capable library, and it has spared me a lot of debugging trouble.</li>
</ul>
<p>Cheers <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2011/11/a-long-journey-acceler8-and-tbb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>T61 Extractor</title>
		<link>http://blog.blackhc.net/2011/08/t61-extractor/</link>
		<comments>http://blog.blackhc.net/2011/08/t61-extractor/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 16:38:54 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[extractor]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[thesixtyone]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=863</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2011/08/t61-extractor/" title="T61 Extractor"></a>I've been a vivid fan of thesixtyone.com - until they changed the design. The old site can still be found here: http://old.thesixtyone.com/. Many of my most favorite songs are from this site and I have only been able to listen &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2011/08/t61-extractor/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2011/08/t61-extractor/" title="T61 Extractor"></a><p>I've been a vivid fan of <a href="http://www.thesixtyone.com/" target="_blank">thesixtyone.com</a> - until they changed the design. The old site can still be found here: <a href="http://old.thesixtyone.com/" target="_blank">http://old.thesixtyone.com/</a>.</p>
<p>Many of my most favorite songs are from this site and I have only been able to listen to them through the site. However, since the aforementioned design change, the site has really died down in my opinion and I was fearful ever since that it would simply go down some day and vanish - taking my songs and playlists with it.</p>
<p>As counter-measure I've written a java console application to extract playlists and songs from thesixtyone. It uses <a href="http://seleniumhq.org/" target="_blank">Selenium</a> to remote-control a FireFox instance that uses the normal user-interface to play songs and read in playlists.</p>
<p>I've uploaded the code to launchpad: <a href="https://launchpad.net/t61extractor/trunk" target="_blank">https://launchpad.net/t61extractor/trunk</a><br />
I've tested and used it myself and it runs alright.</p>
<p>This was a small weekend project (or rather two weekend project) that I did a few months ago but I only found time now to write about it.</p>
<p>The code should be mostly self-explanatory and it's not a lot of code either.</p>
<p>Cheers,<br />
 Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2011/08/t61-extractor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ANTLR Stupidity (Warning 209)</title>
		<link>http://blog.blackhc.net/2010/09/antlr-stupidity/</link>
		<comments>http://blog.blackhc.net/2010/09/antlr-stupidity/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 11:16:48 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Personal Rantings]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[ANTLR]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[conversiontimeout]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[warning 209]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=829</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2010/09/antlr-stupidity/" title="ANTLR Stupidity (Warning 209)"></a>I've been playing around with a Java grammar for ANTLR that was supposed to work straight-away but it did not, with very strange warnings and errors, that made it look like ANTLR only supports lexers with a lookahead of 1 &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2010/09/antlr-stupidity/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2010/09/antlr-stupidity/" title="ANTLR Stupidity (Warning 209)"></a><p>I've been playing around with a Java grammar for ANTLR that was supposed to work straight-away but it did not, with very strange warnings and errors, that made it look like ANTLR only supports lexers with a lookahead of 1 character:</p>
<pre>warning(209): ...: Multiple token rules can match input such as "'*'": STAR, STAREQ</pre>
<p>while STAR matches only '*' and STAREQ only matches '*='. This is a huge w-t-f, especially if you have worked with ANTLR before and didn't have issues with this. This also contradicted all documentation you can find about ANTLR and its lexer rules.</p>
<p>I've spent a considerable amount of time with Google trying to find how to fix it. First I've found lots of posts on the ANTLR mailing list [antlr-interest] from people <a href="http://www.mail-archive.com/il-antlr-interest@googlegroups.com/msg04183.html" target="_blank">who had the same issue and no replies to them (really helpful, eh?)</a>. <a href="http://www.antlr.org/pipermail/antlr-interest/2009-September/035954.html" target="_blank">People had issues with replacing character ranges with unicode ranges (or rather a huge list of unicode characters)</a>, which probably caused the problem in my grammar, too. <a href="http://groups.google.com.pe/group/il-antlr-interest/browse_thread/thread/2a126c02758d6693" target="_blank">Others found that ANTLR suddenly behaved as if it only had a one character lookahead, but only if more than 300 lexer rules were used in the grammar</a>.</p>
<p>After searching for a long time and almost giving up on the mini-project I've wanted to use ANTLR for, I've found this post: <a href="http://www.antlr.org/pipermail/antlr-interest/2009-September/035954.html" target="_blank">http://www.antlr.org/pipermail/antlr-interest/2009-September/035954.html</a> (which matches my problem more or less but with additional insight)<br />
and someone even replied (someone being the guy who maintains the C runtime of ANTLR):<br />
<a href="http://www.antlr.org/pipermail/antlr-interest/2009-September/035955.html" target="_blank">http://www.antlr.org/pipermail/antlr-interest/2009-September/035955.html</a></p>
<blockquote><p>If you are sure that the messages are not correct and the lexer rules<br />
are not ambiguous, then you probably need to increase the conversion<br />
timeout:</p>
<p>-Xconversiontimeout 30000</p>
<p>if that does not work, then there is a conflict in your rules.</p>
<p>Jim</p></blockquote>
<p>And that turns out to be the right advice and the remedy to my problems and the problems of lots of other people probably.<br />
However, no warning or error message I encountered mentioned that ANTLR's internal processing actually timed-out and there was no ambiguity in the grammar itself...</p>
<p>This comes to show that any good tool like ANTLR can quickly degrade to a piece of crap and a major source of annoyance, if error and warning messages aren't clear and helpful.</p>
<p>On further investigation, you can trigger warnings that the conversion times out:</p>
<pre>internal error: org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1279):
    could not even do k=1 for decision 121; reason: timed out (&gt;1ms)</pre>
<p>but not consistently. I guess this is a bug - either in ANTLR or in ANTLRWorks... <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_neutral.gif' alt=':-|' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2010/09/antlr-stupidity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Light Propagation Volumes</title>
		<link>http://blog.blackhc.net/2010/07/light-propagation-volumes/</link>
		<comments>http://blog.blackhc.net/2010/07/light-propagation-volumes/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 15:44:39 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Game Projects]]></category>
		<category><![CDATA[Maths]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[Corrections]]></category>
		<category><![CDATA[Crytek]]></category>
		<category><![CDATA[I3D]]></category>
		<category><![CDATA[Light Propagation Volume]]></category>
		<category><![CDATA[LPV]]></category>
		<category><![CDATA[Reflective Shadow Map]]></category>
		<category><![CDATA[RSM]]></category>
		<category><![CDATA[Sponza]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=795</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2010/07/light-propagation-volumes/" title="Light Propagation Volumes"></a>I've finally finished my lab course last week - thanks to my supervisor Matthäus G. Chajdas - you can read his blog here -, it wasn't your usual lab course with work sheets and boring homework, instead I've been allowed &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2010/07/light-propagation-volumes/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2010/07/light-propagation-volumes/" title="Light Propagation Volumes"></a><p>I've finally finished my lab course last week - thanks to my supervisor Matthäus G. Chajdas - <a href="http://anteru.net/" target="_self">you can read his blog here</a> -, it wasn't your usual lab course with work sheets and boring homework, instead I've been allowed to implement a nice paper about a <a href="http://en.wikipedia.org/wiki/Global Illumination" target="_blank" >Global Illumination</a> approximation algorithm called <a href="http://www.crytek.com/fileadmin/user_upload/inside/presentations/2010_I3D/20100301_lpv.pdf" target="_blank">(Cascaded) Light Propagation Volumes</a>. It's been developed by Crytek and you can find more information (including some presentations and videos) on <a href="http://www.crytek.com/technology/presentations/" target="_blank">their server</a>. (Note: this is an implementation of the I3D paper, not the earlier SIGGRAPH one.)</p>
<div id="attachment_798" class="wp-caption alignnone" style="width: 650px"><a href="http://blog.blackhc.net/wp-content/uploads/2010/07/LPVfinal0.jpg"><img class="size-large wp-image-798 " title="LPVfinal0" src="http://blog.blackhc.net/wp-content/uploads/2010/07/LPVfinal0-1024x573.jpg" alt="" width="640" height="358" /></a><p class="wp-caption-text">Sponza scene (direct + indirect lighting w/ occlusion)</p></div>
<div id="attachment_799" class="wp-caption alignnone" style="width: 650px"><a href="http://blog.blackhc.net/wp-content/uploads/2010/07/LPVfinal1.jpg"><img class="size-large wp-image-799" title="LPVfinal1" src="http://blog.blackhc.net/wp-content/uploads/2010/07/LPVfinal1-1024x573.jpg" alt="" width="640" height="358" /></a><p class="wp-caption-text">Sponza scene (only indirect lighting w/ occlusion)</p></div>
<div id="attachment_800" class="wp-caption alignnone" style="width: 650px"><a href="http://blog.blackhc.net/wp-content/uploads/2010/07/LPVfinal2.jpg"><img class="size-large wp-image-800" title="LPVfinal2" src="http://blog.blackhc.net/wp-content/uploads/2010/07/LPVfinal2-1024x573.jpg" alt="" width="640" height="358" /></a><p class="wp-caption-text">Sponza scene (ony direct lighting)</p></div>
<div id="attachment_801" class="wp-caption alignnone" style="width: 650px"><a href="http://blog.blackhc.net/wp-content/uploads/2010/07/LPVfinal3.jpg"><img class="size-large wp-image-801" title="LPVfinal3" src="http://blog.blackhc.net/wp-content/uploads/2010/07/LPVfinal3-1024x573.jpg" alt="" width="640" height="358" /></a><p class="wp-caption-text">Sponza scene (boosted indirect lighting w/ occlusion)</p></div>
<div id="attachment_802" class="wp-caption alignnone" style="width: 650px"><a href="http://blog.blackhc.net/wp-content/uploads/2010/07/LPVfinal4.jpg"><img class="size-large wp-image-802" title="LPVfinal4" src="http://blog.blackhc.net/wp-content/uploads/2010/07/LPVfinal4-1024x573.jpg" alt="" width="640" height="358" /></a><p class="wp-caption-text">Sponza scene (boosted indirect lighting w/o occlusion)</p></div>
<p>The algorithm approximates global illumination by rendering the light into a <a href="http://www.vis.uni-stuttgart.de/dachsbacher/download/rsm.pdf" target="_blank">reflective shadow map</a>, injecting it into a volume (using a spherical harmonics representation) and propagates the light flux in this volume (hence the name of the algorithm) and taking into account occlusion as possible extension.</p>
<p>The whole algorithm is physically motivated but corners everywhere, of course, to be more efficient. The paper also contains a few errors and doesn't explain everything needed to implement it in great detail (like eg the solid angles of the side faces), so I've written two documents detailing the mistakes I've found and the additional calculations I've performed.</p>
<p>You can find the mistakes <a href="http://blog.blackhc.net/wp-content/uploads/2010/07/lpv-corrections.pdf" target="_blank">here</a> (including suggested corrections) and the full annotations document <a href="http://blog.blackhc.net/wp-content/uploads/2010/07/lpv-annotations.pdf" target="_blank">here</a>.</p>
<p>Finally I've also uploaded the whole prototype (including my code licensed under the FreeBSD license and the media files) <a href="http://blog.blackhc.net/wp-content/uploads/2010/07/LPVPrototype.zip" target="_blank">here</a> - it's 68 MB big (and it's been compressed with 7zip with a compression mode that might not be supported by WinZIP. The Sponza model is from Crytek, too. You can download the original model and textures <a href="http://www.crytek.com/downloads/technology/" target="_blank">here</a>.<br />
The project uses DirectX 10.1 and by default it won't run in DirectX 10, because it uses a texture format that is deprecated in D3D10 but supported again 10.1 (BGRA). See the comment by <strong>FatGarfield</strong> for the location that needs to be changed for it work in DX10, too. (However red and blue will be swapped then.)</p>
<p>I haven't implemented cascaded LPVs and I also use only one light/RSM and only inject its depth into the occlusion volume, but the results already look very nice in my opinion.</p>
<p>Stay tuned for more <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
Cheers,<br />
Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2010/07/light-propagation-volumes/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Panorama Stitching</title>
		<link>http://blog.blackhc.net/2010/07/panorama-stitching/</link>
		<comments>http://blog.blackhc.net/2010/07/panorama-stitching/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 11:00:04 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Personal Rantings]]></category>
		<category><![CDATA[University]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=783</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2010/07/panorama-stitching/" title="Panorama Stitching"></a>I've finally come around to "clean-up" some old project I've had lying around for a few months and upload it. I'm talking about some Panorama Stitching code I wrote for our participation in Microsoft's Imagine Cup. I'm suppressing all memories &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2010/07/panorama-stitching/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2010/07/panorama-stitching/" title="Panorama Stitching"></a><p>I've finally come around to "clean-up" some old project I've had lying around for a few months and upload it.<br />
I'm talking about some Panorama Stitching code I wrote for our participation in Microsoft's Imagine Cup.<br />
I'm suppressing all memories of it since it was an epic fail, but at least I still have learnt quite a bit about computer vision and image processing - enough to know that it's incredibly hard to come up with stable algorithms and kudos to anyone working in the field.</p>
<p>Here is the code dump: <a href="http://blog.blackhc.net/wp-content/uploads/2010/07/PanoramaStitching.zip">PanoramaStitching.zip</a></p>
<p>It contains many small projects which usually use multiple pictures as inputs or multiple webcams (depending on code or chosen preprocessor macros).</p>
<p>The most advanced prototype is the SnapshotHomographyConfigurator, which allows you to determine homographies between multiple cameras at once by marking shared points between the images.</p>
<p>Another one which works okay is the PanoramaStitching project. It creates panoramas using spherical or cylindircal projections of the input images. However, it is very sensitive to translations of the viewpoint. It works quite well with optimal/artificial images:</p>
<p><a href="http://blog.blackhc.net/wp-content/uploads/2010/07/shotA.png"><img class="alignnone size-medium wp-image-788" title="Panorama Stitching shotA" src="http://blog.blackhc.net/wp-content/uploads/2010/07/shotA-300x225.png" alt="" width="300" height="225" /></a><a href="http://blog.blackhc.net/wp-content/uploads/2010/07/shotB.png"><img class="alignnone size-medium wp-image-789" title="Panorama Stitching shotB" src="http://blog.blackhc.net/wp-content/uploads/2010/07/shotB-300x225.png" alt="" width="300" height="225" /></a></p>
<p><a href="http://blog.blackhc.net/wp-content/uploads/2010/07/live.jpg"><img class="alignnone size-full wp-image-787" title="Panorama Stitching Panorama" src="http://blog.blackhc.net/wp-content/uploads/2010/07/live.jpg" alt="" width="797" height="480" /></a></p>
<p>(Note: the small misalignment on the right stems from moving the player position slightly. Usually you use a deghosting algorithm to remove such misalignments.)</p>
<p>I've used <a href="http://opencv.willowgarage.com/wiki/" target="_blank">OpenCV</a> for image processing and <a href="http://www.yaml.org/" target="_blank">yaml</a> for loading and storing settings (and also <a href="http://rapidxml.sourceforge.net/" target="_blank">rapidxml</a>). OpenCV's C++ wrapper is pretty awesome. It's not perfect but it makes life a lot easier.</p>
<p>Stay tuned for more code/project uploads soon <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>PS: Here are the links to some papers which proved useful to me (I didn't implement most of them though, and some are implemented in OpenCV already):</p>
<ul>
<li><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.91.5822" target="_blank">Eliminating Ghosting and Exposure Artifacts in Image Mosaics</a></li>
<li><a href="http://robots.stanford.edu/cs223b04/algo_tracking.pdf" target="_blank">Pyramidal Implementation of the Lucas Kanade Feature Tracker - Description of the algorithm</a></li>
<li><a href="http://research.microsoft.com/apps/pubs/default.aspx?id=70092" target="_blank">Image Alignment and Stitching: A Tutorial</a></li>
<li><a href="http://www.google.de/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBYQFjAA&amp;url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.96.3162%26rep%3Drep1%26type%3Dpdf&amp;ei=JQVDTNSNOeOJOIzamIYN&amp;usg=AFQjCNHmesBhRUp-0hpn6mxYjZwymax2Cw&amp;sig2=26VpkBOuLIZ2tW1V0VxPCQ" target="_blank">Seamless Image Stitching by Minimizing False Edges</a></li>
<li><a href="http://research.microsoft.com/pubs/75614/ShumSzeliski-IJCV00.pdf" target="_blank">Construction of Panoramic Image Mosaics with Global and Local Alignment</a></li>
<li><a href="Image Mosaicing for Tele-Reality Applications" target="_blank">Image Mosaicing for Tele-Reality Applications</a></li>
<li><a href="http://faculty.cs.tamu.edu/jchai/CPSC641/shi_tomasi_94.pdf" target="_blank">Good Features to Track</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2010/07/panorama-stitching/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Rotation of Low Order Spherical Harmonics</title>
		<link>http://blog.blackhc.net/2010/06/rotation-of-low-order-spherical-harmonics/</link>
		<comments>http://blog.blackhc.net/2010/06/rotation-of-low-order-spherical-harmonics/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 23:10:05 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Maths]]></category>
		<category><![CDATA[Crytek]]></category>
		<category><![CDATA[Light Propagation Volume]]></category>
		<category><![CDATA[Rotation]]></category>
		<category><![CDATA[Spherical Harmonics]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=740</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2010/06/rotation-of-low-order-spherical-harmonics/" title="Rotation of Low Order Spherical Harmonics"></a>I'm currently working at university on implementing Light Propagation Volumes. The paper makes extensive use of spherical harmonics while the implementation uses the first two bands. Below is a visualization of the first 4 bands of the SH basis functions &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2010/06/rotation-of-low-order-spherical-harmonics/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2010/06/rotation-of-low-order-spherical-harmonics/" title="Rotation of Low Order Spherical Harmonics"></a><p>I'm currently working at university on implementing <a href="http://www.crytek.com/technology/presentations/" target="_blank">Light Propagation Volumes</a>. The paper makes extensive use of <a href="http://en.wikipedia.org/wiki/Spherical_harmonics" target="_blank">spherical harmonics</a> while the implementation uses the first two bands.</p>
<p>Below is a visualization of the first 4 bands of the SH basis functions (created using <a href="http://code.enthought.com/projects/mayavi/" target="_blank">Mayavi</a>):</p>
<div id="attachment_742" class="wp-caption aligncenter" style="width: 629px"><a href="http://blog.blackhc.net/wp-content/uploads/2010/06/sh0to3.jpg"><img class="size-full wp-image-742" title="sh0to3" src="http://blog.blackhc.net/wp-content/uploads/2010/06/sh0to3.jpg" alt="sh0to3" width="619" height="283" /></a><p class="wp-caption-text">The first 4 bands of the spherical harmonic basis functions</p></div>
<p>As you can see the first two bands are 4 functions, so 4 coefficients to store which conveniently fits into one RGBA texture.</p>
<p>One of the main transformations that is performed in the LPV paper is the rotation of the spherical harmonics representation of a clamped cosine lobe (that represents surface lighting) onto a normal vector direction.  It took me a while to figure out, but actually it's quite easy, which is why I write about it <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The analytical presentation of the first four base functions is simple:</p>
<p style="text-align: left;"><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_706d2523bb7365dae8ac1eaa44f1734d.gif' style=' ' class='tex' alt="S_0 \left( x, y, z \right ) = \frac{1}{2 \sqrt{\pi}}" /></span><script type='math/tex'>S_0 \left( x, y, z \right ) = \frac{1}{2 \sqrt{\pi}}</script><br />
<span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_2a90a081c65c08627081aff156902440.gif' style=' ' class='tex' alt="S_1 \left( x, y, z \right ) = - \frac{\sqrt{3}}{2 \sqrt{\pi}} y" /></span><script type='math/tex'>S_1 \left( x, y, z \right ) = - \frac{\sqrt{3}}{2 \sqrt{\pi}} y</script><br />
<span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_f71c3646eaced6589b903fbc55202646.gif' style=' ' class='tex' alt="S_2 \left( x, y, z \right ) = \frac{\sqrt{3}}{2 \sqrt{\pi}} z " /></span><script type='math/tex'>S_2 \left( x, y, z \right ) = \frac{\sqrt{3}}{2 \sqrt{\pi}} z </script><br />
<span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_e62b566d079a3237f32e3e6a600d53f6.gif' style=' ' class='tex' alt="S_3 \left( x, y, z \right ) = - \frac{\sqrt{3}}{2 \sqrt{\pi}} x" /></span><script type='math/tex'>S_3 \left( x, y, z \right ) = - \frac{\sqrt{3}}{2 \sqrt{\pi}} x</script></p>
<p style="text-align: left;">To evaluate lighting with SH for some direction v, you first determine the coefficients/weights of the SH basis functions and then sum them up.</p>
<p style="text-align: left;"><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_62efdb3cfc8367587aaa24daa5e54c20.gif' style=' ' class='tex' alt=" L = \sum_i s_i \, S_i \left( v \right ) " /></span><script type='math/tex'> L = \sum_i s_i \, S_i \left( v \right ) </script></p>
<p style="text-align: left;">Let's assume we know the coefficients <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_1576a652d84c1978430a8247c5db798d.gif' style=' ' class='tex' alt=" s^z_0, s^z_1, ... " /></span><script type='math/tex'> s^z_0, s^z_1, ... </script> of the clamped cosine lobe around the z axis, then we can determine the lighting in direction v for the cosine lobe around the normal n by transforming it into the space where the normal coincides with the z axis (ie rotate n onto the z axis):</p>
<p style="text-align: left;"><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_a9d43578de309ca75a1ef416e635cb8e.gif' style=' ' class='tex' alt=" L = \sum_i s^z_i \, S_i \left( R_{n \to z} \, v \right ) " /></span><script type='math/tex'> L = \sum_i s^z_i \, S_i \left( R_{n \to z} \, v \right ) </script></p>
<p style="text-align: left;">where <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_72c05df713d9d70bd2c19005825c4654.gif' style=' padding-bottom:1px;' class='tex' alt=" R_{n \to z} " /></span><script type='math/tex'> R_{n \to z} </script> is a rotation matrix that rotates n onto z.</p>
<p style="text-align: left;">The idea is to expand <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_9b51b7bfc7626af61c73fba376411b92.gif' style=' ' class='tex' alt=" S_i \left( R_{n \to z} \, v \right ) " /></span><script type='math/tex'> S_i \left( R_{n \to z} \, v \right ) </script> and rewrite it in terms of <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_9dca7e9f9901d704dbe0a9a640b1b9ef.gif' style=' ' class='tex' alt=" S_i \left ( v \right ) " /></span><script type='math/tex'> S_i \left ( v \right ) </script>.</p>
<p style="text-align: left;">Before doing this, let's first take a look at the coefficients of the clamped cosine lobe:</p>
<p style="text-align: left;"><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_66126bf5cd9db5ff94cc4fa73659dd0c.gif' style=' ' class='tex' alt="\begin{align*} 
s^z_0 &=\frac{ \sqrt{ \pi } }{ 2 }\\ 
s^z_1 &= 0\\ 
s^z_2 &= \sqrt\frac{ \pi }{3}\\ 
s^z_3 &= 0\\ 
\end{align*}" /></span><script type='math/tex'>\begin{align*} 
s^z_0 &=\frac{ \sqrt{ \pi } }{ 2 }\\ 
s^z_1 &= 0\\ 
s^z_2 &= \sqrt\frac{ \pi }{3}\\ 
s^z_3 &= 0\\ 
\end{align*}</script></p>
<p style="text-align: left;">The y and x direction are 0 because the cosine lobe is centered isotropic around the z axis:</p>
<p style="text-align: left;">So let's look at the expanded version of this formula if <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_21d8857e73e37ea774391e045332b63b.gif' style=' ' class='tex' alt=" r_1^T " /></span><script type='math/tex'> r_1^T </script>, <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_34bef2d01462b580813b1c032d44a5f0.gif' style=' ' class='tex' alt=" r_2^T " /></span><script type='math/tex'> r_2^T </script>, <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_498bc755e068ea1e03c36b7fd60344bf.gif' style=' ' class='tex' alt=" r_3^T " /></span><script type='math/tex'> r_3^T </script> are the row vectors of the matrix,<br />
<span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_e09264b9334a6de4f744ae811ba8eed9.gif' style=' ' class='tex' alt=" v=\bigl(\begin{smallmatrix} 
x\\ 
y\\ 
z 
\end{smallmatrix}\bigr)" /></span><script type='math/tex'> v=\bigl(\begin{smallmatrix} 
x\\ 
y\\ 
z 
\end{smallmatrix}\bigr)</script> and <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_fbb924431dfe73853b446dbbd4635631.gif' style=' ' class='tex' alt=" R_{n \to z}=\left(\begin{smallmatrix} 
r_1^T\\ 
r_2^T\\ 
r_3^T 
\end{smallmatrix}\right ) " /></span><script type='math/tex'> R_{n \to z}=\left(\begin{smallmatrix} 
r_1^T\\ 
r_2^T\\ 
r_3^T 
\end{smallmatrix}\right ) </script>, then:</p>
<p style="text-align: left;"><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_ff18dec00347fa5012ee1b824ef9db4e.gif' style=' ' class='tex' alt=" L = \sum_i s^z_i \, S_i \left( R_{n \to z} \, v \right ) = \sum_i s^z_i \, S_i \left( \left(\begin{smallmatrix} 
r_1^T \, v\\ 
r_2^T \, v\\ 
r_3^T \, v\end{smallmatrix}\right ) \right ) " /></span><script type='math/tex'> L = \sum_i s^z_i \, S_i \left( R_{n \to z} \, v \right ) = \sum_i s^z_i \, S_i \left( \left(\begin{smallmatrix} 
r_1^T \, v\\ 
r_2^T \, v\\ 
r_3^T \, v\end{smallmatrix}\right ) \right ) </script><br />
<span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_f7480868c3bcafa1bfba780d14bdf03a.gif' style=' ' class='tex' alt="\begin{align*} L &= s^z_0 \, c_0\\ 
&+ s^z_1 \, (-c_1) \, r_2^T \, v \\ 
&+ s^z_2 \, c_1 \, r_3^T \, v\\ 
&+ s^z_3 \, (-c_1) \, r_1^T \, v 
\end{align*} " /></span><script type='math/tex'>\begin{align*} L &= s^z_0 \, c_0\\ 
&+ s^z_1 \, (-c_1) \, r_2^T \, v \\ 
&+ s^z_2 \, c_1 \, r_3^T \, v\\ 
&+ s^z_3 \, (-c_1) \, r_1^T \, v 
\end{align*} </script></p>
<p style="text-align: left;">Since <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_10080ca9d8790e9e105fe19a8207da6a.gif' style=' ' class='tex' alt=" s^z_1 = 0 " /></span><script type='math/tex'> s^z_1 = 0 </script> and <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_dfd368e9d908cd15e20b6b5c0f16ee95.gif' style=' ' class='tex' alt=" s^z_3 = 0 " /></span><script type='math/tex'> s^z_3 = 0 </script>:</p>
<p style="text-align: left;"><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_db640f1bac2ea6839ae440f962a7d6e3.gif' style=' ' class='tex' alt=" L = s^z_0 \, c_0 + s^z_2 \, c_1 \, r_3^T \, v = s^z_0 \, c_0 + s^z_2 \, c_1 \, r_{31} \, x + s^z_2 \, c_1 \, r_{32} \, y + s^z_2 \, c_1 \, r_{33} \, z " /></span><script type='math/tex'> L = s^z_0 \, c_0 + s^z_2 \, c_1 \, r_3^T \, v = s^z_0 \, c_0 + s^z_2 \, c_1 \, r_{31} \, x + s^z_2 \, c_1 \, r_{32} \, y + s^z_2 \, c_1 \, r_{33} \, z </script></p>
<p style="text-align: left;"><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_d15e0f20255d1a7e36b4ef82f507bd97.gif' style=' ' class='tex' alt="  L = s^z_0 \, S_0 \left ( v \right ) - s^z_2 \, r_{32} \, S_1 \left ( v \right )+ s^z_2 \, r_{33} \, S_2 \left ( v \right ) - s^z_2 \, r_{31} \, S_3 \left ( v \right ) " /></span><script type='math/tex'>  L = s^z_0 \, S_0 \left ( v \right ) - s^z_2 \, r_{32} \, S_1 \left ( v \right )+ s^z_2 \, r_{33} \, S_2 \left ( v \right ) - s^z_2 \, r_{31} \, S_3 \left ( v \right ) </script></p>
<p style="text-align: left;">Now the question is: what is the third row of <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_72c05df713d9d70bd2c19005825c4654.gif' style=' padding-bottom:1px;' class='tex' alt=" R_{n \to z} " /></span><script type='math/tex'> R_{n \to z} </script>? If we look at the inverse matrix instead: <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_6888161c8e42f0612159bf67a6ec5d1f.gif' style=' padding-bottom:1px;' class='tex' alt=" R_{z \to n} " /></span><script type='math/tex'> R_{z \to n} </script>, we can immediately see that its third column has to be n, because <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_e2e67bad12ec4b33002810f806a3cea1.gif' style=' ' class='tex' alt=" R_{z \to n} \, \bigl(\begin{smallmatrix} 
0\\ 
0\\ 
1 
\end{smallmatrix}\bigr) = n " /></span><script type='math/tex'> R_{z \to n} \, \bigl(\begin{smallmatrix} 
0\\ 
0\\ 
1 
\end{smallmatrix}\bigr) = n </script> by construction. Since rotations are orthogonal matrices, the inverse is the same as the transposed, so we can deduce that the third row of <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_72c05df713d9d70bd2c19005825c4654.gif' style=' padding-bottom:1px;' class='tex' alt=" R_{n \to z} " /></span><script type='math/tex'> R_{n \to z} </script> is the same as the third column of <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_6888161c8e42f0612159bf67a6ec5d1f.gif' style=' padding-bottom:1px;' class='tex' alt=" R_{z \to n} " /></span><script type='math/tex'> R_{z \to n} </script>,  that is: n. Thus with <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_ef07c9f2fc39079162be1fe78a77ecdc.gif' style=' ' class='tex' alt=" n = \bigl(\begin{smallmatrix} 
n_x\\ 
n_y\\ 
n_z 
\end{smallmatrix}\bigr) " /></span><script type='math/tex'> n = \bigl(\begin{smallmatrix} 
n_x\\ 
n_y\\ 
n_z 
\end{smallmatrix}\bigr) </script> we get:</p>
<p style="text-align: left;"><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_2540af4a2b20386cc6a543882c27434b.gif' style=' ' class='tex' alt="  L = s^z_0 \, S_0 \left ( v \right ) - s^z_2 \, n_y \, S_1 \left (  v \right )+ s^z_2 \, n_z \, S_2 \left ( v \right ) - s^z_2 \, n_x  \, S_3 \left ( v \right ) " /></span><script type='math/tex'>  L = s^z_0 \, S_0 \left ( v \right ) - s^z_2 \, n_y \, S_1 \left (  v \right )+ s^z_2 \, n_z \, S_2 \left ( v \right ) - s^z_2 \, n_x  \, S_3 \left ( v \right ) </script></p>
<p style="text-align: left;">So the SH coefficients of the clamped cosine lobe along n are:</p>
<p style="text-align: left;"><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_fc99ccf1a7f5eb0d3e7a711f01aa6bd1.gif' style=' ' class='tex' alt=" 
s^n_0 = s^z_0 = \frac{ \sqrt{ \pi } }{ 2 } \\ 
s^n_1 = - s^z_2 \, n_y =  -\sqrt{ \frac{ \pi }{3} } \, n_y \\ 
s^n_2 = s^z_2 \, n_z = \sqrt{\frac{ \pi }{3} } \, n_z \\ 
s^n_1 = - s^z_2 \, n_x = - \sqrt{\frac{ \pi }{3}} \, n_x 
" /></span><script type='math/tex'> 
s^n_0 = s^z_0 = \frac{ \sqrt{ \pi } }{ 2 } \\ 
s^n_1 = - s^z_2 \, n_y =  -\sqrt{ \frac{ \pi }{3} } \, n_y \\ 
s^n_2 = s^z_2 \, n_z = \sqrt{\frac{ \pi }{3} } \, n_z \\ 
s^n_1 = - s^z_2 \, n_x = - \sqrt{\frac{ \pi }{3}} \, n_x 
</script></p>
<p style="text-align: left;">This is it <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p style="text-align: left;">Cheers,<br />
Andreas</p>
<p style="text-align: left;">PS: a few screenshots from the LPV project:</p>
<p style="text-align: left;"><a href="http://blog.blackhc.net/wp-content/uploads/2010/06/GPUPropCopy-0616.jpeg"><img class="size-medium wp-image-770 alignnone" title="GPUPropCopy 0616" src="http://blog.blackhc.net/wp-content/uploads/2010/06/GPUPropCopy-0616-300x236.jpg" alt="GPUPropCopy 0616" width="300" height="236" /></a><a href="http://blog.blackhc.net/wp-content/uploads/2010/06/noLPV.JPG"><br />
<img class="size-medium wp-image-773 alignnone" title="noLPV" src="http://blog.blackhc.net/wp-content/uploads/2010/06/noLPV-300x210.jpg" alt="noLPV" width="300" height="210" /></a><a href="http://blog.blackhc.net/wp-content/uploads/2010/06/LPV32P128C.JPG"><img class="alignnone size-medium wp-image-771" title="LPV32P128C" src="http://blog.blackhc.net/wp-content/uploads/2010/06/LPV32P128C-300x210.jpg" alt="LPV32P128C" width="300" height="210" /></a></p>
<p style="text-align: left;"><a href="http://blog.blackhc.net/wp-content/uploads/2010/06/noLPV_2.JPG"><img class="alignnone size-medium wp-image-774" title="noLPV_2" src="http://blog.blackhc.net/wp-content/uploads/2010/06/noLPV_2-300x210.jpg" alt="noLPV_2" width="300" height="210" /></a><a href="http://blog.blackhc.net/wp-content/uploads/2010/06/LPV32P128C_2.JPG"><img class="alignnone size-medium wp-image-772" title="LPV32P128C_2" src="http://blog.blackhc.net/wp-content/uploads/2010/06/LPV32P128C_2-300x210.jpg" alt="LPV32P128C_2" width="300" height="210" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2010/06/rotation-of-low-order-spherical-harmonics/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Extracting Information from StudiVZ</title>
		<link>http://blog.blackhc.net/2009/10/extracting-information-from-studivz/</link>
		<comments>http://blog.blackhc.net/2009/10/extracting-information-from-studivz/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 18:34:42 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Personal Rantings]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Profiles]]></category>
		<category><![CDATA[Regex]]></category>
		<category><![CDATA[StudiVZ]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=678</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2009/10/extracting-information-from-studivz/" title="Extracting Information from StudiVZ"></a>Some time ago somebody stole 1 million data records from StudiVZ, the German Facebook clone. I'm not exactly sure why people call the person a hacker who stole data, because it appears he simply wrote a tool that harvested the &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2009/10/extracting-information-from-studivz/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2009/10/extracting-information-from-studivz/" title="Extracting Information from StudiVZ"></a><p>Some time ago somebody stole 1 million data records from <a href="http://www.studivz.net/" target="_blank">StudiVZ</a>, the German Facebook clone. I'm not exactly sure why people call the person a hacker who stole data, because it appears he simply wrote a tool that harvested the publicly available data from StudiVZ (which everyone with an account can view).</p>
<p>People on StudiVZ share all their data by default---contrary to Facebook which values a person's private data a lot more. Thus by simply opening each profile from a dummy user and processing the HTML data from StudiVZ one can extract a lot and some more information from random people who probably don't even know about it or don't care.. so I'm not sure about the stealing part.</p>
<p>Apparently there are some captcha's when you start browsing searches beyond a few pages. I guess that is where the hacking part comes in, because getting around a captcha probably constitutes hacking---maybe?</p>
<p>Anyway I think part of the media coverage is a bit ridiculous because anyone can write a simple harvester in an hour or two. It took me one and half hours, so I think I'm on the safe side with this estimate and I didn't really have a clue about this stuff before either.</p>
<p>Since I don't want to "hack", I've only written a very tame harvester. It connects to your personal StudiVZ account, and retrieves the name and profile ID (and thus profile URL) of all your friends in the "Meine Freunde" pages.</p>
<p>It could do a lot more with that like retrieving everybody's birthday or random pictures, but I'm too lazy to code that because you use the same pattern for extracting data over and over again and it stops being interesting quite fast.</p>
<p>You can download the project <a href="http://blog.blackhc.net/wp-content/uploads/2009/10/StudiVZExtractor.zip" target="_blank">here</a>. It is a one file C# project. I'm releasing it under GPL (whatever).</p>
<p>It's really easy to explain how it works:</p>
<ul>
<li>It uses <strong>System.Net</strong>'s <strong>HttpWebRequest</strong> and <strong>HttpWebResponse</strong> to get (and post) web pages.</li>
<li>StudiVZ (like every other portal) uses cookies, so I create a <strong>CookieContainer </strong>and use it in every http request.</li>
<li>There are a few hidden values that StudiVZ expects during login. I'm retrieving them from the main page using custom built regular expressions. I've found a <a href="http://derekslager.com/blog/posts/2007/09/a-better-dotnet-regular-expression-tester.ashx" target="_blank">handy AJAX tester for .NET regular expressions</a>. It was really useful for building the expressions and debugging them. (BTW you can find all URLs I used in the comments.)</li>
<li>After login I use the same pattern: get page &amp; parse using regex for everything.</li>
<li>Visual Studio has an awesome "HTML Visualizer" for strings. It displays the content of a string as HTML page, which is really nifty if you're doing anything related to HTML processing.</li>
</ul>
<p>The code is quite ugly. Well, it's not production code and this is only meant as a proof of concept.</p>
<p>Also note that I have at most violated the AGB of StudiVZ and not committed any criminal acts and I'm not planning to sell my friend's profile IDs or data either <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Maybe someone can extend the code and make it more useful. I guess it would be fun to automatically download all your pictures (including tags) and feed them into flickr or picasa... but someone else can do that.</p>
<p>Cheers,<br />
Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2009/10/extracting-information-from-studivz/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sploidz Revisited (Unofficially)</title>
		<link>http://blog.blackhc.net/2009/08/sploidz-revisited/</link>
		<comments>http://blog.blackhc.net/2009/08/sploidz-revisited/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 09:08:26 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Game Projects]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Red Thumb Games]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[FlashDevelop]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[Sploidz]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=644</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2009/08/sploidz-revisited/" title="Sploidz Revisited (Unofficially)"></a>I've already written about the semi-conductor project and how I've written some Flash animations/applications for it. Of course, I'm more interested in making fun stuff&#180;, so I decided to put my knowledge to good use and write a small game &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2009/08/sploidz-revisited/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2009/08/sploidz-revisited/" title="Sploidz Revisited (Unofficially)"></a><p>I've already written about the semi-conductor project and how I've written some Flash animations/applications for it. Of course, I'm more interested in making fun stuff<a class="annotation" title="of course, the math stuff is also fun from a different point of view" href="javascript:;"><strong>&#180;</strong></a>, so I decided to put my knowledge to good use and write a small game to see how difficult/awkward Flash actually is.</p>
<p>To sum it up, it is somewhat awkward, at least if you use the IDE itself. FlashDevelop still is as nice as ever, but you can quickly develop games nonetheless. I prefer Torque Game Builder though in retrospect.</p>
<p>Before I continue talking about the development itself, let's take a look at the actual game. <a href="http://www.redthumbgames.com/sploidz/">Sploidz</a> was the first game I wrote using Torque Game Builder for Joshua Dallman, and since I still had all the assets in my subversion repository, it was an easy decision to try and port this game. If you want to play it, you can download it for <strong>free</strong> <a href="http://www.redthumbgames.com/sploidz/" target="_blank">here</a>.<br />
I haven't ported everything: I've just rewritten the main characteristic features that make up Sploidz's code in ActionScript.</p>
<p>Without further ado<a class="annotation" title="honestly I don't know why I know this expression.." href="javascript:;"><strong>&#180;</strong></a> here is the game:<br />
<object id="Sploidz" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="512" height="384" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="align" value="middle" /><param name="allowFullScreen" value="true" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="src" value="http://blog.blackhc.net/wp-content/uploads/2009/08/Sploidz.swf" /><param name="name" value="Sploidz" /><param name="allowfullscreen" value="true" /><embed id="Sploidz" type="application/x-shockwave-flash" width="512" height="384" src="http://blog.blackhc.net/wp-content/uploads/2009/08/Sploidz.swf" name="Sploidz" bgcolor="#ffffff" quality="high" allowfullscreen="true" align="middle"></embed></object><br />
<a href="http://blog.blackhc.net/wp-content/uploads/2009/08/Sploidz.swf" target="_blank">Click to open Sploidz in its own window</a></p>
<p>Because the art is still copyrighted and I haven't heard back from Joshua yet <a class="annotation" title="and because I had too much spare time on Saturday night when everybody is having fun and partying and I'm sitting alone this wretched room.. just kidding" href="javascript:;"><strong>&#180;</strong></a>, I decided to create a free version that only uses "coder art" - in this hand-drawn coder art <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Some<a class="annotation" title="Mr. jRAD" href="javascript:;"><strong>&#180;</strong></a> have said that this version looks cuter, decide for yourself:<br />
<object id="SploidzCC" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="512" height="384" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="align" value="middle" /><param name="allowFullScreen" value="true" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="src" value="http://blog.blackhc.net/wp-content/uploads/2009/08/SploidzCC.swf" /><param name="name" value="SploidzCC" /><param name="allowfullscreen" value="true" /><embed id="SploidzCC" type="application/x-shockwave-flash" width="512" height="384" src="http://blog.blackhc.net/wp-content/uploads/2009/08/SploidzCC.swf" name="SploidzCC" bgcolor="#ffffff" quality="high" allowfullscreen="true" align="middle"></embed></object><br />
<a href="http://blog.blackhc.net/wp-content/uploads/2009/08/SploidzCC.swf" target="_blank">Click to open SploidzCC in its own window</a></p>
<p>Below you'll find a description of the development and at least one helpful trick and most importantly a link to the source code of the "copyright-free" version.</p>
<p><strong>Because the orginal version is way too difficult to be really fun, I actually sat down one more time and added code to make the platform slower if you're in danger of losing (up to 3 times slower):</strong><br />
<object id="SploidzMoreFun" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="512" height="384" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="align" value="middle" /><param name="allowFullScreen" value="true" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="src" value="http://blog.blackhc.net/wp-content/uploads/2009/08/SploidzMoreFun.swf" /><param name="name" value="SploidzMoreFun" /><param name="allowfullscreen" value="true" /><embed id="SploidzMoreFun" type="application/x-shockwave-flash" width="512" height="384" src="http://blog.blackhc.net/wp-content/uploads/2009/08/SploidzMoreFun.swf" name="SploidzMoreFun" bgcolor="#ffffff" quality="high" allowfullscreen="true" align="middle"></embed></object><br />
<a href="http://blog.blackhc.net/wp-content/uploads/2009/08/SploidzMoreFun.swf" target="_blank">Click to open SploidzMoreFun in its own window</a></p>
<p><span id="more-644"></span></p>
<h3>Development</h3>
<p>I think I spent less than 20 hours on the project. It's hard to say because I worked on it on three different days, but only probably less than 6 hours on each.</p>
<p>The main problems during the development were:</p>
<ul>
<li>How do I get the art assets into Flash?</li>
<li>How do I use the IDE and objects in a way that is helpful?</li>
</ul>
<p>Lessons learned:</p>
<p>Even though the project isn't that big, it didn't take long for annoying bugs to appear - mainly in the matching code, because it's somewhat asynchronous and you have to make sure that an item doesn't get removed between events, etc.<br />
So again, I can only say that assertions and lots of debug messages are your friend and are really useful for understanding the sometimes mysterious ways of non-obvious code interaction.</p>
<p>Again one of the biggest headache was how to make the game a game (so you don't always and feel some reward while playing) and this resulted in implementing the platform game element from the original Sploidz game, although I wanted to avoid that in the beginning because of the added complexity.<br />
Someone<a class="annotation" title="Roy" href="javascript:;"><strong>&#180;</strong></a> pointed out though, that if you have 8 columns and only 5 different item types, the main idea of matching items becomes trivial. It's obvious, but I didn't think of it while coding the proof of concept code.<br />
Of course you have to somewhat tune the speed and animation durations of everything to make it playable. I think the game is really hard at the moment, but that's better than too easy and I especially added the "survival timer" in the upper right panel to allow for some competition and personal best times.<br />
I might change the platform code at some point to be more player-friendly, but I have more pressing projects to do at the moment: my Bachelor Thesis... /o\.<br />
As said above, I actually sat down and added a time scaler to the platform. The code is quite simple but helps the game a bit (I managed to survive 2 minutes and it was more challenging and less depressing to play the game ^ ^). The code is quite simple:</p>
<pre>public function getPlatformTimeScale():Number {
	var maxRow:int = 0;
	for ( var column:int = 0 ; column &lt; Grid.numColumns ; column++ ) {
		var firstEmptyRow:int = grid.getFirstEmptyCellRow( column );
		if ( firstEmptyRow &gt; maxRow ) {
			maxRow = firstEmptyRow;
		}
	}

	const minScale:Number = 1.0;
	const maxScale:Number = 3.0;
	var scale:Number = minScale + (maxScale - minScale) * Math.pow( maxRow / (Grid.numRows - 1), 8 );
	trace( "Using platform scale: " + scale );
	return scale;
}
</pre>
<p>As you see, it uses a power function to make the platform slower only if really few empty rows are left.</p>
<h4>Interesting things to know</h4>
<ul>
<li>If you want to important a sequence of images (say you have an animation stored as picture frames diamond_black00.png to diamond_black15.png, only select the first image when "importing to stage" in Flash, otherwise you won't get the dialog asking you whether you want to import an image sequence as animation.<br />
(Cost me a few hours of searching to find this out.)</li>
<li>If you have animations that stores multiple frames in one image, you'll have to split the images up into the respective frames. To do this in Photoshop make use of "guides" and slicing and notice the "Slices from Guides" button that is offered. It's really helpful.<br />
You can also store the creation of the guides and the slicing as action/macro and reuse it which also saves some time.</li>
<li>If you ever get the error "type was not defined or was not a compile-time constant", you might have a symbol instance that has the same name and class name. Flash freaks out for some reason and displays this weird error message.</li>
</ul>
<p>For added fanciness, I've also included two older builds that show the evolution of the game code.</p>
<p>Note: There are bugs in these builds, so they are really just meant to show the progress on the first and second day.<br />
<object id="Sploidz0810" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="512" height="384" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="align" value="middle" /><param name="allowFullScreen" value="true" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="src" value="http://blog.blackhc.net/wp-content/uploads/2009/08/Sploidz0810.swf" /><param name="name" value="Sploidz0810" /><param name="allowfullscreen" value="true" /><embed id="Sploidz0810" type="application/x-shockwave-flash" width="512" height="384" src="http://blog.blackhc.net/wp-content/uploads/2009/08/Sploidz0810.swf" name="Sploidz0810" bgcolor="#ffffff" quality="high" allowfullscreen="true" align="middle"></embed></object><br />
<a href="http://blog.blackhc.net/wp-content/uploads/2009/08/Sploidz0810.swf" target="_blank">Click to open Sploidz0810 in its own window</a></p>
<p><object id="Sploidz0813" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="512" height="384" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="align" value="middle" /><param name="allowFullScreen" value="true" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="src" value="http://blog.blackhc.net/wp-content/uploads/2009/08/Sploidz0813.swf" /><param name="name" value="Sploidz0813" /><param name="allowfullscreen" value="true" /><embed id="Sploidz0813" type="application/x-shockwave-flash" width="512" height="384" src="http://blog.blackhc.net/wp-content/uploads/2009/08/Sploidz0813.swf" name="Sploidz0813" bgcolor="#ffffff" quality="high" allowfullscreen="true" align="middle"></embed></object><br />
<a href="http://blog.blackhc.net/wp-content/uploads/2009/08/Sploidz0813.swf" target="_blank">Click to open Sploidz0813 in its own window</a></p>
<p>Fun note: I implemented most of the fancy features (combo matches, the score bubbles, the platform) today in a few hours (a lot less than expected). I think ActionScript is an okay language, although it lacks quite a few comfort features of regular modern programming languages (function overloading, delegate types that actually check parameter type).</p>
<p>Last but not least here is the link to the code: <a href="http://blog.blackhc.net/wp-content/uploads/2009/08/FlashySploidz.zip">FlashySploidz Source</a><br />
I release the code itself under GPL and the art under Common Creative.</p>
<p>Over and out,<br />
Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2009/08/sploidz-revisited/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PowerPointLaTeX Update</title>
		<link>http://blog.blackhc.net/2009/08/powerpointlatex-update/</link>
		<comments>http://blog.blackhc.net/2009/08/powerpointlatex-update/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 00:48:34 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[Formula Object]]></category>
		<category><![CDATA[Invoke]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[PowerPoint]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=623</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2009/08/powerpointlatex-update/" title="PowerPointLaTeX Update"></a>Because people complained to me about the formula feature in my PowerPointLaTeX add-in, which used a somewhat experimental approach to editing formula objects by adding an editing text shape that contained the formula code and that would be merged back &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2009/08/powerpointlatex-update/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2009/08/powerpointlatex-update/" title="PowerPointLaTeX Update"></a><p>Because people complained to me about the formula feature in my PowerPointLaTeX add-in, which used a somewhat experimental approach to editing formula objects by adding an editing text shape that contained the formula code and that would be merged back into the formula as soon as you deselect it, I decided to rewrite it to use a standard modal dialog to edit formula objects:</p>
<div id="attachment_624" class="wp-caption aligncenter" style="width: 497px"><a href="http://blog.blackhc.net/wp-content/uploads/2009/08/PPTLaTeX_eqeditor.JPG"><img class="size-full wp-image-624" title="PPTLaTeX_eqeditor" src="http://blog.blackhc.net/wp-content/uploads/2009/08/PPTLaTeX_eqeditor.JPG" alt="PPTLaTeX_eqeditor" width="487" height="400" /></a><p class="wp-caption-text">Updated Ribbon (above) and Formula Editor Dialog (below)</p></div>
<p>The editor isn't perfect (yet), but it certainly shouldn't add any bugs to the add-in and solve some natural issues the old approach created.</p>
<h3>Implementation Note</h3>
<p>The idea was pretty straight-forward but the actual UI design was a PITA due me not knowning the panel/flow/table layout concepts very well and the code still has some annoying quirks with auto-scroll, so I need to fix that later.</p>
<p>I almost rewrote the whole cache system, because I'm using a background thread for updating the preview (if the text is changed, a 500 msec timer is started which triggers an update) and the update accesses the cache system, which in turn accesses PowerPoint to return some data, which in turn is busy because of the modal dialog -&gt; <strong>dead-lock</strong>.</p>
<p>The solution to this is very simple but was not obvious to me at first (I actually began to rewrite the cache system with a feeling that there should be an easier solution):<br />
The background thread needs an Invoke call to update the preview picture because the control has been created by a different thread (the main thread) and the code to get an updated picture can simply be moved into Invoke delegate function.</p>
<p>This solved all my problems and made 4 hours of previous work and thinking about a new cache system obsolete <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_neutral.gif' alt=':-|' class='wp-smiley' /> </p>
<p>Download the new build at: <a href="http://code.google.com/p/powerpointtools/downloads/list" target="_blank">http://code.google.com/p/powerpointtools/downloads/list</a></p>
<p>Cheers,<br />
Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2009/08/powerpointlatex-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Semi-Conductor Optimization (Uni Project)</title>
		<link>http://blog.blackhc.net/2009/08/semi-conductor-optimization-uni-project/</link>
		<comments>http://blog.blackhc.net/2009/08/semi-conductor-optimization-uni-project/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 12:29:55 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Maths]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[MatLAB]]></category>
		<category><![CDATA[PowerPoint]]></category>
		<category><![CDATA[Semi-Conductor Optimization]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=611</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2009/08/semi-conductor-optimization-uni-project/" title="Semi-Conductor Optimization (Uni Project)"></a>I've written my last exam yesterday (except for two oral exams in September), so now I have got some spare time before I start working on my Bachelor Thesis tomorrow and I want to use it to wrap up a &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2009/08/semi-conductor-optimization-uni-project/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2009/08/semi-conductor-optimization-uni-project/" title="Semi-Conductor Optimization (Uni Project)"></a><p>I've written my last exam yesterday (except for two oral exams in September), so now I have got some spare time before I start working on my Bachelor Thesis tomorrow and I want to use it to wrap up a few things.</p>
<p>During this term I took part in a course that was both a (research) project/presentation/lecture thing, which was fun but also a lot of work.<br />
I've already written about one mathematical aspect of it in my post about <a href="http://blog.blackhc.net/2009/05/analysis-cauchy-schwarz-and-reciprocal-sums/" target="_blank">Analysis, Cauchy-Schwarz and Reciprocal Sums</a>.</p>
<p>The project was about optimizing semi-conductor wiring placement. We wrote a small paper about our findings and the work it was based one - you can look download it <a href="http://blog.blackhc.net/wp-content/uploads/2009/08/SemiConductorPaper.pdf">here</a>.</p>
<p>We also created a self-running presentation that doesn't contain any Maths at all but makes heavy use of Flash animations (which were exported to .gif manually, which was a huge pain in the ass, which I will never do again if possible) to visualize all the concepts and algorithms.</p>
<p>You can download a PowerPoint 2007 (.pptx) version <a href="http://blog.blackhc.net/wp-content/uploads/2009/07/Aufbereitung.pptx" target="_blank">here</a> or one that works with PowerPoint 2003 <a href="http://blog.blackhc.net/wp-content/uploads/2009/07/Aufbereitung.ppt" target="_blank">here</a>.</p>
<p>For the Student's I sat down and wrote a small Flash application to show the algorithms at work. It's not obvious how it works, so let me explain the major points:</p>
<ul>
<li>On the right you have a number of panels that you can enlarge by clicking on the small button in the upper right of each panel.</li>
<li>The upper three panels show different views of the same dataset. They will all be updated as you run the algorithm step by step.</li>
<li>The fourth panel lets you change the number of wires and/or their activity.</li>
<li>The last panel shows the electrical field that is created by one active wire in the center. It was created using MatLAB. I've also uploaded the script <a href="http://blog.blackhc.net/wp-content/uploads/2009/08/leiter.m" target="_blank">here</a>.</li>
</ul>
<p><object id="Abitag" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="250" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="align" value="middle" /><param name="allowFullScreen" value="true" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="src" value="http://blog.blackhc.net/wp-content/uploads/2009/08/Abitag.swf" /><param name="name" value="Abitag" /><param name="allowfullscreen" value="true" /><embed id="Abitag" type="application/x-shockwave-flash" width="400" height="250" src="http://blog.blackhc.net/wp-content/uploads/2009/08/Abitag.swf" name="Abitag" bgcolor="#ffffff" quality="high" allowfullscreen="true" align="middle"></embed></object></p>
<p><a href="http://blog.blackhc.net/wp-content/uploads/2009/08/Abitag.swf">Abitag</a></p>
<p>Last but not least I've also uploaded the current version of all my .fla and .as files. You can download it <a href="http://blog.blackhc.net/wp-content/uploads/2009/08/FlashSources.zip" target="_blank">here</a>.</p>
<p>ActionScript is a nice language and you can quickly learn it using the <a href="http://help.adobe.com/en_US/Flash/10.0_Welcome/WS091A3800-D889-4425-B647-C44097B73F34.html" target="_blank">available resources from Adobe</a>.<br />
While ActionScript 2.0 is arguably weird, ActionScript 3.0 is quite logical and it's syntax is straight-forward and consistent, too. You can't say that about the IDE (Flash CS4), which is braindead, but if you're only interested in writing ActionScript code, <a href="http://www.flashdevelop.org/" target="_blank">FlashDevelop</a> is an excellent and free alternative.</p>
<p>This is it for now, maybe I'll play around with Flash some more another time.<br />
Cheers,<br />
Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2009/08/semi-conductor-optimization-uni-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

