<?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; Mandelbulb</title>
	<atom:link href="http://blog.hvidtfeldts.net/index.php/category/mandelbulb/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hvidtfeldts.net</link>
	<description>Generative Art, 3D Fractals, Creative Computing</description>
	<lastBuildDate>Fri, 27 Jan 2012 22:34:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Distance Estimated 3D Fractals (V): The Mandelbulb &amp; Different DE Approximations</title>
		<link>http://blog.hvidtfeldts.net/index.php/2011/09/distance-estimated-3d-fractals-v-the-mandelbulb-different-de-approximations/</link>
		<comments>http://blog.hvidtfeldts.net/index.php/2011/09/distance-estimated-3d-fractals-v-the-mandelbulb-different-de-approximations/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 21:36:07 +0000</pubDate>
		<dc:creator>Mikael Hvidtfeldt Christensen</dc:creator>
				<category><![CDATA[Distance Estimation]]></category>
		<category><![CDATA[Fractals]]></category>
		<category><![CDATA[Fragmentarium]]></category>
		<category><![CDATA[Mandelbulb]]></category>

		<guid isPermaLink="false">http://blog.hvidtfeldts.net/?p=1200</guid>
		<description><![CDATA[Previous posts: part I, part II, part III and part IV. The last post discussed the distance estimator for the complex 2D Mandelbrot: (1)&#160;&#160;, with &#8216;dr&#8217; being the length of the running (complex) derivative: (2)&#160;&#160; In John Hart&#8217;s]]></description>
			<content:encoded><![CDATA[<p><em>Previous posts: <a href="http://blog.hvidtfeldts.net/index.php/2011/06/distance-estimated-3d-fractals-part-i/">part I</a>, <a href="http://blog.hvidtfeldts.net/index.php/2011/08/distance-estimated-3d-fractals-ii-lighting-and-coloring/">part II</a>, <a href="http://blog.hvidtfeldts.net/index.php/2011/08/distance-estimated-3d-fractals-iii-folding-space/">part III</a> and <a href="http://blog.hvidtfeldts.net/index.php/2011/09/distance-estimated-3d-fractals-iv-the-holy-grail/">part IV</a>.</em></p>
<p>The <a href="http://blog.hvidtfeldts.net/index.php/2011/09/distance-estimated-3d-fractals-iv-the-holy-grail/">last post</a> discussed the distance estimator for the complex 2D Mandelbrot:</p>
<p><strong>(1)</strong>&nbsp;&nbsp;\(DE=0.5*ln(r)*r/dr\), </p>
<p>with &#8216;dr&#8217; being the length of the running (complex) derivative:</p>
<p><strong>(2)</strong>&nbsp;&nbsp;\(f&#8217;_n(c) = 2f_{n-1}(c)f&#8217;_{n-1}(c)+1\)</p>
<p>In John Hart&#8217;s <a href="<a href="http://dl.acm.org/citation.cfm?id=74363">paper</a>, he used the exact same form to render a Quaternion system (using four-component Quaternions to keep track of the running derivative). In the paper, Hart never justified why the complex Mandelbrot formula also should be valid for Quaternions. A proof of this was later given by Dang, Kaufmann, and Sandin in the book <a href="http://www.evl.uic.edu/hypercomplex/html/book/book.pdf">Hypercomplex Iterations: Distance Estimation and Higher Dimensional Fractals</a> (2002).</p>
<p>I used the same distance estimator formula, when drawing the 3D hypercomplex images in the last post &#8211; it seems to be quite generic and applicable to most polynomial escape time fractal. In this post we will take a closer look at how this formula arise.</p>
<h2>The Mandelbulb</h2>
<p>But first, let us briefly return to the 2D Mandelbrot equation: \(z_{n+1} = z_{n}^2+c\). Now, squaring complex numbers has a simple geometric interpretation: if the complex number is represented in polar coordinates, squaring the number corresponds to squaring the length, and doubling the angle (to the real axis).</p>
<p>This is probably what motivated Daniel Nylander (Twinbee) to investigate what happens when turning to spherical 3D coordinates and squaring the length and doubling the two angles here. This makes it possible to get something like the following object:</p>
<p><img src="http://blog.hvidtfeldts.net/media/bulb2.png"><br />
<em>On the image above, I made made some cuts to emphasize the embedded 2D Mandelbrot.</em></p>
<p>Now, this object is not much more interesting than the triplex and Quaternion Mandelbrot from the <a href="http://blog.hvidtfeldts.net/index.php/2011/09/distance-estimated-3d-fractals-iv-the-holy-grail/">last post</a>. But Paul Nylander suggested that the same approach should be used for a power-8 formula instead: \(z_{n+1} = z_{n}^8+c\), something which resulted in what is now known as the Mandelbulb fractal:</p>
<p><img src="http://blog.hvidtfeldts.net/media/mbulb3.jpg"></p>
<p>The power of eight is somewhat arbitrary here. A power seven or nine object does not look much different, but unexpectedly these higher power objects display a much more interesting structure than their power two counterpart.</p>
<p>Here is some example Mandelbulb code:</p>
<pre>
float DE(vec3 pos) {
	vec3 z = pos;
	float dr = 1.0;
	float r = 0.0;
	for (int i = 0; i < Iterations ; i++) {
		r = length(z);
		if (r>Bailout) break;

		// convert to polar coordinates
		float theta = acos(z.z/r);
		float phi = atan(z.y,z.x);
		dr =  pow( r, Power-1.0)*Power*dr + 1.0;

		// scale and rotate the point
		float zr = pow( r,Power);
		theta = theta*Power;
		phi = phi*Power;

		// convert back to cartesian coordinates
		z = zr*vec3(sin(theta)*cos(phi), sin(phi)*sin(theta), cos(theta));
		z+=pos;
	}
	return 0.5*log(r)*r/dr;
}
</pre>
<p>It should be noted, that several versions of the geometric formulas exists. The one above is based on doubling angles for spherical coordinates as they are <a href="http://en.wikipedia.org/wiki/Spherical_coordinate_system">defined on Wikipedia</a> and is the same version as Quilez has on <a href="http://www.iquilezles.org/www/articles/mandelbulb/mandelbulb.htm">his site</a>. However, several places this form appears:</p>
<pre>
float theta = asin( z.z/r );
float phi = atan( z.y,z.x );
...
z = zr*vec3( cos(theta)*cos(phi), cos(theta)*sin(phi), sin(theta) );
</pre>
<p>which results in a Mandelbulb object where the poles are similar, and where the power-2 version has the nice 2D Mandelbrot look depicted above.</p>
<p>I&#8217;ll not say more about the Mandelbulb and its history, because all this is very well documented on <a href="http://www.skytopia.com/project/fractal/mandelbulb.html">Daniel White&#8217;s site</a>, but instead continue to discuss various distance estimators for it.</p>
<p><img src="http://blog.hvidtfeldts.net/media/mbulb2.jpg" /></p>
<p>So, how did we arrive at the distance estimator in the code example above?</p>
<p>Following the same approach as for the 4D Quaternion Julia set, we start with our iterative function:</p>
\(f_n(c) = f_{n-1}^8(c) + c,  f_0(c) = 0\)
<p>&nbsp;<br />
Deriving this function (formally) with respect to <em>c</em>, gives</p>
<p><strong>(3)</strong>&nbsp;&nbsp;&nbsp;\(f&#8217;_n(c) = 8f_{n-1}^7(c)f&#8217;_{n-1}(c)+1\)</p>
<p>where the functions above are &#8216;triplex&#8217; (3 component) valued. But we haven&#8217;t defined how to multiply two spherical triplex numbers. We only know how to square them! And how do we even derive a vector valued function with respect to a vector?  </p>
<h2>The Jacobian Distance Estimator</h2>
<p>Since we have three different function components, which we can derive with three different number components, we end up with nine possible scalar derivatives. These may be arranged in a <a href="http://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant">Jacobian matrix</a>:<br />
&nbsp;<br/><br />
\(<br />
J = \begin{bmatrix}<br />
\frac {\partial f_x}{\partial x} &#038; \frac {\partial f_x}{\partial y} &#038; \frac {\partial f_x}{\partial z} \\<br />
\frac {\partial f_y}{\partial x} &#038; \frac {\partial f_y}{\partial y} &#038; \frac {\partial f_y}{\partial z} \\<br />
\frac {\partial f_z}{\partial x} &#038; \frac {\partial f_z}{\partial y} &#038; \frac {\partial f_z}{\partial z}<br />
\end{bmatrix}<br />
\)<br />
&nbsp;<br/><br />
The Jacobian behaves like similar to the lower-dimensional derivatives, in the sense that it provides the best linear approximation to F in a neighborhood of p:<br />
&nbsp;<br/><br />
<strong>(4)</strong>&nbsp;&nbsp;&nbsp;\(<br />
F(p+dp) \approx  F(p) + J(p)dp<br />
\)<br />
&nbsp;<br/><br />
In formula (3) above this means, we have to keep track of a running matrix derivative, and use some kind of norm for this matrix in the final distance estimate (formula 1).</p>
<p>But calculating the Jacobian matrix above analytically is tricky (read the comments below from Knighty and check out his running matrix derivative example in the <a href="http://www.fractalforums.com/3d-fractal-generation/quadray-sets/">Quadray thread</a>). Luckily, other solutions exist.</p>
<p>Let us start by considering the complex case once again. Here we also have a two-component function derived by a two-component number. So why isn&#8217;t the derivative of a complex number a 2&#215;2 Jacobian matrix?</p>
<p>It turns out that for a complex function to be complex differentiable in every point (holomorphic), it must satisfy the <a href="http://en.wikipedia.org/wiki/Cauchy%E2%80%93Riemann_equations">Cauchy Riemann</a> equations. And these equations reduce the four quantities in the 2&#215;2 Jacobian to just two numbers! Notice, that the Cauchy Riemann equations are a consequence of the definition of the complex derivative in a point <i>p</i>: we require that the derivative (the limit of the difference) is the same, no matter from which direction we approach <i>p</i> (see <a href="http://en.wikipedia.org/wiki/Complex_differentiable">here</a>). Very interestingly, the holomorphic functions are exactly the functions that are <a href="http://en.wikipedia.org/wiki/Conformal_map">conformal</a> (angle preserving) &#8211; something which I briefly mentioned (see last part of <a href="http://blog.hvidtfeldts.net/index.php/2011/08/distance-estimated-3d-fractals-iii-folding-space/">part III</a>) is considered a key property of fractal transformations.</p>
<p>What if we only considered conformal 3D transformation? This would probably imply that the Jacobian matrix of the transformation would be a scalar times a rotation matrix (see <a href="http://en.wikipedia.org/wiki/Conformal_map">here</a>, but notice they only claim the reverse is true). But since the rotational part of the matrix will not influence the matrix norm, this means we would only need to keep track of the scalar part &#8211; a single component running derivative. Now, the Mandelbulb power operation is <em>not</em> a conformal transformation. But even though I cannot explain why, it is still possible to define a scalar derivative.</p>
<h2>The Scalar Distance Estimator</h2>
<p>It turns out the following running scalar derivative actually works:</p>
<p><strong>(5)</strong>&nbsp;&nbsp;&nbsp;\(dr_n = 8|f_{n-1}(c)|^7dr_{n-1}+1\)</p>
<p>where &#8216;dr&#8217; is a scalar function. I&#8217;m not sure who first came up with the idea of using a scalar derivative (but it might be Enforcer, in <a href="http://www.fractalforums.com/mandelbulb-implementation/realtime-renderingoptimisations/">this</a> thread.) &#8211; but it is interesting, that it works so well (it also works in many other cases, including for Quaternion Julia system). Even though I don&#8217;t understand why the scalar approach work, there is something comforting about it: remember that the original Mandelbulb was completely defined in terms of the square and addition operators. But in order to use the 3-component running derivative, we need to able to multiply two arbitrary &#8216;triplex&#8217; numbers! This bothered me, since it is possible to draw the Mandelbulb using e.g. a 3D voxel approach without knowing how to multiply arbitrary numbers, so I believe it should be possible to formulate a DE-approach, that doesn&#8217;t use this extra information. And the scalar approach does exactly this.</p>
<h2>The escape length gradient approximation</h2>
<p>Let us return to formula (1) above:</p>
<p><strong>(1)</strong>&nbsp;&nbsp;\(DE=0.5*ln(r)*r/dr\), </p>
<p>The most interesting part is the running derivative &#8216;dr&#8217;. For the fractals encountered so far, we have been able to find analytical running derivatives (both vector and scalar valued), but as we shall see (when we get to the more complex fractals, such as the hybrid systems) it is not always possible to find an analytical formula.</p>
<p>Remember that &#8216;dr&#8217; is the length of the f&#8217;(z) (for complex and Quaternion numbers). In analogy with the complex and quaternion case, the function must be derived with regard to the 3-component number c. Deriving a vector-valued function with regard to a vector quantity suggests the use of a <a href="http://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant">Jacobian</a> matrix. Another approach is to take the gradient of the escape length: \(dr=|\nabla |z_{n}||\) &#8211; while it is not clear to me why this is valid, it work in many cases as we will see:</p>
<p>David Makin and Buddhi suggested (in this <a href="http://www.fractalforums.com/theory/a-new-simple-way-to-compute-de-for-any-trig-mandelbulb/msg11047/#msg11047">thread</a>) that instead of trying to calculate a running, analytical derivative, we could use an numerical approximation, and calculate the above mentioned gradient using the finite forwarding method we also used when calculating a surface normal in <a href="http://blog.hvidtfeldts.net/index.php/2011/08/distance-estimated-3d-fractals-ii-lighting-and-coloring/">post II</a>.</p>
<p>The only slightly tricky point is, that the escape length must be evaluated for the same iteration count, otherwise you get artifacts. Here is some example code:</p>
<pre>
int last = 0;
float escapeLength(in vec3 pos)
{
	vec3 z = pos;
	for( int i=1; i&lt;Iterations; i++ )
	{
		z = BulbPower(z, Power) + pos;
		float r2 = dot(z,z);
		if ((r2 > Bailout &#038;&#038; last==0) || (i==last))
		{
			last = i;
			return length(z);
		}
	}
	return length(z);
}

float DE(vec3 p) {
	last = 0;
	float r = escapeLength(p);
	if (r*r&lt;Bailout) return 0.0;
	gradient = (vec3(escapeLength(p+xDir*EPS), escapeLength(p+yDir*EPS), escapeLength(p+zDir*EPS))-r)/EPS;
	return 0.5*r*log(r)/length(gradient);
}
</pre>
<p>Notice the use of the &#8216;last&#8217; variable to ensure that all escapeLength&#8217;s are evaluated at the same iteration count. Also notice that &#8216;gradient&#8217; is a global varible &#8211; this is because we can reuse the normalized gradient as an approximation for our surface normal and save some calculations.</p>
<p>The approach above is used in both Mandelbulber and Mandelbulb 3D for the cases where no analytical solution is known. On Fractal Forums it is usually refered to as the Makin/Buddhi 4-point Delta-DE formula.</p>
<p><img src="http://blog.hvidtfeldts.net/media/mbulb5.jpg" /></p>
<h2>The potential gradient approximation</h2>
<p>Now we need to step back and take a closer look at the origin of the Mandelbrot distance estimation formula. There is a lot of confusion about this formula, and unfortunately I cannot claim to completely understand all of this myself. But I&#8217;m slowly getting to understand bits of it, and want to share what I found out so far:</p>
<p>Let us start by the original Hart <a href="http://dl.acm.org/citation.cfm?id=74363">paper</a>, which introduced the distance estimation technique for 3D fractals. Hart does not derive the distance estimation formula himself, but notes that:</p>
<p><img src="http://blog.hvidtfeldts.net/media/hart1.png" /></p>
<p>Now, I haven&#8217;t talked about this potential function, G(z), that Hart mentions above, but it is possible to define a potential with the properties that G(Z)=0 inside the Mandelbrot set, and positive outside. This is the first thing that puzzled me: since G(Z) tends toward zero near the border, the &#8220;log G(Z)&#8221; term, and hence the entire term will become negative! As it turns out, the &#8220;log&#8221; term in the Hart paper <em>is wrong</em>. (And also notice that his formula (8) is wrong too &#8211; he must take the norm of complex function f(z) inside the log function &#8211; otherwise the distance will end up being complex too)</p>
<p>In <a href="http://www.amazon.com/Science-Fractal-Images-Heinz-Otto-Peitgen/dp/0387966080">The Science of Fractal Images</a> (which Hart refers to above) the authors arrive at the following formula, which I believe is correct:</p>
<p><img src="http://blog.hvidtfeldts.net/media/science1.png" /></p>
<p>Similar, in <a href="http://www.evl.uic.edu/hypercomplex/html/book/book.pdf">Hypercomplex Iterations</a> the authors arrive at the same formula:</p>
<p><img src="http://blog.hvidtfeldts.net/media/hyper1.png" /></p>
<p>But notice that formula (3.17) <b>is wrong here</b>! I strongly believe it misses a factor two (in their derivation they have \(sinh(z) \approx \frac{z}{2}\) for small z &#8211; but this is not correct: \(sinh(z) \approx z\) for small z).</p>
<p>The approximation going from (3.16) to (3.17) is only valid for points close to the boundary (where G(z) approaches zero). This is no big problem, since for points far away we can restrict the maximum DE step, or put the object inside a bounding box, which we intersect before ray marching.</p>
<p>It can be shown that \(|Z_n|^{1/2^n} \to 1\) for \(n \to \infty\). By using this we end up with our well-known formula for the lower bound from above (in a slightly different notation):</p>
<p><strong>(1)</strong>&nbsp;&nbsp;\(DE=0.5*ln(r)*r/dr\), </p>
<p>Instead of using the above formula, we can work directly with the potential G(z). For \(n \to \infty\), G(z) may be approximated as \(G(z)=log(|z_n|)/power^n\), where &#8216;power&#8217; is the polynomial power (8 for Mandelbulb). (This result can be found in e.g. Hypercomplex Iterations p. 37 for quadratic functions)</p>
<p>We will approximate the length of G&#8217;(z) as a numerical gradient again. This can be done using the following code:</p>
<pre>
float potential(in vec3 pos)
{
	vec3 z = pos;
	for(int i=1; i&lt;Iterations; i++ )
	{
 		z = BulbPower(z, Power) + pos;
		if (dot(z,z) > Bailout) return log(length(z))/pow(Power,float(i));
	}
	return 0.0;
}

float DE(vec3 p) {
	float pot = potential(p);
	if (pot==0.0) return 0.0;
	gradient = (vec3(potential(p+xDir*EPS), potential(p+yDir*EPS), potential(p+zDir*EPS))-pot)/EPS;
	return (0.5/exp(pot))*sinh(pot)/length(gradient);
}
</pre>
<p>Notice, that this time we do not have to evaluate the potential for the same number of iterations. And again we can store the gradient and reuse it as a surface normal (when normalized).</p>
<p><img src="http://blog.hvidtfeldts.net/media/m3d5.jpg" /><br />
<em>A variant using Subblue&#8217;s <a href="http://www.subblue.com/projects/mandelbulb">radiolari</a> tweak</em></p>
<p><strong>Quilez&#8217; Approximation</strong></p>
<p>I arrived at the formula above after reading Iñigo Quilez&#8217; <a href="http://www.iquilezles.org/www/articles/mandelbulb/mandelbulb.htm">post</a> about the Mandelbulb. There are many good tips in this post, including a fast trigonometric version, but for me the most interesting part was his DE approach: Quilez used a potential based DE, defined as:</p>
<p>\(DE(z) = \frac{G(z)}{|G&#8217;(z)|} \)<br />
&nbsp;<br />
This puzzled me, since I couldn&#8217;t understand its origin. Quilez offers an explanation in <a href="http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8505/#msg8505">this blog post</a>, where he arrives at the formula by using a linear approximation of G(z) to calculate the distance to its zero-region. I&#8217;m not quite sure, why this approximation should be justified, but it seems a bit like an example of <a href="http://en.wikipedia.org/wiki/Newton%27s_method">Newtons method</a> for root finding. Also, as Quilez himself notes, he is missing a factor 1/2.</p>
<p>But if we start out by formula (3.17) above, and notes that \(sinh(G(z)) \approx G(z)\) for small G(z) (near the fractal boundary) , and that \(|Z_n|^{1/2^n} \to 1\) for \(n \to \infty\) we arrive at:</p>
<p>\(DE(z) = 0.5*\frac{G(z)}{|G&#8217;(z)|} \)<br />
&nbsp;<br />
(And notice that the same two approximations are used when arriving at our well-known formula (1) at the top of the page).</p>
<p>Quilez&#8217; method can be implemented using the previous code example and replacing the DE return value simply by:</p>
<pre>
return 0.5*pot/length(gradient);
</pre>
<p>If you wonder how these different methods compare, here are some informal timings of the various approaches (parameters were adjusted to give roughly identical appearances):</p>
<p>Sinh Potential Gradient (my approach)			<strong>1.0x</strong><br />
Potential Gradient (Quilez)                             <strong>1.1x</strong><br />
Escape Length Gradient (Makin/Buddhi)			<strong>1.1x</strong><br />
Analytical				                <strong>4.1x</strong></p>
<p>The three first methods all use a four-point numerical approximation of the gradient. Since this requires four calls to the iterative function (which is where most of the computational time is spent), they are around four times slower than the analytical solution, that only uses one evaluation.</p>
<p>My approach is slightly slower than the other numerical approaches, but is also less approximated than the others. The numerical approximations do not behave in the same way: the Makin/Buddhi approach seems more sensible to choosing the right EPS size in the numerical approximation of the gradient.</p>
<p>As to which function is best, this requires some more testing on various systems. My guess is, that they will provide somewhat similar results, but this must be investigated further.</p>
<p><img src="http://blog.hvidtfeldts.net/media/m3d4.jpg" /><br />
<em>The Mandelbulb can also be drawn as a Julia fractal.</em></p>
<h2>Some final notes about Distance Estimators</h2>
<p><strong>Mathematical justification</strong>: first note, that the formulas above were derived for <em>complex mathematics</em> and <em>quadratic systems</em> (and extended to Quaternions and some higher-dimensional structures in Hypercomplex Iterations). These formulas were never proved for exotic stuff like the Mandelbulb triplex algebra or similar constructs. The derivations above were included to give a hint to the origin and construction of these DE approximations. To truly understand these formula, I think the original papers by Hubbard and Douady, and the works by John Willard Milnor should be consulted &#8211; unfortunately I couldn&#8217;t find these online. Anyway, I believe a rigorous approach would require the attention of someone with a mathematical background. </p>
<p><strong>Using a lower bound as a distance estimator</strong>. The formula (3.17) above defines lower and upper bounds for a given point to the boundary of the Mandelbrot set. Throughout this entire discussion, we have simply used the lower bound as a distance estimate. <em>But a lower bound is not good enough as a distance estimate</em>. This can easily be realized since 0 is always a lower bound of the true distance. In order for our sphere tracing / ray marching approach to work, the lower bound must converge towards to the true distance, as it approaches zero! In our case, we are safe, because we also have an upper bound which is four times the lower bound (in the limit where the exp(G(z)) term disappears). Since the true distance must be between the lower and upper bound, the true distance converges towards the lower bound, as the lower bound get smaller. </p>
<p><strong>DE&#8217;s are approximations</strong>. All our DE formulas above are only approximations &#8211; valid in the limit \(n \to \infty\), and some also only for point close to the fractal boundary. This becomes very apparent when you start rendering these structures &#8211; you will often encounter noise and artifacts. Multiplying the DE estimates by a number smaller than 1, may be used to reduce noise (this is the Fudge Factor in Fragmentarium). Another common approach is to oversample &#8211; or render images at large sizes and downscale.</p>
<p><strong>Future directions</strong>. There is much more to explore and understand about Distance Estimators. For instance, the methods above use four-point numerical gradient estimation, but perhaps the primary camera ray marching could be done using directional derivatives (two point delta estimation), and thus save the four-point sampling for the non-directional stuff (AO, soft shadows, normal estimation). Automatic differentation with dual numbers (as noted in <a href="http://blog.hvidtfeldts.net/index.php/category/distance-estimation/">post II</a>) may also be used to avoid the finite difference gradient estimation. It would be nice to have a better understanding of why the scalar gradients work.</p>
<p><em><a href="http://blog.hvidtfeldts.net/index.php/2011/11/distance-estimated-3d-fractals-vi-the-mandelbox/">The next blog post</a> discusses the Mandelbox fractal.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hvidtfeldts.net/index.php/2011/09/distance-estimated-3d-fractals-v-the-mandelbulb-different-de-approximations/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Distance Estimated 3D Fractals (IV): The Holy Grail</title>
		<link>http://blog.hvidtfeldts.net/index.php/2011/09/distance-estimated-3d-fractals-iv-the-holy-grail/</link>
		<comments>http://blog.hvidtfeldts.net/index.php/2011/09/distance-estimated-3d-fractals-iv-the-holy-grail/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 20:47:48 +0000</pubDate>
		<dc:creator>Mikael Hvidtfeldt Christensen</dc:creator>
				<category><![CDATA[Folding]]></category>
		<category><![CDATA[Fractals]]></category>
		<category><![CDATA[Fragmentarium]]></category>
		<category><![CDATA[Mandelbulb]]></category>

		<guid isPermaLink="false">http://blog.hvidtfeldts.net/?p=1134</guid>
		<description><![CDATA[Previous posts: part I, part II, and part III. Despite its young age, the Mandelbulb is probably the most famous 3D fractal in existence. This post will examine how we can create a Distance Estimator for it. But before we &#8230; <a href="http://blog.hvidtfeldts.net/index.php/2011/09/distance-estimated-3d-fractals-iv-the-holy-grail/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Previous posts: <a href="http://blog.hvidtfeldts.net/index.php/2011/06/distance-estimated-3d-fractals-part-i/">part I</a>, <a href="http://blog.hvidtfeldts.net/index.php/2011/08/distance-estimated-3d-fractals-ii-lighting-and-coloring/">part II</a>, and <a href="http://blog.hvidtfeldts.net/index.php/2011/08/distance-estimated-3d-fractals-iii-folding-space/">part III</a>.</p>
<p>Despite its young age, the Mandelbulb is probably the most famous 3D fractal in existence. This post will examine how we can create a Distance Estimator for it. But before we get to the Mandelbulb, we will have to step back and review a bit of the history behind it. </p>
<h2>The Search for the Holy Grail</h2>
<p>The original Mandelbrot fractal is a two dimensional fractal based on the convergence properties of a series of complex numbers. The formula is very simple: for any complex number <em>z</em>, check whether the sequence iteratively defined by \(z_{n+1} = z_{n}^2+c\)  diverges or not. The Mandelbrot set is defined as the set of points which do not diverge, that is, the points with a series that stays bounded within a given radius. The results can be depicted in the complex plane.</p>
<p>The question is how to extend this to three dimensions. The Mandelbrot set fits two dimensions, because complex numbers have two components. Can we find a similar number system for three dimensions?</p>
<p>The Mandelbrot formula involves two operations: adding numbers, and squaring them. Creating a n-component number where addition is possible is easy. This is what mathematicians refer to as a <a href="http://en.wikipedia.org/wiki/Vector_space">vector space</a>. Component-wise addition will do the trick, and seems like the logical choice.</p>
<p>But the Mandelbrot formula also involves squaring a number, which requires a multiplication operator (a vector product) on the vector space. A vector space with a (bilinear) vector product is called an <a href="http://en.wikipedia.org/wiki/Algebra_over_a_field">algebra over a field</a>. The numbers in these kind of vector spaces are often called <a href="http://en.wikipedia.org/wiki/Hypercomplex_number">hypercomplex numbers</a>. </p>
<p>To see why a three dimensional number system might be problematic, let us try creating one. We could do this by starting out with the complex numbers and introduce a third component, <em>j</em>. We will try to keep as many as possible of the characteristic properties of the complex and real numbers, such as distributivity, \(a*(b+c)=(a*b)+(a*c)\), and commutativity, \(a*b=b*a\). If we assume distributivity, we only need to specify how the units of the three components multiply. This can be illustrated in a multiplication table. Since we also assumed commutativity, such a table must be symmetric:</p>
<p>\(<br />
\begin{bmatrix}<br />
  &#038; \boldsymbol{1} &#038; \boldsymbol{i} &#038; \boldsymbol{j} \\<br />
\boldsymbol{1} &#038; 1 &#038; i &#038; j \\<br />
\boldsymbol{i} &#038; i &#038; -1 &#038; ?\\<br />
\boldsymbol{j} &#038; j &#038;  ? &#038; ?<br />
\end{bmatrix}<br />
\)<br />
&nbsp;<br />
For a well-behaved number system, anything multiplied by 1 is still one, and if we now require the real and imaginary components to behave as for the complex numbers, we only have three components left &#8211; the question marks in the matrix. I&#8217;ve rendered out a few of the systems, I encountered while trying arbitrary choices of the missing numbers in the matrix:</p>
<p><img src="http://blog.hvidtfeldts.net/media/m3d1.jpg" /></p>
<p><img src="http://blog.hvidtfeldts.net/media/m3d2.jpg" /></p>
<p><img src="http://blog.hvidtfeldts.net/media/m3d3.jpg" /></p>
<p>(Many people have explored various 3D component multiplication tables &#8211; see for instance <a href="http://www.bugman123.com/Hypercomplex/index.html">Paul Nylander&#8217;s Hypercomplex systems</a> for more examples).</p>
<p>Unfortunately, our toy system above fails to be associative (i.e. it is not always true, that \(a*(b*c) = (a*b)*c\)), as can be seen by looking at the equation \(i*(i*j) = (i*i)*j \Rightarrow i*x = -j\), which can not be satisfied no matter how we choose <em>x</em>. </p>
<p>It turns out that it is difficult to create a consistent number system in three dimensions. There simply is no natural choice. In fact, if we required that our number system allowed for a division operator, there is <a href="http://en.wikipedia.org/wiki/Normed_division_algebra">a theorem</a> stating that only four such mathematical spaces</a> are possible: the real numbers (1D), the complex numbers (2D), the <a href="http://en.wikipedia.org/wiki/Quaternion">quaternions</a> (4D) and the <a href="http://en.wikipedia.org/wiki/Octonion">octonions</a> (8D). But no 3D systems.</p>
<p>But what about the 4D Quaternions? Back in 1982, Alan Norton published a <a href="http://dl.acm.org/citation.cfm?id=801263&#038;dl=ACM&#038;coll=DL&#038;CFID=40759164&#038;CFTOKEN=98363799">paper</a> showing a Quaternion Julia set made by displaying a 3D &#8220;slice&#8221; of the 4D space. Here is an example of a Quaternion Julia fractal:</p>
<p><img src="http://blog.hvidtfeldts.net/media/q11.jpg" /></p>
<p>Of course, in order to visualize a 4D object, you have to make some kind of dimensional reduction. The most common approach is to make a 3D cross-section, by simply keeping one of the four components at a fixed value.</p>
<p>If you wonder why you never see a Quaternion Mandelbrot image, the reason is simple. It is not very interesting because of its axial symmetry:</p>
<p><img src="http://blog.hvidtfeldts.net/media/q2.jpg" /></p>
<p>If you, however, make a rotation inside the iteration loop, you can get something more like a 3D Mandelbrot.</p>
<p><img src="http://blog.hvidtfeldts.net/media/q3.jpg" /></p>
<p>The Quaternion system (and the 3D hypercomplex systems above) are defined exactly as the 2D system &#8211; by checking if \(z_{n+1} = z_{n}^2+c\) converges or not. </p>
<p>But how do we draw a 3D image of these fractals? In contrast to the 2D case, where it is possible to build a 2D grid, and check inside each cell, building a 3D grid and checking each cell would be far too memory and time consuming for images in any decent resolution.</p>
<h2>A distance estimator for quadratic systems.</h2>
<p>While Alan Norton used a different rendering approach, a very elegant solution to this was found by John Hart <i>et al</i> in a <a href="http://dl.acm.org/citation.cfm?id=74363">1989 paper</a>: distance estimated rendering. As discussed in the previous posts, distance estimated rendering requires that we are able to calculate a lower bound to the distance from every point in space to our fractal surface! A first, this might seem impossible. But it turns out such a formula already was known for the 2D Mandelbrot set. A distance estimate can be found as:</p>
<p><strong>(1)</strong>&nbsp;&nbsp;&nbsp;\(DE=0.5*ln(r)*r/dr\)<br />
&nbsp;<br />
Where &#8216;r&#8217; is the escape time length, and &#8216;dr&#8217; is the length of the running derivative. (The approximation is only exact in the limit where the number of iterations goes to infinity)</p>
<p>In order to define what we mean by the running derivative, we need a few extra definitions. For Mandelbrot sets, we study the sequence \(z_{n+1} = z_{n}^2+c\) for each point <em>c</em>. Let us introduce the function \(f_n(c)\), defined as the n&#8217;th entry for the sequence for the point <em>c</em>. By this definition, we have the following defining formula for the Mandelbrot set:</p>
<p>\(f_n(c) = f_{n-1}^2(c) + c,  f_0(c) = 0\)<br />
&nbsp;<br />
Deriving this function with respect to <em>c</em>, gives</p>
<p><strong>(2)</strong>&nbsp;&nbsp;&nbsp;\(f&#8217;_n(c) = 2f_{n-1}(c)f&#8217;_{n-1}(c)+1\)&nbsp;&nbsp;&nbsp;(for Mandelbrot formula)<br />
 &nbsp;<br />
Similar, the Julia set is defined by choosing a fixed constant, <em>d</em>, in the quadratic formula, using <em>c</em> only as the first entry in our sequence:</p>
<p>\(f_n(c) = f_{n-1}^2(c) + d,  f_0(c) = c\)<br />
&nbsp;<br />
Deriving this function with respect to <em>c</em>, gives</p>
<p><strong>(3)</strong>&nbsp;&nbsp;&nbsp;\(f&#8217;_n(c) = 2f_{n-1}(c)f&#8217;_{n-1}(c)\)&nbsp;&nbsp;&nbsp;(for Julia set formula)<br />
&nbsp;<br />
which is almost the same result as for the Mandelbrot set, except for unit term. And now we can define the length of \(f_n\), and the running derivative \(f&#8217;_n\):<br />
&nbsp;<br />
\(r = |f_n(c)|\) and \(dr = |f&#8217;_n(c)|\)<br />
&nbsp;<br />
used in the formula (1) above. This formula was found by Douady and Hubbard in a 1982 paper (<a href="http://www.math.cornell.edu/~hubbard/OrsayEnglish.pdf">more info</a>).</p>
<p><img src="http://blog.hvidtfeldts.net/media/juliade.png" /><br />
<em>2D Julia set rendered using a distance estimator approach. This makes it possible to emphasize details, without having to use extensive oversampling.</em></p>
<p>Due to a <a href="http://www.undermyhat.org/blog/2009/07/sudden-empty-blank-page-for-large-posts-with-wordpress/">constraint</a> in WordPress, this post has reached its maximum length. The <a href="http://blog.hvidtfeldts.net/index.php/2011/09/distance-estimated-3d-fractals-v-the-mandelbulb-different-de-approximations/">next post</a> continues the discussion, and shows how the formula above can be used for other types of fractals than the 2D Mandelbrot.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hvidtfeldts.net/index.php/2011/09/distance-estimated-3d-fractals-iv-the-holy-grail/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hybrid 3D Fractals</title>
		<link>http://blog.hvidtfeldts.net/index.php/2011/03/hybrid-3d-fractals/</link>
		<comments>http://blog.hvidtfeldts.net/index.php/2011/03/hybrid-3d-fractals/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 20:41:24 +0000</pubDate>
		<dc:creator>Mikael Hvidtfeldt Christensen</dc:creator>
				<category><![CDATA[Fractals]]></category>
		<category><![CDATA[Fragmentarium]]></category>
		<category><![CDATA[Kaleidoscopic IFS]]></category>
		<category><![CDATA[Mandelbulb]]></category>

		<guid isPermaLink="false">http://blog.hvidtfeldts.net/?p=964</guid>
		<description><![CDATA[A lot of great images have been made of the Mandelbulb, the Mandelbox, and the various kaleidoscopic IFS&#8217;s (the non-platonic non-solids). And it turns out that by combining these formulas (and stirring a few assorted functions into the mix), a &#8230; <a href="http://blog.hvidtfeldts.net/index.php/2011/03/hybrid-3d-fractals/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A lot of great images have been made of the Mandelbulb, the Mandelbox, and the various kaleidoscopic IFS&#8217;s (the non-platonic non-solids). And it turns out that by combining these formulas (and stirring a few assorted functions into the mix), a variety of new, amazing, and surprising forms emerge.</p>
<p>I&#8217;m currently working on making it easier to combine different formulas in Fragmentarium &#8211; but until I get something released, here is a collection of images and movies created by <a href="http://www.fractalforums.com/index.php?action=downloads;cat=5">Mandelbulb 3D</a> (Windows, free) and <a href="http://sourceforge.net/projects/mandelbulber/">Mandelbulber</a> (Windows, free, open-source), that illustrates the beauty and diversity of these hybrid systems. Be sure to view the large versions by following the links. The images were all found at <a href="http://www.fractalforums.com/gallery/">Fractal Forums</a>.</p>
<h2>Videos</h2>
<p><iframe title="YouTube video player" width="400" height="310" src="http://www.youtube.com/embed/Tj6rip3G62Y" frameborder="0" allowfullscreen></iframe><br />
Buddhi &#8211; Mandelbox and Flying Lights</p>
<p><iframe title="YouTube video player" width="400" height="310" src="http://www.youtube.com/embed/APsLfpfDGOI" frameborder="0" allowfullscreen></iframe><br />
Jérémie Brunet (Bib) &#8211; Weird Planet II</p>
<p><iframe title="YouTube video player" width="400" height="310" src="http://www.youtube.com/embed/bKknJvZIn24" frameborder="0" allowfullscreen></iframe><br />
Jérémie Brunet (Bib) &#8211; Like in a dream II</p>
<h2>Images</h2>
<p><a href="http://www.fractalforums.com/gallery/pray-your-gods/msg28739/#msg28739<br />
M3D<br />
"><img src="http://blog.hvidtfeldts.net/media/pray.jpg" /></a><br />
Lenord &#8211; <a href="http://www.fractalforums.com/gallery/pray-your-gods/msg28739/#msg28739<br />
M3D<br />
">Pray your Gods</a></p>
<p><a href="http://www.fractalforums.com/gallery/its-a-jungle-out-there/msg30290/#msg30290"><img src="http://blog.hvidtfeldts.net/media/jungle.jpg" /></a><br />
Tomot &#8211; <a href="http://www.fractalforums.com/gallery/its-a-jungle-out-there/msg30290/#msg30290">It&#8217;s a jungle out there</a></p>
<p><a href="http://www.fractalforums.com/gallery/j-a-r/msg29225/#msg29225<br />
"><img src="http://blog.hvidtfeldts.net/media/jar.jpg" /></a><br />
Lenord &#8211; <a href="http://www.fractalforums.com/gallery/j-a-r/msg29225/#msg29225<br />
">J.A.R.</a></p>
<p><a href="http://www.fractalforums.com/gallery/security-mechanisms/msg29523/#msg29523<br />
"><img src="http://blog.hvidtfeldts.net/media/sec.jpg" /></a><br />
MarkJayBee &#8211; <a href="http://www.fractalforums.com/gallery/security-mechanisms/msg29523/#msg29523<br />
">Security Mechanisms</a></p>
<p><a href="http://www.fractalforums.com/gallery/alien-stones/msg27854/#msg27854"><img src="http://blog.hvidtfeldts.net/media/alien.jpg" /></a><br />
Fractal00 &#8211; <a href="http://www.fractalforums.com/gallery/alien-stones/msg27854/#msg27854">Alien Stones</a></p>
<p><a href="http://www.fractalforums.com/gallery/off-center/?prev_next=next#new"><img src="http://blog.hvidtfeldts.net/media/kro.jpg" /></a><br />
Kr0mat1k &#8211; <a href="http://www.fractalforums.com/gallery/off-center/?prev_next=next#new">Restructuration</a></p>
<p><a href="http://www.fractalforums.com/gallery/jlchen/msg29401/#msg29401<br />
"><img src="http://blog.hvidtfeldts.net/media/jul.jpg" /></a><br />
BrutalToad &#8211; <a href="http://www.fractalforums.com/gallery/jlchen/msg29401/#msg29401<br />
">Jülchen</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hvidtfeldts.net/index.php/2011/03/hybrid-3d-fractals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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 Hvidtfeldt 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 &#8230; <a href="http://blog.hvidtfeldts.net/index.php/2010/06/folding-space-ii-kaleidoscopic-fractals/">Continue reading <span class="meta-nav">&#8594;</span></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>A Few Links</title>
		<link>http://blog.hvidtfeldts.net/index.php/2010/05/a-few-links/</link>
		<comments>http://blog.hvidtfeldts.net/index.php/2010/05/a-few-links/#comments</comments>
		<pubDate>Wed, 05 May 2010 21:12:49 +0000</pubDate>
		<dc:creator>Mikael Hvidtfeldt Christensen</dc:creator>
				<category><![CDATA[Generative Art]]></category>
		<category><![CDATA[Mandelbulb]]></category>
		<category><![CDATA[Mathematical Art]]></category>

		<guid isPermaLink="false">http://blog.hvidtfeldts.net/?p=487</guid>
		<description><![CDATA[&#8230;some old, some new. The Demoscene It was only a matter of time, before a Mandelbox would show up on the Demoscene: Hochenergiephysik by Still is a 4K demo, featuring the Mandelbox. If 4KB sounds bloated, Still has also created &#8230; <a href="http://blog.hvidtfeldts.net/index.php/2010/05/a-few-links/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8230;some old, some new.</p>
<h2>The Demoscene</h2>
<p>It was only a matter of time, before a Mandelbox would show up on the Demoscene:</p>
<p><a href="http://www.pouet.net/prod.php?which=54917&#038;howmanycomments=-1"><img src="http://blog.hvidtfeldts.net/media/hoch.jpg" /></a></p>
<p><a href="http://www.pouet.net/prod.php?which=54917&#038;howmanycomments=-1">Hochenergiephysik</a> by Still is a 4K demo, featuring the Mandelbox. If 4KB sounds bloated, Still has also created a 1K demo: <a href="http://pouet.net/prod.php?which=54812">Futurism</a> by Still.</p>
<p>And while we are at it, may I suggest these as well: <a href="http://www.youtube.com/watch?v=lG-g1l0FtDM&#038;feature=channel">The Cube</a> by Farbrausch, <a href="http://www.youtube.com/watch?v=k_oTQd93eRI">Rove</a> by Farbraush, and <a href="http://www.youtube.com/watch?v=ON4N0yGz4n8">Agenda Circling Forth</a> by Fairlight &#038; Cncd.</p>
<h2>New software</h2>
<p>NodeBox 2.0 is out in a <a href="http://beta.nodebox.net/">beta version</a>. The big news is that it is now available for Windows. It also sports a graph-based GUI for patching nodes together.</p>
<p><a href="http://news.deviantart.com/article/105035/">Tacitus</a> is a GUI for creating per-pixel GPU effects. In concept it is similar to Pixel Bender. It has a very nice look and feel, but a big short-coming is that it is not possible to directly edit the GPU scripts in the GUI &#8211; you have to compile your script to a plugin via an included compiler. Another feature I miss, is the ability to directly navigate the camera using the mouse on the viewport, instead of using sliders (something Pixel Bender also doesn&#8217;t support). But Tacitus is still in beta, and it will be interesting to see where it is going. It comes with a single plugin, a port of Subblue&#8217;s Mandelbulb Pixel Bender plugin. Tacitus is Windows only.</p>
<p><a href="http://www.neuro-systems.net/documents/substance.html"><img src="http://blog.hvidtfeldts.net/media/substance.jpg" /></a></p>
<p>NeuroSystems <a href="http://www.neuro-systems.net/documents/substance.html">Substance</a> is an &#8216;Evolutionary and Organic Art Creator&#8217;. Some interesting concepts here, including a real-time global illumination raytracer (video <a href="http://www.youtube.com/watch?v=PA7bqh3hTwc&#038;feature=player_embedded">here</a>). Unfortunately, the raytracer is not part of the free viewer. Surprisingly, NeuroSystems impressive visualization technology seems to originate from <a href="http://www.neuro-systems.net/documents/simplant.html">SIMPLANT</a>, a real-time 3D breast implant simulator. Substance is Windows only, and the full (non-free) versions should be released very soon.</p>
<h2>Gifts for Geeks</h2>
<p><a href="http://scientificsonline.com/product.asp_Q_pn_E_3151544"><img src="http://blog.hvidtfeldts.net/media/calabi.jpg" /></a></p>
<p>A <a href="http://scientificsonline.com/product.asp_Q_pn_E_3151544">Calabi-Yau Manifold Crystal</a> sculpture.</p>
<p><center><a href="http://www.gomboc-shop.com/"><img src="http://blog.hvidtfeldts.net/media/gomboc.jpg" /></a></center><br />
<br />
A <a href="http://www.gomboc-shop.com/">Gömböc</a>. &#8220;The &#8216;Gömböc&#8217; is the first known homogenous object with one stable and one unstable equilibrium point, thus two equilibria altogether on a horizontal surface. It can be proven that no object with less than two equilibria exists.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hvidtfeldts.net/index.php/2010/05/a-few-links/feed/</wfw:commentRss>
		<slash:comments>0</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 Hvidtfeldt 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 &#8230; <a href="http://blog.hvidtfeldts.net/index.php/2010/04/the-reality-of-fractals/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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 Hvidtfeldt 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, &#8230; <a href="http://blog.hvidtfeldts.net/index.php/2010/04/folding-space-the-mandelbox-fractal/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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>3</slash:comments>
		</item>
		<item>
		<title>Shader Toy</title>
		<link>http://blog.hvidtfeldts.net/index.php/2010/02/shader-toy/</link>
		<comments>http://blog.hvidtfeldts.net/index.php/2010/02/shader-toy/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 21:39:47 +0000</pubDate>
		<dc:creator>Mikael Hvidtfeldt Christensen</dc:creator>
				<category><![CDATA[Generative Art]]></category>
		<category><![CDATA[GPU]]></category>
		<category><![CDATA[Mandelbulb]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://blog.hvidtfeldts.net/?p=343</guid>
		<description><![CDATA[For some time I&#8217;ve been wanting to play around with pixel (fragment) shaders, but I couldn&#8217;t find a proper playground. Then I stumbled upon Shader Toy, by Inigo Quilez (whom I&#8217;ve mentioned several times on this blog). A couple of &#8230; <a href="http://blog.hvidtfeldts.net/index.php/2010/02/shader-toy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For some time I&#8217;ve been wanting to play around with pixel (fragment) shaders, but I couldn&#8217;t find a proper playground.</p>
<p>Then I stumbled upon <a href="http://www.iquilezles.org/apps/shadertoy/">Shader Toy</a>, by Inigo Quilez (whom I&#8217;ve mentioned <a href="http://blog.hvidtfeldts.net/?s=inigo">several times</a> on this blog). A couple of things make Shader Toy stand out:</p>
<p><img src="/media/st1.jpg" /></p>
<p><i>It runs inside your browser</i>. It uses the emerging <a href="http://en.wikipedia.org/wiki/WebGL">WebGL</a> standard, which is JavaScript bindings for OpenGL (ES) 2.0. OpenGL can be used directly inside a Canvas HTML element, including support for custom shaders. As Shader Toy demonstrates, this makes it possible to do some very impressive stuff, such as real-time GPU-accelerated raytracing inside an element on a web page. </p>
<p><img src="/media/st2.jpg" /></p>
<p><i>The examples are great</i>. While Shader Toy itself is mostly a thin wrapper around the WebGL functionality, the great thing about it is the example shaders: 2D fractals and Demo Scene effects, but also complex examples like the <a href="http://blog.hvidtfeldts.net/index.php/2008/08/generative-art-in-4kb/">Slisesix</a> 4K demo, and examples of raytracing, and complex fractals, like the Quaternion Julia set, and the Mandelbulb.</p>
<p>The only problem with WebGL is, that it is not supported by the current generation of browsers. </p>
<p>The good news is that the nightly builds of Firefox, Safari (WebKit), and Chromium (Google Chrome) all support it, and are quite easy to install: <a href="http://www.khronos.org/webgl/wiki/Getting_a_WebGL_Implementation">this</a> is a good place for more information. If you use the Chromium builds, you don&#8217;t have to worry about messing up your existing browser configuration &#8211; the nightly builds are standalone versions and can be run without installation.</p>
<p>There are lots of complex shader tools out there: for instance, NVIDIAs <a href="http://developer.nvidia.com/object/fx_composer_home.html">FX Composer</a>, AMDs <a href="http://developer.amd.com/GPU/RENDERMONKEY/Pages/default.aspx">Rendermonkey</a>, TyphoonLabs OpenGL <a hreg="http://www.opengl.org/sdk/tools/ShaderDesigner/">Shader Designer</a>, and <a href="http://lumina.sourceforge.net/">Lumina</a>, but Shader Toy makes it very easy to get started with shaders. And it provides a rare insight into how those amazing 4K demos were made.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hvidtfeldts.net/index.php/2010/02/shader-toy/feed/</wfw:commentRss>
		<slash:comments>0</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 Hvidtfeldt 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 &#8230; <a href="http://blog.hvidtfeldts.net/index.php/2009/12/mandelbulb-implementations/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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&#8242;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>
	</channel>
</rss>

