<?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>Syntopia &#187; Fractals</title>
	<atom:link href="http://blog.hvidtfeldts.net/index.php/category/fractals/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hvidtfeldts.net</link>
	<description>Art + Culture + Technology</description>
	<lastBuildDate>Tue, 01 Jun 2010 04:59:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Folding Space II: Kaleidoscopic Fractals</title>
		<link>http://blog.hvidtfeldts.net/index.php/2010/06/folding-space-ii-kaleidoscopic-fractals/</link>
		<comments>http://blog.hvidtfeldts.net/index.php/2010/06/folding-space-ii-kaleidoscopic-fractals/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 04:40:41 +0000</pubDate>
		<dc:creator>Mikael Christensen</dc:creator>
				<category><![CDATA[Fractals]]></category>
		<category><![CDATA[GPU]]></category>
		<category><![CDATA[Kaleidoscopic IFS]]></category>
		<category><![CDATA[Mandelbulb]]></category>

		<guid isPermaLink="false">http://blog.hvidtfeldts.net/?p=524</guid>
		<description><![CDATA[Another type of interesting 3D fractal has appeared over at fractalforums.com: the Kaleidoscopic 3D fractals, introduced in this thread, by Knighty.
Once again these fractals are defined by investing the convergence properties of a simple function. And similar to the Mandelbox, the function is built around the concept of folds. Geometrically, a fold is simply a [...]]]></description>
			<content:encoded><![CDATA[<p>Another type of interesting 3D fractal has appeared over at fractalforums.com: the Kaleidoscopic 3D fractals, introduced in <a href="http://www.fractalforums.com/3d-fractal-generation/kaleidoscopic-%28escape-time-ifs%29/">this thread</a>, by Knighty.</p>
<p>Once again these fractals are defined by investing the convergence properties of a simple function. And similar to the Mandelbox, the function is built around the concept of folds. Geometrically, a fold is simply a conditional reflection: you reflect a point in a plane, if it is located on the wrong side of the plane.</p>
<p>It turns out that just by using plane-folds and scaling, it is possible to create classic 3D fractals, such as the Menger cube and the Sierpinsky tetrahedron, and even recursive versions of the rest of the <a href="http://en.wikipedia.org/wiki/Platonic_solid">Platonic solids</a>: the octahedron, the dodecahedron, and the icosahedron.</p>
<p><img src="http://blog.hvidtfeldts.net/media/dodeca.png" /><br />
<i>Example of a recursive dodecahedron</i></p>
<p>The kaleidoscopic fractals introduce an additional 3D rotation before and after the folds. It turns out that these perturbations introduce a rich variety of interesting and complex structures.</p>
<p>I&#8217;ve followed the thread and implemented most of the proposed systems by modifying Subblue&#8217;s <a href="http://www.subblue.com/projects/mandelbulb">Pixel Bender scripts</a>. </p>
<p>Below are some of my images: </p>
<h2>The Menger Sponge</h2>
<p>My first attempts. Pixel Bender kept crashing on me, until I realized that there is a GPU timeout in Windows Vista (read <a href="http://www.flickr.com/photos/syntopia/4575335808/in/photostream">this</a> for a solution).</p>
<p><a href="http://www.flickr.com/photos/syntopia/4581686367/"><img src="http://blog.hvidtfeldts.net/media/mengers1.png" /></a><a href="http://www.flickr.com/photos/syntopia/4581685939/"><img src="http://blog.hvidtfeldts.net/media/mengers2.png" /></a><br />
<a href="http://www.flickr.com/photos/syntopia/4575335808/in/photostream/"><img src="http://blog.hvidtfeldts.net/media/mengers3.png" /></a></p>
<h2>The Sierpinsky</h2>
<p>Then I moved on to the Sierpinsky. The sequence below shows something characteristic for these fractals: the first slightly perturbed variations look artificial and synthetic, but when the system is distorted, it becomes organic and alive.</p>
<p><a href="http://www.flickr.com/photos/syntopia/4601559959/in/photostream/"><img src="http://blog.hvidtfeldts.net/media/sier1s.png" /></a><a href="http://www.flickr.com/photos/syntopia/4601558439/in/photostream/"><img src="http://blog.hvidtfeldts.net/media/sier2s.png" /></a><br />
<a href="http://www.flickr.com/photos/syntopia/4601554859/in/photostream/"><img src="http://blog.hvidtfeldts.net/media/sier3s.png" /></a><a href="http://www.flickr.com/photos/syntopia/4601553411/in/photostream/"><img src="http://blog.hvidtfeldts.net/media/sier4s.png" /></a><br />
<a href="http://www.flickr.com/photos/syntopia/4602166152/in/photostream/"><img src="http://blog.hvidtfeldts.net/media/sier5s.png" /></a></p>
<h2>The Icosahedron</h2>
<p>I also tried the octahedron and dodecahedron, but my favorite is the icosahedron. Especially knighty&#8217;s hollow variant.</p>
<p><a href="http://www.flickr.com/photos/syntopia/4621378803/"><img src="http://blog.hvidtfeldts.net/media/i1.png" /></a><a href="http://www.flickr.com/photos/syntopia/4621983786/"><img src="http://blog.hvidtfeldts.net/media/i2.png" /></a><br />
<a href="http://www.flickr.com/photos/syntopia/4621973610/"><img src="http://blog.hvidtfeldts.net/media/i3.png" /></a><a href="http://www.flickr.com/photos/syntopia/4621977652/"><img src="http://blog.hvidtfeldts.net/media/i4.png" /></a><br />
<a href="http://www.flickr.com/photos/syntopia/4621376379"><img src="http://blog.hvidtfeldts.net/media/i5.png" /></a><br />
<a href="http://www.flickr.com/photos/syntopia/4621376379/"><img src="http://blog.hvidtfeldts.net/media/i6.png" /></a></p>
<h2>Arbitrary Planes</h2>
<p>One nice thing about these systems is, that you do not necessarily need to derive a complex distance estimator &#8211; you can also just modify the distance estimator code, and see what happens. These last two images were constructed by modifying existing distance estimators. </p>
<p><a href="http://www.flickr.com/photos/syntopia/4627146718/in/photostream/"><img src="http://blog.hvidtfeldts.net/media/arb1.png" /></a></p>
<p><a href="http://www.flickr.com/photos/syntopia/4626531029/in/photostream/"><img src="http://blog.hvidtfeldts.net/media/arb2.png" /></a></p>
<p>It will be interesting to see where this is going. </p>
<p>Many fascinating 3D fractals have appeared at fractalforums.com over the last few weeks. And GPU processing now makes it is possible to explore these systems in real-time. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hvidtfeldts.net/index.php/2010/06/folding-space-ii-kaleidoscopic-fractals/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Reality of Fractals</title>
		<link>http://blog.hvidtfeldts.net/index.php/2010/04/the-reality-of-fractals/</link>
		<comments>http://blog.hvidtfeldts.net/index.php/2010/04/the-reality-of-fractals/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 20:49:02 +0000</pubDate>
		<dc:creator>Mikael Christensen</dc:creator>
				<category><![CDATA[Fractals]]></category>
		<category><![CDATA[Generative Art]]></category>
		<category><![CDATA[Mandelbulb]]></category>
		<category><![CDATA[Mathematical Art]]></category>

		<guid isPermaLink="false">http://blog.hvidtfeldts.net/?p=430</guid>
		<description><![CDATA[&#8220;&#8230; no one, not even Benoit Mandelbrot himself [...] had any real preconception of the set&#8217;s extraordinary richness. The Mandelbrot set was certainly no invention of any human mind. The set is just objectively there in the mathematics itself. If it has meaning to assign an actual existence to the Mandelbrot set, then that existence [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><i>&#8220;&#8230; no one, not even Benoit Mandelbrot himself [...] had any real preconception of the set&#8217;s extraordinary richness. The Mandelbrot set was certainly no invention of any human mind. The set is just objectively there in the mathematics itself. If it has meaning to assign an actual existence to the Mandelbrot set, then that existence is not within our mind, for no one can fully comprehend the set&#8217;s endless variety and unlimited complication.&#8221;</i></p>
<p>Roger Penrose (from The Road to Reality)
</p></blockquote>
<p>The recent proliferation of 3D fractals, in particular the Mandelbox and <a href="/index.php/category/mandelbulb/index.php/category/mandelbulb/">Mandelbulb</a>, got me thinking about the reality of these systems. The million dollar question is whether we <i>discover</i> or <i>construct</i> these entities. Surely these systems give the impression of exploring uncharted territory, perhaps even looking into another world. But the same can be said for many traditional man-made works of art.</p>
<p>I started out by citing Roger Penrose. He is a mathematical Platonist, and believes that both the fractals worlds (such as the Mandelbrot set) and the mathematical truths (such as Fermat&#8217;s last theorem) are discovered. In his view, the mathematical truths have an eternal, unchanging, objective existence in some kind of Platonic ideal world, independent of human observers. </p>
<p>In Penrose&#8217;s model, there are three distinct worlds: the physical world, the mental world (our perception of the physical world), and the cryptic Platonic world. Even Penrose himself admits that the connections and interactions between these worlds are mysterious. And personally I cannot see any kind of evidence pointing in favor of this third, metaphysical world.</p>
<p><a href="http://makinmagic.deviantart.com/art/Designer-World-158071809"><img src="http://blog.hvidtfeldts.net/media/makin.png" /></a><br />
<a href="http://makinmagic.deviantart.com/art/Designer-World-158071809">Designer World</a> by David Makin</p>
<p>Roger Penrose is a highly renowned mathematician and physicist, and I value his opinions and works highly. In fact, it was one of his earlier books, The Emperors New Mind, that in part motivated me to become a physicist myself. But even though he is probably one of the most talented mathematicians living today, I am not convinced by his Platonist belief. </p>
<p>Personally, I subscribe to the less exotic <i>formalist</i> view: that the mathematical truths are the theorems we can derive by applying a set of deduction rules to a set of mathematical axioms. The axioms are not completely arbitrary, though. For instance, a classic mathematical discipline, such as Euclidean geometry, was clearly motivated by empirical observations of the physical world. The same does not necessarily apply to modern mathematical areas. For instance, Lobachevsky&#8217;s non-Euclidean geometry, was conceived by exploring the consequences of modifying one of Euclid&#8217;s fundamental postulates (interestingly non-Euclidean geometry later turned out to be useful in describing the physical world through Einstein&#8217;s general theory of relativity). </p>
<p>But if modern mathematics has become detached from its empirical roots, what governs the evolution of modern mathematics? Are all formal systems thus equally interesting to study? My guess is that most mathematicians gain some kind of intuition about what directions to pursue, based on a mixture of trends, historical research, and feedback from applied mathematics.</p>
<p><a href="http://krzysztofmarczak.deviantart.com/art/Mandelballs-160925525"><img src="http://blog.hvidtfeldts.net/media/mandelballs.png" /></a><br />
<a href="http://krzysztofmarczak.deviantart.com/art/Mandelballs-160925525">Mandelballs </a> by Krzysztof Marczak [Mandelbox / Juliabulb mix]</p>
<p>Does my formalist position mean that I consider the Mandelbrot set to be a man-made creation, in the same category as a Picasso painting or a Bach concert? Not exactly. Because I do believe in a <i>physical</i> realism (in the sense that I believe in a objective, physical world independent of human existence), and since I do believe some parts of mathematics is inspired by this physical world and tries to model it, I believe some parts of mathematics can be attributed an objective status as well. But it is a weaker kind of objective existence: the mathematical models and structures used to describe reality are not persistent and ever-lasting, instead they may be refined and altered, as we progressively create models with greater predictive power. And I think this is the reason fractals often resemble natural structures and phenomena: because the mathematics used to produce the fractals was inspired by nature in the first place. Let me give another example:</p>
<p><a href="http://www.fractalforums.com/index.php?action=gallery;sa=view;id=1626"><img src="http://blog.hvidtfeldts.net/media/eggs.png" /></a><br />
<a href="http://www.fractalforums.com/index.php?action=gallery;sa=view;id=1626">Teeth</a> by Jesse</p>
<p>Would a distant alien civilization come up with the same Mandelbrot images as we see? I think it is very likely. Any advanced civilization studying nature, would most likely have created models such as the natural numbers, the real numbers, and eventually the complex numbers. The complex numbers are extremely useful when modeling many physical phenomena, such as waves or electrodynamics, and complex numbers are essential in the description of quantum mechanics. And if this hypothetical civilization had computational power available, eventually someone would investigate the convergence of a simple, iterated system like  <b>z = z<sup>2</sup> + c</b>. So there would probably be a lot of overlapping mathematical structures. But there would also be differences: for instance the construction of the slightly more complex Mandelbox set contains several human-made design decisions, making it less likely to be invented by our distant civilization.  </p>
<p>I think there is a connection to other areas of generative art as well. In the opening quote Penrose claims that no-one could have any real preconception of the Mandelbrot sets extraordinary richness. And the same applies to many generative systems: they are impossible to predict and often surprisingly complex and detailed. But this does not imply that they have a meta-physical Platonic origin. Many biological and physical systems share the same properties. And many of the most interesting generative systems are inspired by these physical or biological systems (for instance using models such as genetic algorithms, flocking behavior, cellular automata, reaction-diffusion systems, and L-systems). </p>
<p>Another point to consider is, that creating beautiful and interesting fractal images as the ones above, requires much more than a simple formula. It requires aesthetic intuition and skills to choose a proper palette, find an interesting camera location, and it takes many hours of formula parameter tweaking. I know this from my experiments with 3D fractals &#8211; I&#8217;m very rarely satisfied with my own results. </p>
<p>But to sum it all up: Even though fractals (and generative systems) may posses endless variety and unlimited complication, there is no need to call upon metaphysical worlds in order to explain them.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hvidtfeldts.net/index.php/2010/04/the-reality-of-fractals/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Folding Space: The Mandelbox Fractal</title>
		<link>http://blog.hvidtfeldts.net/index.php/2010/04/folding-space-the-mandelbox-fractal/</link>
		<comments>http://blog.hvidtfeldts.net/index.php/2010/04/folding-space-the-mandelbox-fractal/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 20:43:13 +0000</pubDate>
		<dc:creator>Mikael Christensen</dc:creator>
				<category><![CDATA[Fractals]]></category>
		<category><![CDATA[Mandelbulb]]></category>

		<guid isPermaLink="false">http://blog.hvidtfeldts.net/?p=393</guid>
		<description><![CDATA[Over at fractalforums.com another interesting 3D fractal has emerged: the Mandelbox. 
It originates from this thread, where it was introduced by Tglad (Tom Lowe). Similar to the original Mandelbrot set, an iterative function is applied to points in 3D space, and points which do not diverge are part of the set. The iterated function used [...]]]></description>
			<content:encoded><![CDATA[<p>Over at fractalforums.com another interesting 3D fractal has emerged: the Mandelbox. </p>
<p>It originates from <a href="http://www.fractalforums.com/3d-fractal-generation/amazing-fractal/">this thread</a>, where it was introduced by Tglad (Tom Lowe). Similar to the original Mandelbrot set, an iterative function is applied to points in 3D space, and points which do not diverge are part of the set. The iterated function used for the Mandelbox set has a nice geometric interpretation: it corresponds to repeated <a href="http://sites.google.com/site/mandelbox/what-is-a-mandelbox">folding operations</a>.</p>
<p>In contrast to the organic presence of the <a href="/index.php/category/mandelbulb/">Mandelbulbs</a>, the Mandelbox has a very architectural and structural feel to it:</p>
<p><a href="http://sites.google.com/site/mandelbox/home/interior"><br />
<img src="http://blog.hvidtfeldts.net/media/mandelbox1.jpg" /></a></p>
<p>The Mandelbox probably owes it name to the cubic and square patterns that emerge at many levels: </p>
<p><a href="http://sites.google.com/site/mandelbox/negative-mandelbox"><br />
<img src="http://blog.hvidtfeldts.net/media/mandelbox2.jpg" /></a></p>
<p>It is also possible to create Julia Set variations:</p>
<p><a href="http://www.fractalforums.com/index.php?action=gallery;sa=view;id=1799"><img src="http://blog.hvidtfeldts.net/media/mandelbox3.jpg" /></a><br />
<i><a href="http://www.fractalforums.com/index.php?action=gallery;sa=view;id=1799">Juliabox</a> by &#8216;Jesse&#8217; (click to see the large version of this fantastic image!) </i></p>
<p>Be sure to check out Tom Lowe&#8217;s <a href="http://sites.google.com/site/mandelbox/home">Mandelbox site</a> for more pictures and some technical background information, including links to a few (Windows only) software implementations.</p>
<p>I tried out the Ultra Fractal extension myself. This was my first encounter with Ultra Fractal, and it took me quite some time to figure out how to setup a Mandelbox render. For others, the following steps may help:</p>
<ol>
<li>Install Ultra Fractal (there is a <a href="http://www.ultrafractal.com/download/index.php">free trial version</a>).
<li>Choose &#8216;Options | Update Public Formulas&#8230;&#8217; to get some needed dependencies.
<li>Install David Makin&#8217;s <a href="http://www.fractalforums.com/mandelbulb-implementation/update-to-the-mmf-wip-formula-for-ultra-fractal/">MMFwip3D</a> package and install it into the Ultra Fractal formula folder &#8211; it is most likely located at &#8220;%userprofile%\Documents\Ultra Fractal 5\Formulas&#8221;.
<li>In principle, this is all you need. But the MMFwip3D formulas contain a <i>vast</i> number of parameters and settings. To get started try using some existing parameter set:  <a href="http://sites.google.com/site/mandelbox/parameter-settings/">this</a> is a good starting point. In order to use these settings, simply select the text, copy it into the clipboard, and paste it into an Ultra Fractal fractal window.
</ol>
<p>The CPU-based implementations are somewhat slow, taking minutes to render even small images &#8211; but it probably won&#8217;t be long before a GPU-accelerated version appear: Subblue has already posted <a href="http://www.flickr.com/photos/subblue/4479448043/">images</a> of a PixelBender implementation in progress. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hvidtfeldts.net/index.php/2010/04/folding-space-the-mandelbox-fractal/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mandelbulb Implementations</title>
		<link>http://blog.hvidtfeldts.net/index.php/2009/12/mandelbulb-implementations/</link>
		<comments>http://blog.hvidtfeldts.net/index.php/2009/12/mandelbulb-implementations/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 21:56:14 +0000</pubDate>
		<dc:creator>Mikael Christensen</dc:creator>
				<category><![CDATA[Fractals]]></category>
		<category><![CDATA[GPU]]></category>
		<category><![CDATA[Mandelbulb]]></category>

		<guid isPermaLink="false">http://blog.hvidtfeldts.net/?p=199</guid>
		<description><![CDATA[Several implementations have appeared since the Mandelbulb surfaced a couple of months ago.
The first public GPU implementation I know of was created by &#8216;cbuchner1&#8242;. It is based on a sample from NVIDIAs OptiX SDK, and features anaglyphic 3D, ambient occlusion, phong shading, reflection, and environment maps. It can be downloaded here (Windows only and requires [...]]]></description>
			<content:encoded><![CDATA[<p>Several implementations have appeared since the <a href="http://blog.hvidtfeldts.net/index.php/2009/11/mandelbulb/">Mandelbulb</a> surfaced a couple of months ago.</p>
<p>The first public GPU implementation I know of was created by &#8216;cbuchner1&#8242;. It is based on a sample from NVIDIAs <a href="http://developer.nvidia.com/object/optix-home.html">OptiX SDK</a>, and features anaglyphic 3D, ambient occlusion, phong shading, reflection, and environment maps. It can be <a href="http://forums.nvidia.com/index.php?showtopic=150985&#038;st=20">downloaded here</a> (Windows only and requires a forum signup).</p>
<p><img src="/media/mandel3.jpg" /><br />
<i>Example made with cbuchner1&#8217;s implementation</i></p>
<p>Very interestingly this binary runs on my laptops modest GeForce 8400M. I am a bit puzzled about this &#8211; NVIDIA state that the OptiX SDK requires a Quadro or a Tesla card, and I am not able to run the <a href="http://developer.nvidia.com/object/optix-examples.html">Julia</a> OptiX demo, that cbuchner1s app is derived from. </p>
<p>Subblue has also created a <a href="http://www.subblue.com/blog/2009/12/13/mandelbulb">Mandelbulb implementation</a>, released as a Pixel Bender script and a Quartz composer plugin. A number of interesting customizations makes this my favorite choice: it is possible to explore negative and fractional powers, switch to Julia sets, and the lightning options can be fine-tuned. The only drawback is that Pixel Bender does not make it possible to directly rotate, zoom, and translate the camera &#8211; you have to rely on sliders for that. </p>
<p><a href="http://www.flickr.com/photos/subblue/4148811390/"><img src="/media/mandelbulb2.jpg" /></a><br />
<i>Example created by Subblue.</i></p>
<p><a href="http://iquilezles.org/">Iñigo Quílez</a> has also created a GPU implementation, but unfortunately he has not released any code yet. A couple of videos are available on Youtube, though: <a href="http://www.youtube.com/watch?v=erS6SKqtXLY&#038;feature=related">Part 1</a>, <a href="http://www.youtube.com/watch?v=eKUh4nkmQbc">Part 2</a>, <a href="http://www.youtube.com/watch?v=iWr5kSZQ7jk&#038;feature=related">Part 3</a>. </p>
<p><img src="/media/turin2.jpg" /><br />
<i>Quilez also discovered this intimate <a href="http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8658/#msg8658">connection</a> between the Shroud of Turin and the Mandelbulb.</i></p>
<p>The <a href="http://frictionalgames.blogspot.com/2009/11/fractional-fun.html">MathFuncRenderer</a> also has a Mandelbulb implementation. I had a few quirks with this one &#8211; I had to install <a href="http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx">OpenAL</a>, and the UI was quite non-responsive, but this may be due to my graphics card.</p>
<p>Another very interesting implementation is the <a href="http://www.icare3d.org/blog_techno/gpu/gigabroccoli_the_mandelbulb_into_gigavoxels.html">GigaVoxels Mandelbulb</a>: Whereas most implementations cast rays and use a distance estimator to speed up the ray marching, GigaVoxels use voxels stored into an Octree, which is populated on-the-fly. </p>
<p>For other implementations keep an eye on Fractal Forums <a href="http://www.fractalforums.com/mandelbulb-implementation/">Mandelbulb Implementation</a> category.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hvidtfeldts.net/index.php/2009/12/mandelbulb-implementations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quaternion Julia sets and GPU computation.</title>
		<link>http://blog.hvidtfeldts.net/index.php/2009/09/quaternion-julia-sets-and-gpu-computation/</link>
		<comments>http://blog.hvidtfeldts.net/index.php/2009/09/quaternion-julia-sets-and-gpu-computation/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 22:05:38 +0000</pubDate>
		<dc:creator>Mikael Christensen</dc:creator>
				<category><![CDATA[Digital Art]]></category>
		<category><![CDATA[Fractals]]></category>
		<category><![CDATA[GPU]]></category>
		<category><![CDATA[Mathematical Art]]></category>

		<guid isPermaLink="false">http://blog.hvidtfeldts.net/?p=111</guid>
		<description><![CDATA[Subblue has released another impressive Pixel Bender plugin, this time a Quaternion Julia set renderer. 

The plugin can be downloaded here.
Quaternions are extensions of the complex numbers with four independent components. Quaternion Julia sets still explore the convergence of the system z &#8592; z2 + c, but this time z and c are allowed to [...]]]></description>
			<content:encoded><![CDATA[<p>Subblue has released another impressive Pixel Bender plugin, this time a <a href="http://www.subblue.com/blog/2009/9/20/quaternion_julia">Quaternion Julia set renderer</a>. </p>
<p><img src= "/media/q.png" /></p>
<p>The plugin can be <a href="http://www.subblue.com/blog/2009/9/20/quaternion_julia">downloaded here</a>.</p>
<p>Quaternions are extensions of the complex numbers with four independent components. Quaternion Julia sets still explore the convergence of the system <b>z &larr; z<sup>2</sup> + c</b>, but this time <b>z</b> and <b>c</b> are allowed to be quaternion-valued numbers. Since quaternions are essentially four-dimensional objects, only a slice (the intersection of the set with a plane) of the quaternion Julia sets is shown. </p>
<p>Quaternion Julia sets would be very time consuming to render if it wasn&#8217;t for a very elegant (and surprising) formula, <em>the distance estimator</em>, which for any given point gives you the distance to the closest point on the Julia Set. The distance estimator method was first described in: <a href="http://portal.acm.org/citation.cfm?id=74363&#038;dl=GUIDE&#038;coll=GUIDE&#038;CFID=54955448&#038;CFTOKEN=40869376">Ray tracing deterministic 3-D fractals (1989)</a>.</p>
<p>My first encounter with Quaternion Julia sets was Inigo Quilez&#8217; amazing <a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=469773" rel="nofollow">Kindernoiser demo</a> which packed a complete renderer with ambient occlusion into a 4K executable. It also used the distance estimator method and GPU based acceleration. If you haven&#8217;t visited <a href="http://www.iquilezles.org/www/">Quilez&#8217; site</a> be sure to do so. It is filled with impressive demos, and well-written tech articles.</p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=967591&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=967591&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p><a href="http://vimeo.com/967591">Transfigurations</a> (another Quaternion Julia set demo) from <a href="http://vimeo.com/iq">Inigo Quilez</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>In the 1989 Quaternion Julia set paper, the authors produced their images on an AT&#038;T Pixel Machine, with 64 CPU&#8217;s each running at 10 megaFLOPS. I suspect that this was an insanely expensive machine at the time. For comparison, the relatively modest NVIDIA GeForce 8400M GS in my laptop has a theoretical maximum processing rate of 38 gigaFLOPS, or approximately 60 times that of the Pixel Machine. A one megapixel image took the authors of the 1989 paper 1 hour to generate, whereas Subblues GPU implementation uses ca. 1 second on my laptop (making it much more efficient than what would have been expected from the FLOPS ratio).</p>
<h2>GPU Acceleration and the future.</h2>
<p>These days there is a lot of talk about using GPUs for general purpose programming. The first attempts to use GPUs to speed up general calculations relied on tricks such as using pixel shaders to perform calculations on data stored in texture memory, but since then several API&#8217;s have been introduced to make it easier to program the GPUs. </p>
<p>NVIDIAs CUDA is currently by far the most popular and documented API, but it is for NVIDIA only. Their <a href="http://www.nvidia.com/object/cuda_home.html#">gallery of applications</a> demonstrates the diversity of how GPU calculations can be used. AMD/ATIs has their competing Stream API (formerly called Close To Metal) <del datetime="2009-09-28T14:04:24+00:00">but don&#8217;t bet on this one &#8211; I&#8217;m pretty sure it is almost abandoned already</del>. <b>Update:</b> as pointed out in the comments, the new <a href="http://developer.amd.com/gpu/ATIStreamSDKBetaProgram/Pages/default.aspx">ATI Stream 2.0 SDK</A> will include ATIs OpenCL implemention, which for all I can tell is here to stay. What I meant to say was, that I don&#8217;t think ATIs earlier attempts at creating a GPU programming interface (including the Brook+ language) are likely to catch on.</p>
<p>Far more important is the emerging <a href="http://en.wikipedia.org/wiki/OpenCL">OpenCL standard</a> (which is being promoted in Apples Snow Leopard, and is likely to become a de facto standard). Just as OpenGL, it is managed by the Khronos group. OpenCL was originally developed by Apple, and they still own the <a href="http://tess2.uspto.gov/bin/showfield?f=doc&#038;state=4002:r3e1el.2.1">trademark</a>, which is probably why Microsoft has chosen to promote their own API, <a href="http://en.wikipedia.org/wiki/DirectCompute">DirectCompute</a>. My guess is that CUDA and Brook+ will slowly fade away, as both OpenCL and DirectCompute will come to co-exist just the same way as OpenGL and Direct3D do.</p>
<p>For cross-platform development OpenCL is therefore the most interesting choice, and I&#8217;m hoping to see NVIDIA and AMD/ATI release public drivers for Windows as soon as possible (as of now they are in <del datetime="2009-09-28T15:21:11+00:00">closed</del> beta versions).</p>
<p>GPU acceleration could be very interesting from a generative art perspective, since it suddenly becomes possible to perform advanced visualization, such as ray-tracing, in <em>real-time</em>.</p>
<p>A final comment: a few days ago I found this quaternion Julia set <a href="http://www.angisoft.de/Angisoft/Welcome.html" rel="nofollow">GPU implementation for the iPhone 3GS</a> using OpenGL ES 2.0 programmable shaders. I think this demonstrates the sophistication of the iPhone hardware and software platform &#8211; both that a hand-held device even has a programmable GPU, but also that the SDK is flexible enough to make it possible to access it. 																</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hvidtfeldts.net/index.php/2009/09/quaternion-julia-sets-and-gpu-computation/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Fractal Explorer Plugin</title>
		<link>http://blog.hvidtfeldts.net/index.php/2009/09/fractal-explorer-plugin/</link>
		<comments>http://blog.hvidtfeldts.net/index.php/2009/09/fractal-explorer-plugin/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 23:00:17 +0000</pubDate>
		<dc:creator>Mikael Christensen</dc:creator>
				<category><![CDATA[Digital Art]]></category>
		<category><![CDATA[Fractals]]></category>
		<category><![CDATA[GPU]]></category>

		<guid isPermaLink="false">http://blog.hvidtfeldts.net/?p=71</guid>
		<description><![CDATA[In July Subblue released another Pixel Blender plugin, called the Fractal Explorer Plugin &#8211; for exploring Julia sets and fractal orbit maps. I didn&#8217;t get around to try it out until recently, but it is really a great tool for exploring fractals.
Most people have probably seen examples of Julia and Mandelbrot sets &#8211; where the [...]]]></description>
			<content:encoded><![CDATA[<p>In July Subblue released another <a href="http://labs.adobe.com/technologies/pixelbender/">Pixel Blender</a> plugin, called <a href="http://www.subblue.com/projects/fractal_explorer">the Fractal Explorer Plugin</a> &#8211; for exploring Julia sets and fractal orbit maps. I didn&#8217;t get around to try it out until recently, but it is really a great tool for exploring fractals.</p>
<p>Most people have probably seen examples of Julia and Mandelbrot sets &#8211; where the convergence properties of the series generated by repeated application of a complex-valued function is investigated. </p>
<p>The most well-known example is the iteration of the function <strong>z&nbsp;&larr;&nbsp;z<sup>2</sup>+c</strong>. The Mandelbrot set is created by plotting the convergence rate for this function while <strong>c</strong> varies over the complex plane. Likewise, the Julia set is created for a fixed <strong>c</strong> while varying the initial <strong>z</strong>-value over the complex plane.</p>
<p><img src="/media/glynn1.jpg" /><br />
<a href="http://www.flickr.com/photos/subblue/3646420287/in/set-72157621504415799/">Glynn1</a> by Subblue (A Julia-set where an exponent of 1.5 is used).</p>
<p>Where ordinary Julia and Mandelbrot sets only take into account whether the series created by the iterated function tends towards infinity (diverges) or not, <i>fractal orbits</i> instead uses another image as input, and checks whether the complex number series generated by the function hits a (non-transparent) pixel in the source image. This allows for some very fascinating &#8216;fractalization&#8217; of existing images.</p>
<p><img src="/media/mondrian.png" /><br />
<em>A fractal orbit showing a highly non-linear transformation of a Mondrian picture.</em></p>
<p>Subblue suggests starting out using Ernst Haeckel beautiful illustrations from the book <a href="http://commons.wikimedia.org/wiki/Kunstformen_der_Natur">Artforms of Nature</a>, and he has put up a small <a href="http://www.subblue.com/blog/2009/7/18/artforms_of_nature">gallery with some great examples</a>:<br />
<a href="http://www.subblue.com/blog/2009/7/18/artforms_of_nature"><img src="/media/artforms.jpg" /></a><br />
<em>An example of an orbit mapped Ernst Haeckel image.</em></p>
<p>To try out Subblue&#8217;s filter, download the <a href="http://labs.adobe.com/technologies/pixelbender/">Pixel Blender SDK</a> and load his kernel filter and an input image of choice. It is necessary to uncheck the &#8220;Build | Turn On Flash Player Warnings and Errors&#8221; menu item in order to start the plugin. On my computer I also often experience that the Pixel Blender SDK is unable to detect and initialize my GPU &#8211; it sometimes help to close other programs and restart the application. The filter executes extremely fast on the GPU &#8211; often with more than 100 frames per second, making it easy to interactively explore and discover the fractals.</p>
<p>As I final note, I implemented a fractal drawings routine myself in Structure Synth (version 1.0) just for fun. It is implemented as a hidden easter egg, and not documented at all, but the code belows shows an example of how to invoke it:</p>
<p><code>#easter<br />
Size: 800x800<br />
MaxIter: 150<br />
Term: (-0.2,0)<br />
Term: 1*Z^1.5<br />
BreakOut: 2<br />
View: (-0.0,0.2) -> (0.7,0.9)<br />
</code></p>
<p>Arguable, this code is not very optimized (it is possible to add an unlimited number of terms, making the function evaluation somewhat slow), but still it takes seconds to calculate an image making it more than a hundred times slower than the Pixel Blender GPU solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hvidtfeldts.net/index.php/2009/09/fractal-explorer-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
