<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx</link><description>Not too long ago I blogged about a C# raytracer which took advantage of a lot of C#3.0 language constructs. However, you may have noticed that it did not actually use LINQ query expressions all that much. Well, after discussing this with a coworker on</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Techy News Blog &amp;raquo; Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#5234028</link><pubDate>Tue, 02 Oct 2007 05:49:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5234028</guid><dc:creator>Techy News Blog » Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.artofbam.com/wordpress/?p=4404"&gt;http://www.artofbam.com/wordpress/?p=4404&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Ein Raytracer in einem Programmausdruck</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#5239197</link><pubDate>Tue, 02 Oct 2007 10:21:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5239197</guid><dc:creator>TheUndeadable entwickelt</dc:creator><description>&lt;p&gt;LINQ als Renderer LINQ hat was...&lt;/p&gt;
</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#5248296</link><pubDate>Wed, 03 Oct 2007 01:11:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5248296</guid><dc:creator>dditweb</dc:creator><description>&lt;p&gt;HARD CORE. Very impressive!&lt;/p&gt;</description></item><item><title>Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#5248297</link><pubDate>Wed, 03 Oct 2007 01:11:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5248297</guid><dc:creator>DotNetKicks.com</dc:creator><description>&lt;p&gt;You've been kicked (a good thing) - Trackback from DotNetKicks.com&lt;/p&gt;
</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#5249889</link><pubDate>Wed, 03 Oct 2007 03:02:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5249889</guid><dc:creator>neuralocity</dc:creator><description>&lt;p&gt;Amazing. &amp;nbsp;This is an eyeopening experience for myself, very interesting. &amp;nbsp;Thanks!&lt;/p&gt;
</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#5249923</link><pubDate>Wed, 03 Oct 2007 03:03:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5249923</guid><dc:creator>neuralocity</dc:creator><description>&lt;p&gt;You should start a LINQ Cookbook site.&lt;/p&gt;
</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#5257345</link><pubDate>Wed, 03 Oct 2007 11:32:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5257345</guid><dc:creator>MatthieuMEZIL</dc:creator><description>&lt;p&gt;Great!&lt;/p&gt;</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#5266535</link><pubDate>Wed, 03 Oct 2007 21:55:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5266535</guid><dc:creator>MichaelGiagnocavo</dc:creator><description>&lt;p&gt;Would be cool if let was available in normal expressions and could also define subexpressions... I can't wait to see what C# 4 will enable.&lt;/p&gt;
</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#5276477</link><pubDate>Thu, 04 Oct 2007 20:38:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5276477</guid><dc:creator>rogerj</dc:creator><description>&lt;p&gt;Pingback from &lt;a rel="nofollow" target="_new" href="http://oakleafblog.blogspot.com/2007/10/linq-and-entity-framework-posts-for.html"&gt;http://oakleafblog.blogspot.com/2007/10/linq-and-entity-framework-posts-for.html&lt;/a&gt;&lt;/p&gt;</description></item><item><title>The Weekly Source Code 7</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#5407660</link><pubDate>Fri, 12 Oct 2007 01:44:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5407660</guid><dc:creator>Scott Hanselman's Computer Zen</dc:creator><description /></item><item><title>The Weekly Source Code 7</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#5409530</link><pubDate>Fri, 12 Oct 2007 02:51:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5409530</guid><dc:creator>ASPInsiders</dc:creator><description>&lt;p&gt;In my new ongoing quest to read source code to be a better developer , I now present the seventh in an&lt;/p&gt;
</description></item><item><title>Community Convergence XXXIII</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#5455826</link><pubDate>Mon, 15 Oct 2007 03:54:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5455826</guid><dc:creator>Charlie Calvert's Community Blog</dc:creator><description>&lt;p&gt;Welcome to the thirty-third edition of Community Convergence. This week we have a new video called Programming&lt;/p&gt;
</description></item><item><title>let = const var</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#5932633</link><pubDate>Tue, 06 Nov 2007 13:03:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5932633</guid><dc:creator>R.Tanaka.Ichiro's Blog</dc:creator><description>&lt;P&gt;let = const var&lt;/P&gt;</description></item><item><title>F#</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6232850</link><pubDate>Thu, 15 Nov 2007 02:57:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6232850</guid><dc:creator>LukeH's WebLog</dc:creator><description>&lt;p&gt;A few weeks back, Soma blogged about an increased investment by the Microsoft Developer Division in the&lt;/p&gt;</description></item><item><title>F#, brought to you by Luke!</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6262963</link><pubDate>Thu, 15 Nov 2007 17:34:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6262963</guid><dc:creator>Don Syme's WebLog on F# and Other Research Projects</dc:creator><description>&lt;p&gt;Luke Hoban is now full time as program manager on F#, and has just posted a short introduction about&lt;/p&gt;</description></item><item><title>F#, brought to you by Luke</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6262972</link><pubDate>Thu, 15 Nov 2007 17:35:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6262972</guid><dc:creator>Don Syme's WebLog on F# and Other Research Projects</dc:creator><description>&lt;p&gt;Luke Hoban is now full time as program manager on F#, and has just posted a short introduction about&lt;/p&gt;</description></item><item><title>F#, brought to you by Luke</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6263912</link><pubDate>Thu, 15 Nov 2007 18:06:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6263912</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;Luke Hoban is now full time as program manager on F#, and has just posted a short introduction about&lt;/p&gt;</description></item><item><title>Miguel de Icaza: RayTracing in one LINQ statement</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6310164</link><pubDate>Fri, 16 Nov 2007 21:15:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6310164</guid><dc:creator>工程師的雞排攤</dc:creator><description>&lt;p&gt;Through Don Syme&amp;amp;#39;s blog I read about Luke Hoban moving from the C# team at Microsoft to the F# team&lt;/p&gt;
</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6317981</link><pubDate>Sat, 17 Nov 2007 00:34:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6317981</guid><dc:creator>Bryan</dc:creator><description>&lt;p&gt;You are insane. &amp;nbsp;My hats off to you.&lt;/p&gt;</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6319128</link><pubDate>Sat, 17 Nov 2007 01:23:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6319128</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;Screenshot? :)&lt;/p&gt;</description></item><item><title>Ray Tracing en une requête LINQ</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6369561</link><pubDate>Sun, 18 Nov 2007 19:17:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6369561</guid><dc:creator>CoqBlog</dc:creator><description>&lt;p&gt;Je viens de tomber sur &amp;#231;a : Taking LINQ to Objects to Extremes: A fully LINQified RayTracer En clair&lt;/p&gt;
</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6431880</link><pubDate>Tue, 20 Nov 2007 16:01:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6431880</guid><dc:creator>LukeH</dc:creator><description>&lt;p&gt;Anonymous - &lt;/p&gt;
&lt;p&gt;There is a screenshot of the image produced by the raytracer on my previous blog post (linked to above). &amp;nbsp;Probably more fun though to try it out for yourself :-). &amp;nbsp;The attached code file can be compiled with the C#3.0 compiler at the command line or imported into a VS 2008 project.&lt;/p&gt;
</description></item><item><title>Chunk partitioning vs range partitioning in PLINQ</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6643652</link><pubDate>Mon, 03 Dec 2007 01:42:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6643652</guid><dc:creator>Parallel Programming with .NET</dc:creator><description>&lt;p&gt;If you look in the PLINQ samples in the December 2007 CTP , you'll see a parallel implementation of Luke&lt;/p&gt;
</description></item><item><title>Chunk partitioning vs range partitioning in PLINQ</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6643776</link><pubDate>Mon, 03 Dec 2007 02:15:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6643776</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;If you look in the PLINQ samples in the December 2007 CTP , you&amp;amp;#39;ll see a parallel implementation&lt;/p&gt;
</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6666019</link><pubDate>Wed, 05 Dec 2007 15:45:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6666019</guid><dc:creator>Dimchansky</dc:creator><description>&lt;p&gt;LINQRayTracer is slower, than first version of RayTracer. Why?&lt;/p&gt;</description></item><item><title>Use the power of let in your LINQ queries</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6668309</link><pubDate>Wed, 05 Dec 2007 19:59:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6668309</guid><dc:creator>Linq in Action News</dc:creator><description>&lt;p&gt;Often, when you try to find out how to write the correct LINQ query you need, you end up being confused&lt;/p&gt;
</description></item><item><title>Use the power of let in your LINQ queries</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6668372</link><pubDate>Wed, 05 Dec 2007 20:06:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6668372</guid><dc:creator>Fabrice's weblog</dc:creator><description>&lt;p&gt;Often, when you try to find out how to write the correct LINQ query you need, you end up being confused&lt;/p&gt;
</description></item><item><title>Parallelizing a query with multiple “from” clauses</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6696589</link><pubDate>Fri, 07 Dec 2007 23:02:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6696589</guid><dc:creator>Parallel Programming with .NET</dc:creator><description>&lt;p&gt;Consider a simplified version of the parallel implementation of Luke Hoban's LINQ ray tracer var Xs =&lt;/p&gt;
</description></item><item><title>Parallelizing a query with multiple “from” clauses</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6696756</link><pubDate>Fri, 07 Dec 2007 23:19:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6696756</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;Consider a simplified version of Luke Hoban&amp;amp;#39;s LINQ ray tracer var Xs = Enumerable .Range(1, screenWidth&lt;/p&gt;
</description></item><item><title>Функциональное программирование на C# 3.0 (часть 2)</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6706896</link><pubDate>Sat, 08 Dec 2007 22:04:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6706896</guid><dc:creator>Ivan</dc:creator><description>&lt;p&gt;Продолжение беседы про прикладную функциональщину. Попытка реализовать парсер п&lt;/p&gt;
</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6786007</link><pubDate>Mon, 17 Dec 2007 06:16:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6786007</guid><dc:creator>LukeH</dc:creator><description>&lt;p&gt;Dimchansky - Thanks for the comment on the performance difference between the query-based version and the original version. &amp;nbsp;As you point out, there is a fairly significant performance overhead for the version that uses one giant query. &amp;nbsp;I should have mentioned this as an additional reason to *not* recommend this extreme kind of code for a typical application.&lt;/p&gt;
&lt;p&gt;The culprit in terms of performance in this case is primarily the many &amp;quot;let&amp;quot; clauses. &amp;nbsp;These each incur a method call, a delegate invocation and an allocation of a &amp;quot;SelectIterator&amp;quot;. &amp;nbsp;Since many of these are run in tight loops which are hit close to millions of times during a typical run, the additional cost is magnified significantly.&lt;/p&gt;
</description></item><item><title>Community Convergence XXXVIII</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#6959402</link><pubDate>Thu, 03 Jan 2008 00:15:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6959402</guid><dc:creator>Charlie Calvert's Community Blog</dc:creator><description>&lt;p&gt;Welcome to the thirty-eighth Community Convergence. These posts are designed to keep you in touch with&lt;/p&gt;</description></item><item><title>Silly comments</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#7036990</link><pubDate>Wed, 09 Jan 2008 09:11:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7036990</guid><dc:creator>Anders</dc:creator><description>&lt;p&gt;Impressive! Regarding the comments on this article, one should really do something about the crap! But I guess you don't have the option to delete any of 'em, do you LukeH?&lt;/p&gt;</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#7825388</link><pubDate>Thu, 21 Feb 2008 02:25:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7825388</guid><dc:creator>SHArQ</dc:creator><description>&lt;p&gt;Uhh... Is that thingie what you call a BIG query?&lt;/p&gt;
&lt;p&gt;How about a 40KB-length, seven-level-nested one? :)&lt;/p&gt;</description></item><item><title>Video of Luke Hoban's In-Depth Look at C# 3.0</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#7855532</link><pubDate>Sat, 23 Feb 2008 10:40:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7855532</guid><dc:creator>Charlie Calvert's Community Blog</dc:creator><description>&lt;p&gt;Last fall in Barcelona, Spain two PM's from the C# team gave talks on key parts of the new technology&lt;/p&gt;
</description></item><item><title>Una query expression in Linq veramente lunga ed interessante</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#7904304</link><pubDate>Tue, 26 Feb 2008 17:06:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7904304</guid><dc:creator>Paolo Possanzini</dc:creator><description>&lt;p&gt;Vi riporto un link ad un post che potete trovare anche nei link della StartPage di VisualStudio. Sono&lt;/p&gt;
</description></item><item><title>很酷的let clause的应用</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#8397320</link><pubDate>Tue, 15 Apr 2008 14:22:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8397320</guid><dc:creator>works guo</dc:creator><description>&lt;p&gt;这里是LINQ to XML利用let暂时存放子节点的数据,再从查询let中的数据得到XML中子节点多个属性.&lt;/p&gt;
</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#8413380</link><pubDate>Mon, 21 Apr 2008 04:32:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8413380</guid><dc:creator>CoryDambach</dc:creator><description>&lt;p&gt;Do you have a version of the Ray Tracer distributed with the Parallel Extensions CTP where the code has more comments for people without 3D graphics experience? &amp;nbsp;The organization of the CTP version is superb(in comparison to the single file one), but without XML comments I found navigating it tiresome... &amp;nbsp;(I know teaching 3d programming was not the purpose of either, but I thought I'd ask.) &amp;nbsp;I've learned quite a bit from it already.&lt;/p&gt;
&lt;p&gt;Also, I haven't looked at the code for this one, but did you use Parallel Linq in it, the post didn't seem to imply it. &amp;nbsp;If not, why didn't you?&lt;/p&gt;
</description></item><item><title>LINQ doesn't have to be about databases...</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#8592785</link><pubDate>Thu, 12 Jun 2008 10:33:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8592785</guid><dc:creator>Yet Another Coding Blog</dc:creator><description>&lt;p&gt;I'm finally getting into the groove with LINQ and lambda expressions, and am over the initial skepticism&lt;/p&gt;
</description></item><item><title>LINQ, LINQ, say no more</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#8622379</link><pubDate>Thu, 19 Jun 2008 20:04:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8622379</guid><dc:creator>ctodx</dc:creator><description>&lt;p&gt;An interesting question that someone asked of me recently, indicating perhaps that the information from&lt;/p&gt;
</description></item><item><title>Slight speedup?</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#8840796</link><pubDate>Thu, 07 Aug 2008 12:55:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8840796</guid><dc:creator>Niall Connaughton</dc:creator><description>&lt;p&gt;Pretty cool, fun reading through it all :P&lt;/p&gt;
&lt;p&gt;I was just wondering about the performance issue raised. I haven't read the other version of the code so I don't know if this improvement would be just for this mega-LINQ version or not. But I was looking at the section of the query that works out if an object is in shadow from the light and I think the query could be tweaked a bit.&lt;/p&gt;
&lt;p&gt;Couldn't you put in a where clause to filter out objects which intersect the ray from the light but are beyond the originally intersected object? Then you could remove the order by and use FirstOrDefault(), saving on intersecting all other objects in the scene once you found a shadow casting object.&lt;/p&gt;
&lt;p&gt;I guess depending on how many objects you have and how much shadow you have this may have varying levels of improvement.&lt;/p&gt;</description></item><item><title>Функциональное программирование на C# 3.0 (часть 2)</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#8962128</link><pubDate>Tue, 23 Sep 2008 14:20:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8962128</guid><dc:creator>Write ahead blog</dc:creator><description>&lt;p&gt;Предыдущая серия: &lt;a rel="nofollow" target="_new" href="http://blogs.gotdotnet.ru/personal/bezzus/PermaLink.aspx?guid=2F2B4B66-809C-441B-BDE9-FA45D71445F3"&gt;http://blogs.gotdotnet.ru/personal/bezzus/PermaLink.aspx?guid=2F2B4B66-809C-441B-BDE9-FA45D71445F3&lt;/a&gt;...&lt;/p&gt;
</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#9022839</link><pubDate>Wed, 29 Oct 2008 22:13:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9022839</guid><dc:creator>Oliver Hallam</dc:creator><description>&lt;p&gt;I have ported this raytracer to XQuery! &amp;nbsp;All the code explained line by line so you can understand what is going on. &amp;nbsp;It runs with XQSharp.&lt;/p&gt;
&lt;p&gt;More information can be found here:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.xqsharp.com/xqsharp/samples/raytracer/index.htm"&gt;http://www.xqsharp.com/xqsharp/samples/raytracer/index.htm&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#9896933</link><pubDate>Fri, 18 Sep 2009 22:35:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9896933</guid><dc:creator>David Betz (MVP)</dc:creator><description>&lt;p&gt;Wow... this is the greatest piece of code written in a LONG time. &amp;nbsp;You need to get an award or something.&lt;/p&gt;</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#9929771</link><pubDate>Sun, 29 Nov 2009 06:30:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9929771</guid><dc:creator>Joshimac</dc:creator><description>&lt;p&gt;Hi , I am trying to implement the same RayTracer in VB.net.But it is unable to recognize isect variable.&lt;/p&gt;
&lt;p&gt;Can someone plz help.&lt;/p&gt;</description></item><item><title>re: Taking LINQ to Objects to Extremes: A fully LINQified RayTracer</title><link>http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx#9929785</link><pubDate>Sun, 29 Nov 2009 07:38:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9929785</guid><dc:creator>Joshimac</dc:creator><description>&lt;p&gt;Posting the VB.net Code:&lt;/p&gt;
&lt;p&gt;Dim pixelsQuery = From y In Enumerable.Range(0, screenHeight) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Let recenterY = -(y - (screenHeight / 2.0)) / (2.0 * screenHeight)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Select From x In Enumerable.Range(0, screenWidth) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Let recenterX = (x - (screenWidth / 2.0R)) / (2.0R * screenWidth) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Let point = Vector.Norm(Vector.Plus(scene.Camera.Forward, Vector.Plus(Vector.Times(recenterX, scene.Camera.Right), Vector.Times(recenterY, scene.Camera.Up)))) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let ray = New Ray() With {.Start = scene.Camera.Pos, .Dir = point} _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let computeTraceRay = DirectCast((Function(f) Function(traceRayArgs) (&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;From isect In _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;From thing In traceRayArgs.Scene.Things _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Select thing.Intersect(traceRayArgs.Ray) Where isect IsNot Nothing Order By isect.Dist&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let d = isect.Ray.Dir _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let pos = Vector.Plus(Vector.Times(isect.Dist, isect.Ray.Dir), isect.Ray.Start) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let normal = isect.Thing.Normal(pos) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let reflectDir = Vector.Minus(d, Vector.Times(2 * Vector.Dot(normal, d), normal)) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Let naturalColors = From light In traceRayArgs.Scene.Lights _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let ldis = Vector.Minus(light.Pos, pos) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let livec = Vector.Norm(ldis) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let testRay = New Ray() _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let testIsects = From inter In From thing In traceRayArgs.Scene.Things _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Select thing.Intersect(testRay) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Where inter IsNot Nothing _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Order By inter.Dist _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Select inter _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Let testIsect = testIsects.FirstOrDefault() _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Let neatIsect = If(testIsect Is Nothing, 0, testIsect.Dist) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let isInShadow = Not ((neatIsect &amp;gt; Vector.Mag(ldis)) OrElse (neatIsect = 0)) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Where Not isInShadow _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Let illum = Vector.Dot(livec, normal) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Let lcolor = If(illum &amp;gt; 0, Color.Times(illum, light.Color), Color.Make(0, 0, 0)) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let specular = Vector.Dot(livec, Vector.Norm(reflectDir)) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let scolor = If(specular &amp;gt; 0, Color.Times(Math.Pow(specular, isect.Thing.Surface.Roughness), light.Color), Color.Make(0, 0, 0)) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Select Color.Plus(Color.Times(isect.Thing.Surface.Diffuse(pos), lcolor), Color.Times(isect.Thing.Surface.Specular(pos), scolor)) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let reflectPos = Vector.Plus(pos, Vector.Times(0.001, reflectDir)) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Let reflectColor = If(traceRayArgs.Depth &amp;gt;= MaxDepth, Color.Make(0.5, 0.5, 0.5), Color.Times(isect.Thing.Surface.Reflect(reflectPos), f(New TraceRayArgs(New Ray(), traceRayArgs.Scene, traceRayArgs.Depth + 1)))) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Select naturalColors.Aggregate(reflectColor, Function(color__2, natColor) Color.Plus(color__2, natColor))).DefaultIfEmpty(Color.Background).First()), Func(Of Func(Of TraceRayArgs, Color), Func(Of TraceRayArgs, Color))) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Let traceRay = y(computeTraceRay) _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Select New With {.X = x, .Y = y(), .Color = traceRay(New TraceRayArgs(ray, scene, 0))}&lt;/p&gt;</description></item></channel></rss>