<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Squaring The Thumbsticks</title>
	<atom:link href="http://theinstructionlimit.com/?feed=rss2&#038;p=531" rel="self" type="application/rss+xml" />
	<link>http://theinstructionlimit.com/?p=531</link>
	<description>Truevision3D 6.5, XNA, C# and HLSL tips &#38; samples by Zaknafein/Renaud Bédard.</description>
	<lastBuildDate>Thu, 02 Sep 2010 18:01:19 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Jack</title>
		<link>http://theinstructionlimit.com/?p=531&#038;cpage=1#comment-274</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Fri, 13 Nov 2009 02:56:09 +0000</pubDate>
		<guid isPermaLink="false">http://theinstructionlimit.com/?p=531#comment-274</guid>
		<description>Congratulation Renaud!:)</description>
		<content:encoded><![CDATA[<p>Congratulation Renaud!:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raigan</title>
		<link>http://theinstructionlimit.com/?p=531&#038;cpage=1#comment-265</link>
		<dc:creator>raigan</dc:creator>
		<pubDate>Wed, 04 Nov 2009 21:19:42 +0000</pubDate>
		<guid isPermaLink="false">http://theinstructionlimit.com/?p=531#comment-265</guid>
		<description>Yeah, actually I don&#039;t think what I was thinking of could work, I just tried to write it out and it would still produce circular patterns :(

Nice that you found a solution though!</description>
		<content:encoded><![CDATA[<p>Yeah, actually I don&#8217;t think what I was thinking of could work, I just tried to write it out and it would still produce circular patterns <img src='http://theinstructionlimit.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Nice that you found a solution though!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renaud Bédard</title>
		<link>http://theinstructionlimit.com/?p=531&#038;cpage=1#comment-264</link>
		<dc:creator>Renaud Bédard</dc:creator>
		<pubDate>Wed, 04 Nov 2009 17:42:59 +0000</pubDate>
		<guid isPermaLink="false">http://theinstructionlimit.com/?p=531#comment-264</guid>
		<description>I&#039;m still not sure what you meant, because... the input values are inside a circle, I have to scale them by something to get the square values. And interpolation is still an approximation, based on what I tried. (unless you mean some other kind of interpolation)

But anyway, I figured out what I think is a perfect and flexible solution, see the update notes!</description>
		<content:encoded><![CDATA[<p>I&#8217;m still not sure what you meant, because&#8230; the input values are inside a circle, I have to scale them by something to get the square values. And interpolation is still an approximation, based on what I tried. (unless you mean some other kind of interpolation)</p>
<p>But anyway, I figured out what I think is a perfect and flexible solution, see the update notes!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raigan</title>
		<link>http://theinstructionlimit.com/?p=531&#038;cpage=1#comment-262</link>
		<dc:creator>raigan</dc:creator>
		<pubDate>Sun, 01 Nov 2009 22:22:08 +0000</pubDate>
		<guid isPermaLink="false">http://theinstructionlimit.com/?p=531#comment-262</guid>
		<description>..basically since you have a perfect square, it should be possible to produce and output that&#039;s a perfect square gradient, instead of that clipped-circular gradient that&#039;s currently being produced.

One way to do that would be to bilinearly interpolate between (1,1),(1,-1),(-1,-1),(-1,1) (i.e the four corners of the square) based on the current input position within the square.

I hope this makes sense!</description>
		<content:encoded><![CDATA[<p>..basically since you have a perfect square, it should be possible to produce and output that&#8217;s a perfect square gradient, instead of that clipped-circular gradient that&#8217;s currently being produced.</p>
<p>One way to do that would be to bilinearly interpolate between (1,1),(1,-1),(-1,-1),(-1,1) (i.e the four corners of the square) based on the current input position within the square.</p>
<p>I hope this makes sense!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raigan</title>
		<link>http://theinstructionlimit.com/?p=531&#038;cpage=1#comment-260</link>
		<dc:creator>raigan</dc:creator>
		<pubDate>Sun, 01 Nov 2009 14:08:28 +0000</pubDate>
		<guid isPermaLink="false">http://theinstructionlimit.com/?p=531#comment-260</guid>
		<description>Hmm.. I may have misunderstood the goal of this exercise :)

Can I modify my suggestion? Once you clamp the input to within the inscribed square, you&#039;d then want to interpret the input in the context of the square. I don&#039;t really know what that last part means, I guess it would just be calculating the distance from the input position to the square&#039;s edges -- it should be just like bilinear interpolation.</description>
		<content:encoded><![CDATA[<p>Hmm.. I may have misunderstood the goal of this exercise <img src='http://theinstructionlimit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Can I modify my suggestion? Once you clamp the input to within the inscribed square, you&#8217;d then want to interpret the input in the context of the square. I don&#8217;t really know what that last part means, I guess it would just be calculating the distance from the input position to the square&#8217;s edges &#8212; it should be just like bilinear interpolation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raigan</title>
		<link>http://theinstructionlimit.com/?p=531&#038;cpage=1#comment-256</link>
		<dc:creator>raigan</dc:creator>
		<pubDate>Tue, 27 Oct 2009 01:49:22 +0000</pubDate>
		<guid isPermaLink="false">http://theinstructionlimit.com/?p=531#comment-256</guid>
		<description>Yeah, that sort of thing really bugs me.. stupid XNA :)</description>
		<content:encoded><![CDATA[<p>Yeah, that sort of thing really bugs me.. stupid XNA <img src='http://theinstructionlimit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renaud Bédard</title>
		<link>http://theinstructionlimit.com/?p=531&#038;cpage=1#comment-255</link>
		<dc:creator>Renaud Bédard</dc:creator>
		<pubDate>Mon, 26 Oct 2009 17:12:43 +0000</pubDate>
		<guid isPermaLink="false">http://theinstructionlimit.com/?p=531#comment-255</guid>
		<description>Hehe, MathHelper isn&#039;t my class, it&#039;s part of the XNA framework. I actually have a MathHelperEx.Sqrt2 in my own libraries, but one may choose to just use a local const field or whatever.</description>
		<content:encoded><![CDATA[<p>Hehe, MathHelper isn&#8217;t my class, it&#8217;s part of the XNA framework. I actually have a MathHelperEx.Sqrt2 in my own libraries, but one may choose to just use a local const field or whatever.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raigan</title>
		<link>http://theinstructionlimit.com/?p=531&#038;cpage=1#comment-254</link>
		<dc:creator>raigan</dc:creator>
		<pubDate>Mon, 26 Oct 2009 17:06:05 +0000</pubDate>
		<guid isPermaLink="false">http://theinstructionlimit.com/?p=531#comment-254</guid>
		<description>N+ XBLA uses an even simpler method -- no analog control, the thumbsticks are just thresholded to 0 or 1.

One thing is bugging me about the code: you have MathHelper.PiOver2 but no MathHelper.SqrtOf2 :p</description>
		<content:encoded><![CDATA[<p>N+ XBLA uses an even simpler method &#8212; no analog control, the thumbsticks are just thresholded to 0 or 1.</p>
<p>One thing is bugging me about the code: you have MathHelper.PiOver2 but no MathHelper.SqrtOf2 :p</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renaud Bédard</title>
		<link>http://theinstructionlimit.com/?p=531&#038;cpage=1#comment-251</link>
		<dc:creator>Renaud Bédard</dc:creator>
		<pubDate>Mon, 26 Oct 2009 02:26:46 +0000</pubDate>
		<guid isPermaLink="false">http://theinstructionlimit.com/?p=531#comment-251</guid>
		<description>That&#039;s just boring ;)
But it&#039;s probably fine for thumbsticks, yup. Good to know.</description>
		<content:encoded><![CDATA[<p>That&#8217;s just boring <img src='http://theinstructionlimit.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
But it&#8217;s probably fine for thumbsticks, yup. Good to know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raigan</title>
		<link>http://theinstructionlimit.com/?p=531&#038;cpage=1#comment-250</link>
		<dc:creator>raigan</dc:creator>
		<pubDate>Sun, 25 Oct 2009 23:17:29 +0000</pubDate>
		<guid isPermaLink="false">http://theinstructionlimit.com/?p=531#comment-250</guid>
		<description>Or there&#039;s the lazy solution: inscribe a square in the circle, anything outside of the square gets clamped to the surface of the square (i.e to max value). Good enough :)</description>
		<content:encoded><![CDATA[<p>Or there&#8217;s the lazy solution: inscribe a square in the circle, anything outside of the square gets clamped to the surface of the square (i.e to max value). Good enough <img src='http://theinstructionlimit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
