<?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>FLEX{er} &#187; Algorithms</title>
	<atom:link href="http://www.flexer.info/category/algorithms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexer.info</link>
	<description>flex developers web corner</description>
	<lastBuildDate>Mon, 26 Jul 2010 17:54:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
  <link>http://www.flexer.info</link>
  <url>http://www.flexer.info/favicon.ico</url>
  <title>FLEX{er}</title>
</image>
		<item>
		<title>Anaglyphs with Pixel Bender</title>
		<link>http://www.flexer.info/2010/07/26/anaglyphs-with-pixel-bender/</link>
		<comments>http://www.flexer.info/2010/07/26/anaglyphs-with-pixel-bender/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 17:54:21 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Pixel Bender]]></category>
		<category><![CDATA[anaglyphs]]></category>
		<category><![CDATA[as3]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=1677</guid>
		<description><![CDATA[Jozef Chúťka has did manage to create anaglyphs using Pixel Bender and displacement maps. The result is amazing! 

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_ee63ab1fa7305283c62866e3a4e4a2c72b014a81_73676235"
			class="flashmovie"
			width="600"
			height="450">
	<param name="movie" value="http://swf.wonderfl.net/swf/usercode/e/ee/ee63/ee63ab1fa7305283c62866e3a4e4a2c72b014a81.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://swf.wonderfl.net/swf/usercode/e/ee/ee63/ee63ab1fa7305283c62866e3a4e4a2c72b014a81.swf"
			name="fm_ee63ab1fa7305283c62866e3a4e4a2c72b014a81_73676235"
			width="600"
			height="450">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
There are multiple kinds of 2 color glasses used with anaglyphs but the demo in Jozef&#8217;s article is for the common cyan-magenta glasses.
To find out more read Jozef&#8217;s article: http://blog.yoz.sk/2010/06/anaglyphs-with-pixel-bender-and-depth-map/
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.flexer.info%2F2010%2F07%2F26%2Fanaglyphs-with-pixel-bender%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.flexer.info%2F2010%2F07%2F26%2Fanaglyphs-with-pixel-bender%2F" height="61" width="51" /></a></div><div style="float: right; margin-right: 10px"><a class="google_buzz"  
href="http://www.google.com/reader/link?url=http://www.flexer.info/2010/07/26/anaglyphs-with-pixel-bender/&title=Anaglyphs+with+Pixel+Bender&srcURL=http://www.flexer.info" target="_blank" rel="nofollow"><img
src="http://www.flexer.info/wp-content/plugins/google-buzz-button-for-wordpress/images/google-buzz.png" alt="Google Buzz" /></a></div><p>Jozef Chúťka has did manage to create <a href="http://blog.yoz.sk/2010/06/anaglyphs-with-pixel-bender-and-depth-map/" target="_blank">anaglyphs using Pixel Bender and displacement maps</a>. The result is amazing! </p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_ee63ab1fa7305283c62866e3a4e4a2c72b014a81_216075343"
			class="flashmovie"
			width="600"
			height="450">
	<param name="movie" value="http://swf.wonderfl.net/swf/usercode/e/ee/ee63/ee63ab1fa7305283c62866e3a4e4a2c72b014a81.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://swf.wonderfl.net/swf/usercode/e/ee/ee63/ee63ab1fa7305283c62866e3a4e4a2c72b014a81.swf"
			name="fm_ee63ab1fa7305283c62866e3a4e4a2c72b014a81_216075343"
			width="600"
			height="450">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>There are multiple kinds of 2 color glasses used with anaglyphs but the demo in Jozef&#8217;s article is for the common cyan-magenta glasses.</p>
<p>To find out more read Jozef&#8217;s article: <a href="http://blog.yoz.sk/2010/06/anaglyphs-with-pixel-bender-and-depth-map/" target="_blank">http://blog.yoz.sk/2010/06/anaglyphs-with-pixel-bender-and-depth-map/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2010/07/26/anaglyphs-with-pixel-bender/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fibonacci And Algae L-Systems</title>
		<link>http://www.flexer.info/2008/11/04/fibonacci-and-algae-l-systems/</link>
		<comments>http://www.flexer.info/2008/11/04/fibonacci-and-algae-l-systems/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 16:14:38 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[algae]]></category>
		<category><![CDATA[fibonacci]]></category>
		<category><![CDATA[l-system]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=280</guid>
		<description><![CDATA[Some time ago I received a very interesting and challenging algorithmic exercise. It is based on Fibonacci numbers. And here it is&#8230;
We have the following sequence:

a
b
ab
bab
abbab
bababbab
abbabbababbab
bababbababbabbababbab
abbabbababbabbababbababbabbababbab

In words it si like this: the Nth line is (N-2)th line concatenated with (N-1)th line where N is starting from 2. So the second line is line 0 + [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.flexer.info%2F2008%2F11%2F04%2Ffibonacci-and-algae-l-systems%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.flexer.info%2F2008%2F11%2F04%2Ffibonacci-and-algae-l-systems%2F" height="61" width="51" /></a></div><div style="float: right; margin-right: 10px"><a class="google_buzz"  
href="http://www.google.com/reader/link?url=http://www.flexer.info/2008/11/04/fibonacci-and-algae-l-systems/&title=Fibonacci+And+Algae+L-Systems&srcURL=http://www.flexer.info" target="_blank" rel="nofollow"><img
src="http://www.flexer.info/wp-content/plugins/google-buzz-button-for-wordpress/images/google-buzz.png" alt="Google Buzz" /></a></div><p>Some time ago I received a very interesting and challenging algorithmic exercise. It is based on Fibonacci numbers. And here it is&#8230;</p>
<p>We have the following sequence:</p>
<ol>
<li>a</li>
<li>b</li>
<li>ab</li>
<li>bab</li>
<li>abbab</li>
<li>bababbab</li>
<li>abbabbababbab</li>
<li>bababbababbabbababbab</li>
<li>abbabbababbabbababbababbabbababbab</li>
</ol>
<p>In words it si like this: the Nth line is (N-2)th line concatenated with (N-1)th line where N is starting from 2. So the second line is line 0 + line 1 which equals &#8220;ab&#8221;. The third line is line 1 + line 2 which gives us &#8220;bab&#8221; and so on.</p>
<p>We had to find the Xth character on the Yth row and if the Yth row doesn&#8217;t as much characters as requested by Xth character then we must specify that the search is out of range or that the input values are invaild.</p>
<p>Example 1: Row 8, Character 4 -> returns character &#8220;b&#8221;<br />
Example 2: Row 6, Character 6 -> returns character &#8220;a&#8221;<br />
Example 3: Row 2, Character 10 -> returns &#8220;Invalid input values&#8221;</p>
<p>This was the exercise.</p>
<p>We searched a lot and found very interesting things like:</p>
<ul class="ul">
<li>one millionth Fibonacci number &#8211; <a href="http://www.upl.cs.wisc.edu/~bethenco/fibo/" target="_blank">http://www.upl.cs.wisc.edu/~bethenco/fibo/</a></li>
<li>every Fibonacci number bigger than 1 (except F(6)=8 and F(12)=144) has at least one prime factor that is not a factor of any earlier Fibonacci number &#8211; <a href="http://www.mcs.surrey.ac.uk/Personal/R.Knott/Fibonacci/fibtable.html" target="_blank">http://www.mcs.surrey.ac.uk/Personal/R.Knott/Fibonacci/fibtable.html</a></li>
<li>an interesting number, golden ratio, used in arts and mathematics &#8211; <a href="http://en.wikipedia.org/wiki/Golden_ratio" target="_blank">http://en.wikipedia.org/wiki/Golden_ratio</a></li>
<li>article on Wikipedia regarding L-Systems &#8211; <a href="http://en.wikipedia.org/wiki/L-System" target="_blank">http://en.wikipedia.org/wiki/L-System</a></li>
</ul>
<p>There are many other interesting things regarding Fibonacci series but what was needed was found on the L-System Wikipedia article: Fibonacci and Algae L-System. The Algae is the inverse of Fibonacci.</p>
<p>Using golden ratio is relatively easy to find the Nth character in the the series but what is limiting us is the Example 3 &#8211; to tell when the requested character position is out of the number of characters on the specified row. This is because for that we need to calculate the length of the string which eventually will be bigger that any number that can be store in the computer memory.</p>
<p>There is the example in flex and you can download the source at the end of the article.<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_lsystem_333780409"
			class="flashmovie"
			width="390"
			height="460">
	<param name="movie" value="/wp-content/uploads/2008/11/lsystem.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/wp-content/uploads/2008/11/lsystem.swf"
			name="fm_lsystem_333780409"
			width="390"
			height="460">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
To find the Xth character we followed these steps:</p>
<ol>
<li>Xth / golden ratio</li>
<li>floor on the number found at step 1</li>
<li>multiply the number from step 2 with golden ratio</li>
<li>if the number at step 3 is in the (Xth-1, Xth] interval (excluding Xth-1) we have a &#8220;b&#8221; character otherwise &#8220;a&#8221; character</li>
</ol>
<p>This is mainly the algorithm to find the character.</p>
<p>We implemented an example using both Algae and Fibonacci L-System and we were helped a lot by our friends at East (<a href="http://www.east.fi" target="_blank">east.fi</a>) with the Algae implementation.</p>
<p>This is all for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2008/11/04/fibonacci-and-algae-l-systems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
