<?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>Shang Liang &#187; Experimental</title>
	<atom:link href="http://shang-liang.com/blog/category/experimental/feed/" rel="self" type="application/rss+xml" />
	<link>http://shang-liang.com/blog</link>
	<description>Life in a Flash</description>
	<lastBuildDate>Fri, 27 Apr 2012 08:08:55 +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>Visualizing genes &#8211; the computer graphics way part 1</title>
		<link>http://shang-liang.com/blog/visualizing-genes-the-computer-graphics-way-part-1/</link>
		<comments>http://shang-liang.com/blog/visualizing-genes-the-computer-graphics-way-part-1/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 01:27:57 +0000</pubDate>
		<dc:creator>Shang</dc:creator>
				<category><![CDATA[Experimental]]></category>
		<category><![CDATA[bilogy]]></category>
		<category><![CDATA[computer graphics]]></category>
		<category><![CDATA[genome]]></category>

		<guid isPermaLink="false">http://shang-liang.com/blog/?p=336</guid>
		<description><![CDATA[A gene is a long sequence of string with 4 letters, A, T, C and G. The &#8220;encryption&#8221; was figured out long time ago. Every 3 bases code for one amino acid. But, what if we look at genes from a computer graphic programmer&#8217;s point of view? I wrote a program in Processing to &#8220;decrypt&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>A gene is a long sequence of string with 4 letters, A, T, C and G. The &#8220;encryption&#8221; was figured out long time ago. Every 3 bases code for one amino acid. But, what if we look at genes from a computer graphic programmer&#8217;s point of view?</p>
<p>I wrote a program in Processing to &#8220;decrypt&#8221; genes in my way. I read 12 bases and convert it to a RGB color. The images are the result of such&nbsp;interpretation. It&#8217;s a E.Coli genome (a bacteria easily found from our backside). It&#8217;s very similar to a random noise image. However, what caught my eyes are the darker bands close to the bottom of the image. Does it mean anything?</p>
<p>Further study will be carried out. I&#8217;ll verify whether the dark bands correspond to any biological features. Are those areas more packed with coding genes or non-coding genes?</p>
<p>Another thing I would like to do is to write a program to search for a better &#8220;decryption&#8221; look up table, to see if that will yield better results. Interestingly, these kind of programming method is normally call &#8220;genetic algorithm&#8221;.</p>
<p><strong>Image generated based on E.Coli Genome</strong></p>
<p><img class="alignnone size-full wp-image-338" title="e.coli.combined" src="http://shang-liang.com/blog/wp-content/uploads/2011/08/e.coli_.combined.png" alt="" width="500" height="920"></p>
<p><strong>Image generated with random noise</strong></p>
<p><img class="alignnone size-full wp-image-339" title="e.coli.random" src="http://shang-liang.com/blog/wp-content/uploads/2011/08/e.coli_.random.png" alt="" width="500" height="921"></p>
]]></content:encoded>
			<wfw:commentRss>http://shang-liang.com/blog/visualizing-genes-the-computer-graphics-way-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BIRME – Batch Image Resizing Made Easy</title>
		<link>http://shang-liang.com/blog/birme-batch-image-resizing-made-easy/</link>
		<comments>http://shang-liang.com/blog/birme-batch-image-resizing-made-easy/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 03:14:15 +0000</pubDate>
		<dc:creator>Shang</dc:creator>
				<category><![CDATA[Experimental]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://shang-liang.com/blog/?p=208</guid>
		<description><![CDATA[Try it Now! [UPDATE] BIRME is an HTML5 App now and you can use it online.&#160; The story behind As a web developer, I often need to resize images into a specific dimension to suit the website&#8217;s design. I used to resize images in Photoshop but I find it tedious to record actions again and [...]]]></description>
			<content:encoded><![CDATA[<p><a title="BIRME - Batch Image Resizing Made Easy" href="http://birme.net" target="_self" class="">Try it Now!</a></p>
<p>[UPDATE] BIRME is an HTML5 App now and you can use it online.&nbsp;</p>
<p>The story behind</p>
<p>As a web developer, I often need to resize images into a specific dimension to suit the website&#8217;s design. I used to resize images in Photoshop but I find it tedious to record actions again and again for different websites. Besides that, Photoshop is not cheap and not everyone has a (legal) copy. I tried some existing software but none of them satisfied me. Therefore, I decided to write one myself .</p>
<p>I&#8217;ve been searching and testing with many different platforms to develop it, C++, Java, Python and Perl. None of the above can achieve what I wanted, a single executable file without any extra libraries or dll files, no installation required. Finally I landed on PHP and I used&nbsp;<a href="http://www.bambalam.se/bamcompile/" target="_blank">bamcompile</a> to generate an executable file. I still have troubles to get a Mac or Linux version of any PHP compiler to work. I may re-use my C++ code for Mac in the future and wrap it up as an .app.</p>
]]></content:encoded>
			<wfw:commentRss>http://shang-liang.com/blog/birme-batch-image-resizing-made-easy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting Playstation Eye to work with openframeworks</title>
		<link>http://shang-liang.com/blog/getting-playstation-eye-to-work-with-openframeworks/</link>
		<comments>http://shang-liang.com/blog/getting-playstation-eye-to-work-with-openframeworks/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 03:49:22 +0000</pubDate>
		<dc:creator>5566</dc:creator>
				<category><![CDATA[Experimental]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://shang-liang.com/blog/?p=194</guid>
		<description><![CDATA[I&#8217;ve never seen such clear webcams before! The PS3 Eye is truly amazing! By default, PS3 Eye is not supported by Windows or Mac OSX. Luckily there are drivers ready for you to grab. For PC, use this driver. For Mac OSX, use this driver. To get PS3 Eye working for openframeworks in windows, you [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve never seen such clear webcams before! The PS3 Eye is truly amazing!</p>
<p>By default, PS3 Eye is not supported by Windows or Mac OSX. Luckily there are drivers ready for you to grab. For PC, <a title="ps3 playstation eye windows driver" href="http://alexpopovich.wordpress.com/2008/10/02/sony-ps3eye-camera-directshow-capture-source-filter/" target="_blank">use this driver</a>. For Mac OSX, <a title="PS3 playstation mac driver maccam" href="http://webcam-osx.sourceforge.net/" target="_blank">use this driver</a>.</p>
<p>To get PS3 Eye working for openframeworks in windows, you need to edit one line in file &#8220;ofVideoGrabber&#8221;. The solution is found in <a title="fix openframeworks to work with ps3 eye" href="http://www.openframeworks.cc/forum/viewtopic.php?f=8&amp;t=1182" target="_blank">this thread</a>, changing<br/><br/>
<pre>bool bOk = VI.setupDevice(device, width, height);</pre>
<p><br/><br/>into<br/><br/>
<pre>bool bOk = VI.setupDevice(device, width, height, VI_COMPOSITE);</pre>
<p><br/><br/>Remember to clean the project first and compile it to reflect the changes.</p>
<p>For Mac OSX, all you need to do is to copy &#8220;maccam.component&#8221; into &#8220;Library\QuickTime\&#8221;, no changes on the source code needed.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://shang-liang.com/blog/getting-playstation-eye-to-work-with-openframeworks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Box2D Tutorial</title>
		<link>http://shang-liang.com/blog/box2d-tutorial/</link>
		<comments>http://shang-liang.com/blog/box2d-tutorial/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 03:41:05 +0000</pubDate>
		<dc:creator>5566</dc:creator>
				<category><![CDATA[Experimental]]></category>
		<category><![CDATA[Maths&Physics]]></category>

		<guid isPermaLink="false">http://shang-liang.com/blog/?p=191</guid>
		<description><![CDATA[I gave a mini tutorial on Box2D during A-SFUG meeting. You can download it here. Have fun!]]></description>
			<content:encoded><![CDATA[<p>I gave a mini tutorial on Box2D during <a title="another singapore flash user group" href="http://www.a-sfug.com">A-SFUG</a> meeting. You can <a href="http://www.a-sfug.com/wp-content/uploads/2009/11/box2d.zip">download it here</a>. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://shang-liang.com/blog/box2d-tutorial/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Box2D data visualization</title>
		<link>http://shang-liang.com/blog/box2d-data-visualization/</link>
		<comments>http://shang-liang.com/blog/box2d-data-visualization/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 06:11:40 +0000</pubDate>
		<dc:creator>5566</dc:creator>
				<category><![CDATA[Experimental]]></category>
		<category><![CDATA[Maths&Physics]]></category>

		<guid isPermaLink="false">http://shang-liang.com/blog/?p=184</guid>
		<description><![CDATA[Data visualization for join the pact campaign. Click to view.]]></description>
			<content:encoded><![CDATA[<p>Data visualization for join the pact campaign. Click to view.</p>
<p><a href="http://staging.jointhepact.com/presentation"><img class="alignnone size-full wp-image-187" title="data_visualization_box2d" src="http://shang-liang.com/blog/wp-content/uploads/2009/10/data_visualization_box2d.jpg" alt="data_visualization_box2d" width="592" height="338" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://shang-liang.com/blog/box2d-data-visualization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with Box2D</title>
		<link>http://shang-liang.com/blog/fun-with-box2d/</link>
		<comments>http://shang-liang.com/blog/fun-with-box2d/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 06:47:24 +0000</pubDate>
		<dc:creator>5566</dc:creator>
				<category><![CDATA[Experimental]]></category>
		<category><![CDATA[Maths&Physics]]></category>

		<guid isPermaLink="false">http://shang-liang.com/blog/?p=179</guid>
		<description><![CDATA[Messing around with Box2D. Quite fun.]]></description>
			<content:encoded><![CDATA[<p>Messing around with Box2D. Quite fun.</p>
<p><a href="http://shang-liang.com/collaboration/shang/box2d/"><img class="alignnone size-full wp-image-180" title="box2d" src="http://shang-liang.com/blog/wp-content/uploads/2009/10/box2d.jpg" alt="box2d" width="400" height="223" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://shang-liang.com/blog/fun-with-box2d/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Just for fun, try this on Firefox or IE</title>
		<link>http://shang-liang.com/blog/just-for-fun-try-this-on-firefox-or-ie/</link>
		<comments>http://shang-liang.com/blog/just-for-fun-try-this-on-firefox-or-ie/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 11:29:46 +0000</pubDate>
		<dc:creator>5566</dc:creator>
				<category><![CDATA[Experimental]]></category>

		<guid isPermaLink="false">http://shang-liang.com/blog/?p=168</guid>
		<description><![CDATA[http://www.shang-liang.com/musicplayer/ Please be patient with my slow server. Thank you!]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.shang-liang.com/musicplayer/">http://www.shang-liang.com/musicplayer/</a></p>
<p>Please be patient with my slow server. Thank you!</p>
]]></content:encoded>
			<wfw:commentRss>http://shang-liang.com/blog/just-for-fun-try-this-on-firefox-or-ie/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Whitenoise Generator – Something helps to sleep</title>
		<link>http://shang-liang.com/blog/whitenoise-generator-something-helps-to-sleep/</link>
		<comments>http://shang-liang.com/blog/whitenoise-generator-something-helps-to-sleep/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 04:51:15 +0000</pubDate>
		<dc:creator>5566</dc:creator>
				<category><![CDATA[Experimental]]></category>

		<guid isPermaLink="false">http://shang-liang.com/blog/?p=116</guid>
		<description><![CDATA[Just something really random and stupid, but I think it may be useful. Sometimes it&#8217;s too quiet and your ear has the &#8220;ying ying ying&#8221; sound. It&#8217;s quite annoying. This small file generates white noise.  Built in Processing and Minim library. Download: PC &#38; Mac]]></description>
			<content:encoded><![CDATA[<p>Just something really random and stupid, but I think it may be useful. Sometimes it&#8217;s too quiet and your ear has the &#8220;ying ying ying&#8221; sound. It&#8217;s quite annoying. This small file generates white noise.  Built in <a title="Processing" href="http://www.processing.org" target="_blank">Processing</a> and <a title="Code Log &amp;middot; Minim: An Audio Library for Processing" href="http://code.compartmental.net/2007/03/27/minim-an-audio-library-for-processing/" target="_blank">Minim library</a>.</p>
<p>Download: <a href="http://shang-liang.com/blog/wp-content/uploads/2009/03/whitenoise_pc.zip">PC</a> &amp; <a href="http://shang-liang.com/blog/wp-content/uploads/2009/03/whitenoise_mac.zip">Mac</a></p>
]]></content:encoded>
			<wfw:commentRss>http://shang-liang.com/blog/whitenoise-generator-something-helps-to-sleep/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rhythm Surfer: Xtreme! An AIR Game (sort of)</title>
		<link>http://shang-liang.com/blog/rhythm-surfer-xtreme-an-air-game-sort-of/</link>
		<comments>http://shang-liang.com/blog/rhythm-surfer-xtreme-an-air-game-sort-of/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 04:53:40 +0000</pubDate>
		<dc:creator>Shang</dc:creator>
				<category><![CDATA[Experimental]]></category>
		<category><![CDATA[Maths&Physics]]></category>

		<guid isPermaLink="false">http://shang-liang.com/blog/?p=74</guid>
		<description><![CDATA[This is my entry for Code::XtremeApps::2008. It was a 24 hours coding competition. Sadly, my entry didn&#8217;t even get pass the preliminary round. As usual, I conclude the judges didn&#8217;t know what they were doing and they are not good enough to judge my idea. Download Here!]]></description>
			<content:encoded><![CDATA[<p>This is my entry for <a title="code xtreme 2008" href="http://www.itsc.org.sg/prevEvent.do?eventKey=15" target="_self">Code::XtremeApps::2008</a>. It was a 24 hours coding competition. Sadly, my entry didn&#8217;t even get pass the preliminary round. As usual, I conclude the judges didn&#8217;t know what they were doing and they are not good enough to judge my idea.</p>
<p><a title="rhythm surfer xtreme air application" href="http://hellovalerie.com/portfolio/wp-content/uploads/2008/07/rhythm_surfer/index.html" target="_self">Download Here!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://shang-liang.com/blog/rhythm-surfer-xtreme-an-air-game-sort-of/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Papervision3D LookAt problem and work around</title>
		<link>http://shang-liang.com/blog/papervision3d-lookat-problem-and-work-around/</link>
		<comments>http://shang-liang.com/blog/papervision3d-lookat-problem-and-work-around/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 12:49:17 +0000</pubDate>
		<dc:creator>Shang</dc:creator>
				<category><![CDATA[Experimental]]></category>

		<guid isPermaLink="false">http://shang-liang.com/blog/?p=61</guid>
		<description><![CDATA[In Papervision3D, all classes that extend DisplayObject3D inherit its lookAt function. But the problem is the result of A.lookAt(B) sometimes ends up as A back facing B. This problem is more obvious when you want to rotate a plane to face the camera. The plane becomes invisible because it&#8217;s back facing the camera. If you [...]]]></description>
			<content:encoded><![CDATA[<p>In Papervision3D, all classes that extend DisplayObject3D inherit its lookAt function. But the problem is the result of A.lookAt(B) sometimes ends up as A back facing B. This problem is more obvious when you want to rotate a plane to face the camera. The plane becomes invisible because it&#8217;s back facing the camera. If you set the material to double-sided, the material is mirrored which is not acceptable in some cases.</p>
<p>To work around the problem without touching 3D rotations, you can create an empty object3D as C and place it along vector BA and call A.lookAt(C). Vector BA can be calculated as {A.x-B.x, A.y-B.y, A.z-B.z} and the position for C should be {BA.x*1.1+A.x, BA.y*1.1+A.y, BA.z*1.1+A.z}. The number 1.1 is just an arbitrary number. Any number greater than 1 will do the trick.</p>
<p>I&#8217;ve done <a href="http://shang-liang.com/blog/wp-content/uploads/2008/04/main.swf" target="_blank">this piece of ugly thing</a> as a demonstration and <a href="http://shang-liang.com/blog/wp-content/uploads/2008/04/main.zip">the source is here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://shang-liang.com/blog/papervision3d-lookat-problem-and-work-around/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

