<?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/"
	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>Comments for The Samovar</title>
	<atom:link href="http://thesamovar.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://thesamovar.wordpress.com</link>
	<description>A cup of tea and a political rant</description>
	<lastBuildDate>Sun, 24 Mar 2013 15:11:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on Fast fractals with Python and numpy by Dan &#124; thesamovar</title>
		<link>http://thesamovar.wordpress.com/2009/03/22/fast-fractals-with-python-and-numpy/#comment-14188</link>
		<dc:creator><![CDATA[Dan &#124; thesamovar]]></dc:creator>
		<pubDate>Sun, 24 Mar 2013 15:11:47 +0000</pubDate>
		<guid isPermaLink="false">http://thesamovar.wordpress.com/?p=409#comment-14188</guid>
		<description><![CDATA[Cool - do let me know when it&#039;s done! :)]]></description>
		<content:encoded><![CDATA[<p>Cool &#8211; do let me know when it&#8217;s done! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fast fractals with Python and numpy by Thomas M. Stambaugh</title>
		<link>http://thesamovar.wordpress.com/2009/03/22/fast-fractals-with-python-and-numpy/#comment-14187</link>
		<dc:creator><![CDATA[Thomas M. Stambaugh]]></dc:creator>
		<pubDate>Sat, 23 Mar 2013 17:43:54 +0000</pubDate>
		<guid isPermaLink="false">http://thesamovar.wordpress.com/?p=409#comment-14187</guid>
		<description><![CDATA[Great news! It turns out there are no floating point problems *at all* (at least that I can see), so long as I render the image one tile at a time. This is great, because it is precisely what I hoped for. I did some tiles at zoom level 19, and found some gorgeous detail just as I had hoped. I also found and solved the memory problem, it turned out to be just my misunderstanding of what &quot;imshow&quot; actually does.

I have to do some mainline work on the rest of my stuff that will actually help this along. When I get the demo updated, I&#039;ll ping you (the same link I posted above will work, just with more detail).]]></description>
		<content:encoded><![CDATA[<p>Great news! It turns out there are no floating point problems *at all* (at least that I can see), so long as I render the image one tile at a time. This is great, because it is precisely what I hoped for. I did some tiles at zoom level 19, and found some gorgeous detail just as I had hoped. I also found and solved the memory problem, it turned out to be just my misunderstanding of what &#8220;imshow&#8221; actually does.</p>
<p>I have to do some mainline work on the rest of my stuff that will actually help this along. When I get the demo updated, I&#8217;ll ping you (the same link I posted above will work, just with more detail).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fast fractals with Python and numpy by Dan &#124; thesamovar</title>
		<link>http://thesamovar.wordpress.com/2009/03/22/fast-fractals-with-python-and-numpy/#comment-14184</link>
		<dc:creator><![CDATA[Dan &#124; thesamovar]]></dc:creator>
		<pubDate>Mon, 11 Mar 2013 18:35:51 +0000</pubDate>
		<guid isPermaLink="false">http://thesamovar.wordpress.com/?p=409#comment-14184</guid>
		<description><![CDATA[I would guess even 32 bit floats would be enough for map coordinates (but on the edge), but 64 bit floats would certainly be plenty! For Mandelbrot though, once you start zooming in you&#039;ll reach that boundary pretty quickly. Unfortunately, it will get horribly slow once you start zooming in that much (you&#039;ll also need to increase your number of iterations very high too).]]></description>
		<content:encoded><![CDATA[<p>I would guess even 32 bit floats would be enough for map coordinates (but on the edge), but 64 bit floats would certainly be plenty! For Mandelbrot though, once you start zooming in you&#8217;ll reach that boundary pretty quickly. Unfortunately, it will get horribly slow once you start zooming in that much (you&#8217;ll also need to increase your number of iterations very high too).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fast fractals with Python and numpy by Thomas M. Stambaugh</title>
		<link>http://thesamovar.wordpress.com/2009/03/22/fast-fractals-with-python-and-numpy/#comment-14183</link>
		<dc:creator><![CDATA[Thomas M. Stambaugh]]></dc:creator>
		<pubDate>Mon, 11 Mar 2013 18:16:28 +0000</pubDate>
		<guid isPermaLink="false">http://thesamovar.wordpress.com/?p=409#comment-14183</guid>
		<description><![CDATA[Ah, the floating point question really gets my attention. I&#039;m going to have the same issue in my mainline activity (which is all about the Google Map V3 functionality) because V3 expresses world coordinates as floats between 0 and 256. I&#039;ve been worried about the implications of that, and your comment makes me more so.

It looks like I&#039;m going to have to understand the Decimal package anyway, I guess maybe I&#039;ll go back to more conventional approaches to rendering the mandelbrot tiles.]]></description>
		<content:encoded><![CDATA[<p>Ah, the floating point question really gets my attention. I&#8217;m going to have the same issue in my mainline activity (which is all about the Google Map V3 functionality) because V3 expresses world coordinates as floats between 0 and 256. I&#8217;ve been worried about the implications of that, and your comment makes me more so.</p>
<p>It looks like I&#8217;m going to have to understand the Decimal package anyway, I guess maybe I&#8217;ll go back to more conventional approaches to rendering the mandelbrot tiles.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fast fractals with Python and numpy by Dan &#124; thesamovar</title>
		<link>http://thesamovar.wordpress.com/2009/03/22/fast-fractals-with-python-and-numpy/#comment-14182</link>
		<dc:creator><![CDATA[Dan &#124; thesamovar]]></dc:creator>
		<pubDate>Mon, 11 Mar 2013 16:33:43 +0000</pubDate>
		<guid isPermaLink="false">http://thesamovar.wordpress.com/?p=409#comment-14182</guid>
		<description><![CDATA[Hi Tom, yes that vmin/vmax thing will work, but I still think the colour map will get less interesting the more you zoom in. Another issue is that you will probably reach the limit of floating point arithmetic quite quickly as you start zooming in. Numpy does have support for higher precision with dtype=float128, but that will only get you so much further. At some point you&#039;ll need arbitrary precision arithmetic and that&#039;ll mean not using numpy.]]></description>
		<content:encoded><![CDATA[<p>Hi Tom, yes that vmin/vmax thing will work, but I still think the colour map will get less interesting the more you zoom in. Another issue is that you will probably reach the limit of floating point arithmetic quite quickly as you start zooming in. Numpy does have support for higher precision with dtype=float128, but that will only get you so much further. At some point you&#8217;ll need arbitrary precision arithmetic and that&#8217;ll mean not using numpy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fast fractals with Python and numpy by Thomas M. Stambaugh</title>
		<link>http://thesamovar.wordpress.com/2009/03/22/fast-fractals-with-python-and-numpy/#comment-14181</link>
		<dc:creator><![CDATA[Thomas M. Stambaugh]]></dc:creator>
		<pubDate>Mon, 11 Mar 2013 15:37:09 +0000</pubDate>
		<guid isPermaLink="false">http://thesamovar.wordpress.com/?p=409#comment-14181</guid>
		<description><![CDATA[I solved one problem and uncovered another. It turns out that there&#039;s a totally easy way to fix the original rendering issue (thank you, stackoverflow.com!). Simply call imshow with &quot;0&quot; and &quot;itermax&quot; as the &quot;vmin&quot; and &quot;max&quot; arguments:

imshow(I.T, origin=&#039;lower left&#039;, vmin=0, vmax=100)

Problem solved!

Sadly, however, it reveals another problem that I&#039;m still chasing -- a memory leak in imshow. It&#039;s memory consumption grows without bounds until crashing my 32-bit Python by using 2G of memory. I&#039;ll see if I can get around that, perhaps by just calling PIL directly.

I&#039;ll update the abaxoscope link once I get it running properly. Although five zoom levels are fun, I *really* want to demonstrate the full effect of arbitrary zoom.]]></description>
		<content:encoded><![CDATA[<p>I solved one problem and uncovered another. It turns out that there&#8217;s a totally easy way to fix the original rendering issue (thank you, stackoverflow.com!). Simply call imshow with &#8220;0&#8243; and &#8220;itermax&#8221; as the &#8220;vmin&#8221; and &#8220;max&#8221; arguments:</p>
<p>imshow(I.T, origin=&#8217;lower left&#8217;, vmin=0, vmax=100)</p>
<p>Problem solved!</p>
<p>Sadly, however, it reveals another problem that I&#8217;m still chasing &#8212; a memory leak in imshow. It&#8217;s memory consumption grows without bounds until crashing my 32-bit Python by using 2G of memory. I&#8217;ll see if I can get around that, perhaps by just calling PIL directly.</p>
<p>I&#8217;ll update the abaxoscope link once I get it running properly. Although five zoom levels are fun, I *really* want to demonstrate the full effect of arbitrary zoom.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fast fractals with Python and numpy by Thomas M. Stambaugh</title>
		<link>http://thesamovar.wordpress.com/2009/03/22/fast-fractals-with-python-and-numpy/#comment-14180</link>
		<dc:creator><![CDATA[Thomas M. Stambaugh]]></dc:creator>
		<pubDate>Tue, 05 Mar 2013 15:25:16 +0000</pubDate>
		<guid isPermaLink="false">http://thesamovar.wordpress.com/?p=409#comment-14180</guid>
		<description><![CDATA[Ah, I&#039;m glad it wasn&#039;t just some stupid error on my part.

My &quot;abaxoscope&quot; (a device for viewing things that only exist as a result of computation, of which Mandelbrot sets are an example) must remain a sideline while make its underlying platform viable. That means I&#039;ll have to restrict myself to working on it on occasional weekends.

Your approach sounds perfectly reasonable, and has the added benefit that it will force me to actually wrap my head around numpy and mapplotlib -- things I really MUST do.

Of course, if you know more than 17 people who might be interested in paying real money for such magic, I&#039;m all ears :).]]></description>
		<content:encoded><![CDATA[<p>Ah, I&#8217;m glad it wasn&#8217;t just some stupid error on my part.</p>
<p>My &#8220;abaxoscope&#8221; (a device for viewing things that only exist as a result of computation, of which Mandelbrot sets are an example) must remain a sideline while make its underlying platform viable. That means I&#8217;ll have to restrict myself to working on it on occasional weekends.</p>
<p>Your approach sounds perfectly reasonable, and has the added benefit that it will force me to actually wrap my head around numpy and mapplotlib &#8212; things I really MUST do.</p>
<p>Of course, if you know more than 17 people who might be interested in paying real money for such magic, I&#8217;m all ears <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fast fractals with Python and numpy by Dan &#124; thesamovar</title>
		<link>http://thesamovar.wordpress.com/2009/03/22/fast-fractals-with-python-and-numpy/#comment-14179</link>
		<dc:creator><![CDATA[Dan &#124; thesamovar]]></dc:creator>
		<pubDate>Tue, 05 Mar 2013 09:42:07 +0000</pubDate>
		<guid isPermaLink="false">http://thesamovar.wordpress.com/?p=409#comment-14179</guid>
		<description><![CDATA[Hi Thomas, interesting page - it&#039;s generated using my Python code but some sort of clever zooming HTML thing? Nice!

The problem is that you are rendering rectangular blocks separately and the colouring algorithm isn&#039;t designed for this. The way it colours is to use the hot-cold (jet) colour map from the lowest to highest stored iteration number. This means you always get a nice scaling on any given image, but they are not comparable on zooms or across tiles. To get that effect, you&#039;d want to use a cyclic colour map. This is something that can be done in numpy. Just choose a number of iterations as the cycle (say 100), take x=(i%100)/100 and then the colour would be cmap(x) for cmap a cyclic colour map. Pick one from http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps (e.g. hsv will do the trick). Now when you call imshow add the keywords cmap=cmap, vmin=0, vmax=1.

Unfortunately this won&#039;t work with my stupid trick to make the interior coloured differently, so you&#039;ll have to handle that separately. I don&#039;t have time to write the code now, but you can apply a matplotlib cmap to a 2D array and get back a 3D array where the last dimension has size 4 and gives the RGBA components, and this can be passed to imshow. So, first create an array of the right shape initialised to black (zeros), then set the points which are not in the interior to have the colours output by applying cmap. Hope that makes sense, sorry I don&#039;t have more time to write it out fully.

Do post results and code here if you do it, would love to see the result.]]></description>
		<content:encoded><![CDATA[<p>Hi Thomas, interesting page &#8211; it&#8217;s generated using my Python code but some sort of clever zooming HTML thing? Nice!</p>
<p>The problem is that you are rendering rectangular blocks separately and the colouring algorithm isn&#8217;t designed for this. The way it colours is to use the hot-cold (jet) colour map from the lowest to highest stored iteration number. This means you always get a nice scaling on any given image, but they are not comparable on zooms or across tiles. To get that effect, you&#8217;d want to use a cyclic colour map. This is something that can be done in numpy. Just choose a number of iterations as the cycle (say 100), take x=(i%100)/100 and then the colour would be cmap(x) for cmap a cyclic colour map. Pick one from <a href="http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps" rel="nofollow">http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps</a> (e.g. hsv will do the trick). Now when you call imshow add the keywords cmap=cmap, vmin=0, vmax=1.</p>
<p>Unfortunately this won&#8217;t work with my stupid trick to make the interior coloured differently, so you&#8217;ll have to handle that separately. I don&#8217;t have time to write the code now, but you can apply a matplotlib cmap to a 2D array and get back a 3D array where the last dimension has size 4 and gives the RGBA components, and this can be passed to imshow. So, first create an array of the right shape initialised to black (zeros), then set the points which are not in the interior to have the colours output by applying cmap. Hope that makes sense, sorry I don&#8217;t have more time to write it out fully.</p>
<p>Do post results and code here if you do it, would love to see the result.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fast fractals with Python and numpy by Thomas M. Stambaugh</title>
		<link>http://thesamovar.wordpress.com/2009/03/22/fast-fractals-with-python-and-numpy/#comment-14178</link>
		<dc:creator><![CDATA[Thomas M. Stambaugh]]></dc:creator>
		<pubDate>Mon, 04 Mar 2013 15:56:46 +0000</pubDate>
		<guid isPermaLink="false">http://thesamovar.wordpress.com/?p=409#comment-14178</guid>
		<description><![CDATA[Hi Dan -- Great stuff! I know Python, and I don&#039;t know numpy/pylab, so please forgive me if this is really stupid. It appears to me that the coloring algorithm you use here produces unexpected artifacts when applied to subregions. These are easier to see in context (see http://anvil.zeetix.net/abaxoscope.html, zoom in at least 2 clicks).

Boundaries that are subtle when the entire set is rendered are colored incorrectly when a portion is rendered. I used an image size of 256x256 in rendering the above, and here is an example parameter set that demonstrates the problem (this is for the top left tile at zoom level 2):

n, m = 256
itermax = 100 
xmin = -2.0
xmax = -1.375
ymin = -1.25
ymax = -0.625

I created these images using Python 2.7.2 and numpy 1.7.0 on a Windows 7-Pro system.

I wonder if you could perhaps write more about the algorithm for actually coloring each point in the image? I *think* the relevant line is &quot;img[ix[rem], iy[rem]] = i+1&quot;. Since I&#039;m a numpy newbie, I&#039;m hazy about what this is doing. A coloring scheme used by a different approach (that, sadly, is not nearly as beautiful!) that avoids these artifacts is to calculate the RGB values separately:
r = i % 4 * 64
g = i % 8 * 32
b = i % 16 * 16
color = b * 65536 + g * 256 + r

Perhaps there&#039;s a way to preserve your coloring scheme while avoiding the anomalies in certain (but not all!) of the tiles?

In any case, your example is totally awesome. I&#039;d love to get this coloring issue solved, then I can *really* have fun with it.]]></description>
		<content:encoded><![CDATA[<p>Hi Dan &#8212; Great stuff! I know Python, and I don&#8217;t know numpy/pylab, so please forgive me if this is really stupid. It appears to me that the coloring algorithm you use here produces unexpected artifacts when applied to subregions. These are easier to see in context (see <a href="http://anvil.zeetix.net/abaxoscope.html" rel="nofollow">http://anvil.zeetix.net/abaxoscope.html</a>, zoom in at least 2 clicks).</p>
<p>Boundaries that are subtle when the entire set is rendered are colored incorrectly when a portion is rendered. I used an image size of 256&#215;256 in rendering the above, and here is an example parameter set that demonstrates the problem (this is for the top left tile at zoom level 2):</p>
<p>n, m = 256<br />
itermax = 100<br />
xmin = -2.0<br />
xmax = -1.375<br />
ymin = -1.25<br />
ymax = -0.625</p>
<p>I created these images using Python 2.7.2 and numpy 1.7.0 on a Windows 7-Pro system.</p>
<p>I wonder if you could perhaps write more about the algorithm for actually coloring each point in the image? I *think* the relevant line is &#8220;img[ix[rem], iy[rem]] = i+1&#8243;. Since I&#8217;m a numpy newbie, I&#8217;m hazy about what this is doing. A coloring scheme used by a different approach (that, sadly, is not nearly as beautiful!) that avoids these artifacts is to calculate the RGB values separately:<br />
r = i % 4 * 64<br />
g = i % 8 * 32<br />
b = i % 16 * 16<br />
color = b * 65536 + g * 256 + r</p>
<p>Perhaps there&#8217;s a way to preserve your coloring scheme while avoiding the anomalies in certain (but not all!) of the tiles?</p>
<p>In any case, your example is totally awesome. I&#8217;d love to get this coloring issue solved, then I can *really* have fun with it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fast fractals with Python and numpy by redlac1</title>
		<link>http://thesamovar.wordpress.com/2009/03/22/fast-fractals-with-python-and-numpy/#comment-14163</link>
		<dc:creator><![CDATA[redlac1]]></dc:creator>
		<pubDate>Tue, 18 Dec 2012 22:14:19 +0000</pubDate>
		<guid isPermaLink="false">http://thesamovar.wordpress.com/?p=409#comment-14163</guid>
		<description><![CDATA[You need to have numpy installed to run it. If you install matplotlib from here: http://www.ehow.com/how_8519555_install-pylab-python.html
, it will have the files you need.]]></description>
		<content:encoded><![CDATA[<p>You need to have numpy installed to run it. If you install matplotlib from here: <a href="http://www.ehow.com/how_8519555_install-pylab-python.html" rel="nofollow">http://www.ehow.com/how_8519555_install-pylab-python.html</a><br />
, it will have the files you need.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
