<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Vince Hradil&#039;s Blog</title>
	<atom:link href="http://vincehradil.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://vincehradil.wordpress.com</link>
	<description></description>
	<lastBuildDate>Mon, 25 Oct 2010 17:45:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='vincehradil.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Vince Hradil&#039;s Blog</title>
		<link>http://vincehradil.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://vincehradil.wordpress.com/osd.xml" title="Vince Hradil&#039;s Blog" />
	<atom:link rel='hub' href='http://vincehradil.wordpress.com/?pushpress=hub'/>
		<item>
		<title>3D Affine Transform in IDL</title>
		<link>http://vincehradil.wordpress.com/2008/12/11/3d-affine-transform-in-idl/</link>
		<comments>http://vincehradil.wordpress.com/2008/12/11/3d-affine-transform-in-idl/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 21:03:48 +0000</pubDate>
		<dc:creator>vincehradil</dc:creator>
				<category><![CDATA[IDL]]></category>

		<guid isPermaLink="false">http://vincehradil.wordpress.com/?p=66</guid>
		<description><![CDATA[Rotating the data in IDL - not just the view. <a href="http://vincehradil.wordpress.com/2008/12/11/3d-affine-transform-in-idl/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vincehradil.wordpress.com&amp;blog=5208779&amp;post=66&amp;subd=vincehradil&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Okay &#8211; so you can use !P.T3D in IDL to visualize rotations of a 3D scene, but what if you want to actually rotate the data?  I think I got it worked out.</p>
<h3>First, make an array of vertices for your data array (say nx × ny × nz):</h3>
<pre><strong>nverts = nx*ny*nz
</strong>
<strong>lverts = lindgen(nverts)</strong></pre>
<h3>Then re-arrange these vertices so that they are xi, yi, zi for all i-elements in your data array:</h3>
<pre><strong>verts = transpose( [ [lverts mod nx], [lverts/nx mod ny], [lverts/nx/ny] ] )</strong></pre>
<h3>Next, use MATRIX_MULTIPLY to get the transformed vertices:</h3>
<pre><strong>verts = ( matrix_multiply(tmat,[float(temporary(verts)), replicate(1.0, 1L, nverts)],/atranspose) )[0:2,*]</strong></pre>
<h3>Now, interpolate the data to the new vertices:</h3>
<pre><strong>newarray = interpolate(float(array),verts[0,*],verts[1,*],verts[2,*])</strong></pre>
<h3>And, finally, reform the newarray as nx × ny × nz:</h3>
<pre><strong>newarray = reform(newarray,nx,ny,nz,/overwrite)</strong></pre>
<p>That does it.  I&#8217;ve written it as a function <a title="here" href="http://vincehradil.wordpress.com/affine_transformpro" target="_self">here</a>, with an optional <em>origin</em> keyword.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vincehradil.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vincehradil.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vincehradil.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vincehradil.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vincehradil.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vincehradil.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vincehradil.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vincehradil.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vincehradil.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vincehradil.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vincehradil.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vincehradil.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vincehradil.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vincehradil.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vincehradil.wordpress.com&amp;blog=5208779&amp;post=66&amp;subd=vincehradil&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vincehradil.wordpress.com/2008/12/11/3d-affine-transform-in-idl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b770adb0dd0bdf985580d3938aae3e4f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vince</media:title>
		</media:content>
	</item>
		<item>
		<title>GPULib on my 64-bit WinXP machine</title>
		<link>http://vincehradil.wordpress.com/2008/10/23/gpulib-on-my-64-bit-winxp-machine/</link>
		<comments>http://vincehradil.wordpress.com/2008/10/23/gpulib-on-my-64-bit-winxp-machine/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 16:04:28 +0000</pubDate>
		<dc:creator>vincehradil</dc:creator>
				<category><![CDATA[GPULib]]></category>
		<category><![CDATA[IDL]]></category>

		<guid isPermaLink="false">http://vincehradil.wordpress.com/?p=61</guid>
		<description><![CDATA[I got the GPULib to run on my 64-bit Windows XP machine with the new NVidia Quadro FX 5600 graphics card (1.5Gb frame buffer).  Many thanks to Peter Messmer at Tech-X for his help getting the correct executable. The results &#8230; <a href="http://vincehradil.wordpress.com/2008/10/23/gpulib-on-my-64-bit-winxp-machine/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vincehradil.wordpress.com&amp;blog=5208779&amp;post=61&amp;subd=vincehradil&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I got the <a href="http://www.txcorp.com/technologies/GPULib/">GPULib</a> to run on my 64-bit Windows XP machine with the new <a href="http://www.nvidia.com/object/quadro_fx_5600_4600.html">NVidia Quadro FX 5600</a> graphics card (1.5Gb frame buffer).  Many thanks to Peter Messmer at Tech-X for his help getting the correct executable.</p>
<p>The results are impressive.  I ran all the &#8220;demos&#8221; and the difference is about 21-24 X!  I can&#8217;t wait to try to do some &#8220;real&#8221; work using this.</p>
<p>The CPU on this machine is a Dual Quad-core Intel Xeon (X5482 @ 3.2GHz), and it has 64Gb RAM, so it&#8217;s not too shabby itself ;^)</p>
<p>Here&#8217;s the log from running &#8220;bench.pro&#8221;:</p>
<p>IDL&gt; dlm_load, &#8216;gpulib&#8217;<br />
% Loaded DLM: GPULIB.<br />
0.756607     0.756607      1.19352     0.206724    0.0188206     0.756607<br />
0.756607     0.756607      1.19352     0.206724    0.0188206     0.756607<br />
N iter   =       50<br />
CPU Time =       0.64100003<br />
GPU Time =      0.031000137<br />
Speedup  =        20.677329<br />
IDL&gt; print, !version<br />
{ x86_64 Win32 Windows Microsoft Windows 7.0 Oct 25 2007      64      64}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vincehradil.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vincehradil.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vincehradil.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vincehradil.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vincehradil.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vincehradil.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vincehradil.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vincehradil.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vincehradil.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vincehradil.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vincehradil.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vincehradil.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vincehradil.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vincehradil.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vincehradil.wordpress.com&amp;blog=5208779&amp;post=61&amp;subd=vincehradil&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vincehradil.wordpress.com/2008/10/23/gpulib-on-my-64-bit-winxp-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b770adb0dd0bdf985580d3938aae3e4f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vince</media:title>
		</media:content>
	</item>
	</channel>
</rss>
