<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/1.5.1-alpha" -->
<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/"
>

<channel>
	<title>the other side of the firewall</title>
	<link>http://sahuguet.blogsome.com</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Sat, 31 Dec 2005 16:23:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.1-alpha</generator>
	<language>en</language>

		<item>
		<title>Rational geometry (cont&#8217;d)</title>
		<link>http://sahuguet.blogsome.com/2005/09/27/rational-geometry-contd/</link>
		<comments>http://sahuguet.blogsome.com/2005/09/27/rational-geometry-contd/#comments</comments>
		<pubDate>Tue, 27 Sep 2005 18:44:50 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>Software Development</category>
	<category>Development</category>
	<category>Java</category>
	<category>Games and Gaming</category>
		<guid>http://sahuguet.blogsome.com/2005/09/27/rational-geometry-contd/</guid>
		<description><![CDATA[	I made a recent post about rational geometry, or a way to solve geometric problems with no need for trigonometric functions.
	My intuition is that this new (apparently the Chinese invented it more than a thousand years ago) way of doing geometry can be very useful for machines.
	I ran a very simple experiment. At the end [...]]]></description>
			<content:encoded><![CDATA[	<p>I made a <a href="http://sahuguet.blogsome.com/2005/09/17/new-match-trigonometry-redefined-without-sines-and-cosines/">recent post</a> about rational geometry, or a way to solve geometric problems with no need for trigonometric functions.</p>
	<p>My intuition is that this new (apparently the Chinese invented it more than a thousand years ago) way of doing geometry can be very useful for machines.</p>
	<p>I ran a very simple experiment. At the end of Chapter 1 from the referenced book, there is a simple geometric problem with the traditional solution and the rational solution.<br />
I have implemented the solution in Java and run some measurements. The rational solution is x4 faster.<br />
Note that the code requires Java 1.5, in order to access the new nanosecond timer.</p>
	<p>The output is as follows:<br />
<code><br />
java Geometry<br />
3.313693059275397 computed in 200000ns<br />
3.3136930592753853 computed in 23000ns<br />
3.313693059275397 computed in 1046.7512ns<br />
3.3136930592753853 computed in 250.1114ns<br />
</code></p>
	<p><code><br />
public class Geometry<br />
{<br />
    public static void main(String args[])<br />
    {<br />
	long start, end;<br />
	int ITER = 5000000;</p>
	<p>	/* WARMING UP */</p>
	<p>	// traditional way<br />
	start = getTime();<br />
	double alpha = Math.acos( (float)3/4);<br />
	double beta = Math.PI - Math.PI/4 - alpha;<br />
	double d = 5 * Math.sin(alpha) / Math.sin(beta);<br />
	end = getTime();<br />
	System.out.println(d + " computed in " + (end-start) + "ns");</p>
	<p>	// rational geometry<br />
	start = getTime();<br />
	double q1 = 1400 - 525*Math.sqrt(7);<br />
	double d1 = Math.sqrt(q1);<br />
	end = getTime();<br />
	System.out.println(d1 + " computed in " + (end-start) + "ns");</p>
	<p>	/* WE ARE WARMED UP */</p>
	<p>	// traditional way<br />
	start = getTime();<br />
	for(int i=0; i<iter ; i++)<br />
	    {<br />
		alpha = Math.acos( (float)3/4);<br />
		// System.out.println("alpha: " + alpha);<br />
		beta = Math.PI - Math.PI/4 - alpha;<br />
		// System.out.println("beta: " + beta);<br />
		d = 5 * Math.sin(alpha) / Math.sin(beta);<br />
	    }<br />
	end = getTime();<br />
	System.out.println(d + " computed in " + (end-start)/(float)ITER + "ns");</p>
	<p>	// rational geometry<br />
	start = getTime();<br />
	for(int i=0; i<ITER; i++)<br />
	    {<br />
		q1 = 1400 - 525*Math.sqrt(7);<br />
		d1 = Math.sqrt(q1);<br />
	    }<br />
	end = getTime();<br />
	System.out.println(d1 + " computed in " + (end-start)/(float)ITER+ "ns");</p>
	<p>    }</p>
	<p>    public final static long getTime()<br />
    {<br />
	return System.nanoTime();<br />
    }</p>
	<p>}<br />
</code></iter></code>
</p>
]]></content:encoded>
			<wfw:commentRss>http://sahuguet.blogsome.com/2005/09/27/rational-geometry-contd/feed/</wfw:commentRss>
	</item>
		<item>
		<title>Virtual plague spreading like wildfire in World of Warcraft</title>
		<link>http://sahuguet.blogsome.com/2005/09/22/virtual-plague-spreading-like-wildfire-in-world-of-warcraft/</link>
		<comments>http://sahuguet.blogsome.com/2005/09/22/virtual-plague-spreading-like-wildfire-in-world-of-warcraft/#comments</comments>
		<pubDate>Thu, 22 Sep 2005 03:53:11 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>Games and Gaming</category>
		<guid>http://sahuguet.blogsome.com/2005/09/22/virtual-plague-spreading-like-wildfire-in-world-of-warcraft/</guid>
		<description><![CDATA[	Virtual plague spreading like wildfire in World of Warcraft
	This is one of the most interesting stories I have read.
It reminds me of a movie called The 13th Floor where a game goes beyond its purpose.
]]></description>
			<content:encoded><![CDATA[	<p><a href="http://arstechnica.com/news.ars/post/20050921-5337.html">Virtual plague spreading like wildfire in World of Warcraft</a></p>
	<p>This is one of the most interesting stories I have read.<br />
It reminds me of a movie called <a href="http://us.imdb.com/title/tt0139809/">The 13th Floor</a> where a game goes beyond its purpose.</p>
]]></content:encoded>
			<wfw:commentRss>http://sahuguet.blogsome.com/2005/09/22/virtual-plague-spreading-like-wildfire-in-world-of-warcraft/feed/</wfw:commentRss>
	</item>
		<item>
		<title>Poker software</title>
		<link>http://sahuguet.blogsome.com/2005/09/18/poker-software/</link>
		<comments>http://sahuguet.blogsome.com/2005/09/18/poker-software/#comments</comments>
		<pubDate>Sun, 18 Sep 2005 18:06:46 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>Games and Gaming</category>
		<guid>http://sahuguet.blogsome.com/2005/09/18/poker-software/</guid>
		<description><![CDATA[	I have just been iniated to Texas Hold&#8217;em Poker.
To improve my game, I am looking for a decent software to run on my handheld.
	Here are some possible candidates that I need to evalute:
	
	Multiplayer Championship Poker - Texas Hold&#8217;em
	Salexo&#8217;s No Limit Texas Hold &#8216;Em Poker
	Aces Texas Hold&#8217;em
	Aces Texas Hold&#8217;em - No Limit
	
	See also a list of [...]]]></description>
			<content:encoded><![CDATA[	<p>I have just been iniated to Texas Hold&#8217;em Poker.<br />
To improve my game, I am looking for a decent software to run on my handheld.</p>
	<p>Here are some possible candidates that I need to evalute:</p>
	<ul>
	<li><a href="http://www.palmgear.com/index.cfm?fuseaction=software.showsoftware&#038;PartnerREF=&#038;siteid=1&#038;catid=0&#038;area=software.developer&#038;searchtitle=Applications%20by%20Realdice%2Ecom&#038;searchterm=&#038;step=1&#038;orderby=downloadtotal&#038;direction=asc&#038;userid=1000843561&#038;prodid=94627">Multiplayer Championship Poker - Texas Hold&#8217;em</a></li>
	<li><a href="http://www.handango.com/PlatformProductDetail.jsp?siteId=1&#038;jid=8DX584DB7CAC52X936574911CD629CB3&#038;platformId=1&#038;N=96804&#038;productId=138264&#038;R=138264">Salexo&#8217;s No Limit Texas Hold &#8216;Em Poker</a></li>
	<li><a href="http://www.palmgear.com/index.cfm?fuseaction=software.showsoftware&#038;PartnerREF=&#038;siteid=1&#038;prodID=63908">Aces Texas Hold&#8217;em</a></li>
	<li><a href="http://software.palmone.com/PlatformProductDetail.jsp?siteId=1153&#038;platformId=1&#038;productType=2&#038;productId=125080&#038;review=1">Aces Texas Hold&#8217;em - No Limit</a></li>
	</ul>
	<p>See also a list of poker software <a href="http://www.pagat.com/vying/poker.html#software">here</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://sahuguet.blogsome.com/2005/09/18/poker-software/feed/</wfw:commentRss>
	</item>
	</channel>
</rss>
