<?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: Better Sampling</title>
	<atom:link href="http://www.rorydriscoll.com/2009/01/07/better-sampling/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rorydriscoll.com/2009/01/07/better-sampling/</link>
	<description></description>
	<lastBuildDate>Sat, 28 Jan 2012 01:33:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: rory</title>
		<link>http://www.rorydriscoll.com/2009/01/07/better-sampling/comment-page-1/#comment-733</link>
		<dc:creator>rory</dc:creator>
		<pubDate>Thu, 14 Jul 2011 16:02:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.rorydriscoll.com/?p=77#comment-733</guid>
		<description>Ok, ok! Thanks for the clear explanation. I changed the post.</description>
		<content:encoded><![CDATA[<p>Ok, ok! Thanks for the clear explanation. I changed the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anon (same as before - I finally got it ;))</title>
		<link>http://www.rorydriscoll.com/2009/01/07/better-sampling/comment-page-1/#comment-732</link>
		<dc:creator>Anon (same as before - I finally got it ;))</dc:creator>
		<pubDate>Thu, 14 Jul 2011 11:11:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.rorydriscoll.com/?p=77#comment-732</guid>
		<description>To make it a bit more explicit:

1 - x * x - y * y

1 - (r*cos(t))^2 - (r*sin(t))^2

1 - r^2*cos^2(t) - r^2*sin^2(t)

1 - r^2*(cos^2(t) + sin^2(t))    // Took out -r^2 as a factor

1 - (r^2*(1))      // Trig identities!

1 - r^2

1 - u1

Yay!</description>
		<content:encoded><![CDATA[<p>To make it a bit more explicit:</p>
<p>1 &#8211; x * x &#8211; y * y</p>
<p>1 &#8211; (r*cos(t))^2 &#8211; (r*sin(t))^2</p>
<p>1 &#8211; r^2*cos^2(t) &#8211; r^2*sin^2(t)</p>
<p>1 &#8211; r^2*(cos^2(t) + sin^2(t))    // Took out -r^2 as a factor</p>
<p>1 &#8211; (r^2*(1))      // Trig identities!</p>
<p>1 &#8211; r^2</p>
<p>1 &#8211; u1</p>
<p>Yay!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flemming</title>
		<link>http://www.rorydriscoll.com/2009/01/07/better-sampling/comment-page-1/#comment-646</link>
		<dc:creator>flemming</dc:creator>
		<pubDate>Tue, 26 Apr 2011 12:42:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.rorydriscoll.com/?p=77#comment-646</guid>
		<description>Agree with Boris and others. it should be 
return Vector3(x, y, Sqrt(1.0f – u1))
since 1-(r*cos(t))^2-(r*sin(t))^2 =&gt; 
1 - r^2 =&gt; 
1-u1</description>
		<content:encoded><![CDATA[<p>Agree with Boris and others. it should be<br />
return Vector3(x, y, Sqrt(1.0f – u1))<br />
since 1-(r*cos(t))^2-(r*sin(t))^2 =&gt;<br />
1 &#8211; r^2 =&gt;<br />
1-u1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anon</title>
		<link>http://www.rorydriscoll.com/2009/01/07/better-sampling/comment-page-1/#comment-629</link>
		<dc:creator>Anon</dc:creator>
		<pubDate>Sun, 17 Apr 2011 15:41:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.rorydriscoll.com/?p=77#comment-629</guid>
		<description>Hmm, maybe I&#039;m wrong... bah, I&#039;m too tired to work it out.</description>
		<content:encoded><![CDATA[<p>Hmm, maybe I&#8217;m wrong&#8230; bah, I&#8217;m too tired to work it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anon</title>
		<link>http://www.rorydriscoll.com/2009/01/07/better-sampling/comment-page-1/#comment-628</link>
		<dc:creator>Anon</dc:creator>
		<pubDate>Sun, 17 Apr 2011 13:25:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.rorydriscoll.com/?p=77#comment-628</guid>
		<description>ShinZo, I&#039;m pretty sure (x * x – y * y) is not u1, it&#039;s u1*cos(2*theta), or 2*x*x-u1 (which is just as costly as the original formula).</description>
		<content:encoded><![CDATA[<p>ShinZo, I&#8217;m pretty sure (x * x – y * y) is not u1, it&#8217;s u1*cos(2*theta), or 2*x*x-u1 (which is just as costly as the original formula).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cosine weighted hemisphere &#124; pathtracing</title>
		<link>http://www.rorydriscoll.com/2009/01/07/better-sampling/comment-page-1/#comment-503</link>
		<dc:creator>Cosine weighted hemisphere &#124; pathtracing</dc:creator>
		<pubDate>Thu, 03 Mar 2011 20:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.rorydriscoll.com/?p=77#comment-503</guid>
		<description>[...] same topic is discussed here: http://www.rorydriscoll.com/2009/01/07/better-sampling/   This entry was posted in Uncategorized. Bookmark the permalink.    &#8592; A simple [...]</description>
		<content:encoded><![CDATA[<p>[...] same topic is discussed here: <a href="http://www.rorydriscoll.com/2009/01/07/better-sampling/" rel="nofollow">http://www.rorydriscoll.com/2009/01/07/better-sampling/</a>   This entry was posted in Uncategorized. Bookmark the permalink.    &larr; A simple [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boris</title>
		<link>http://www.rorydriscoll.com/2009/01/07/better-sampling/comment-page-1/#comment-491</link>
		<dc:creator>Boris</dc:creator>
		<pubDate>Sun, 27 Feb 2011 05:59:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.rorydriscoll.com/?p=77#comment-491</guid>
		<description>to

return Vector3(x, y, Sqrt(1.0f – u1));

actualy</description>
		<content:encoded><![CDATA[<p>to</p>
<p>return Vector3(x, y, Sqrt(1.0f – u1));</p>
<p>actualy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ShinZo</title>
		<link>http://www.rorydriscoll.com/2009/01/07/better-sampling/comment-page-1/#comment-188</link>
		<dc:creator>ShinZo</dc:creator>
		<pubDate>Fri, 04 Jun 2010 22:50:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.rorydriscoll.com/?p=77#comment-188</guid>
		<description>You should change:

return Vector3(x, y, Sqrt(Max(0.0f, 1 - x * x - y * y)));

to

return Vector3(x, y, Sqrt(Max(0.0f, 1 - u1)));

because (x * x - y * y) = u1 in your example</description>
		<content:encoded><![CDATA[<p>You should change:</p>
<p>return Vector3(x, y, Sqrt(Max(0.0f, 1 &#8211; x * x &#8211; y * y)));</p>
<p>to</p>
<p>return Vector3(x, y, Sqrt(Max(0.0f, 1 &#8211; u1)));</p>
<p>because (x * x &#8211; y * y) = u1 in your example</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rory</title>
		<link>http://www.rorydriscoll.com/2009/01/07/better-sampling/comment-page-1/#comment-119</link>
		<dc:creator>rory</dc:creator>
		<pubDate>Thu, 11 Jun 2009 16:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.rorydriscoll.com/?p=77#comment-119</guid>
		<description>This function just generates the ray direction in tangent space. It assumes that you will rotate the direction into world space afterwards.

I just use the normal and tangent vectors from the mesh (generating the bitangent from the cross product) and generate a basis (3x3 matrix) which transforms the ray from tangent space into world space.</description>
		<content:encoded><![CDATA[<p>This function just generates the ray direction in tangent space. It assumes that you will rotate the direction into world space afterwards.</p>
<p>I just use the normal and tangent vectors from the mesh (generating the bitangent from the cross product) and generate a basis (3&#215;3 matrix) which transforms the ray from tangent space into world space.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Freeman</title>
		<link>http://www.rorydriscoll.com/2009/01/07/better-sampling/comment-page-1/#comment-118</link>
		<dc:creator>Freeman</dc:creator>
		<pubDate>Thu, 11 Jun 2009 08:03:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.rorydriscoll.com/?p=77#comment-118</guid>
		<description>Hi,

Nice article :)

I just have a question about the randomly generated point on the hemisphere.
In your code, you never use the normal to generate it. How do you know that the hemisphere is centered on the normal ?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Nice article <img src='http://www.rorydriscoll.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I just have a question about the randomly generated point on the hemisphere.<br />
In your code, you never use the normal to generate it. How do you know that the hemisphere is centered on the normal ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

