{"id":1610,"date":"2009-09-15T13:23:02","date_gmt":"2009-09-15T21:23:02","guid":{"rendered":"http:\/\/www.rudyrucker.com\/blog\/2009\/09\/15\/in-search-of-the-mandelbulb\/"},"modified":"2009-09-24T10:14:29","modified_gmt":"2009-09-24T18:14:29","slug":"in-search-of-the-mandelbulb","status":"publish","type":"post","link":"https:\/\/www.rudyrucker.com\/blog\/2009\/09\/15\/in-search-of-the-mandelbulb\/","title":{"rendered":"In Search of the Mandelbulb"},"content":{"rendered":"<p> This post is an update about a project I&#8217;ve been working on for twenty years. I recently did some work on it with <em>Mathematica<\/em>, and I&#8217;ve posted my latest version of my work both as a <a target=\"blank\" href=\"https:\/\/www.rudyrucker.com\/blog\/notebooks\/rucker_mandelbulb_ver7_sept24_2009.nb\">Mandelbulb 7 <em>Mathematica <\/em> notebook<\/a>, and as a<a href=\"https:\/\/www.rudyrucker.com\/blog\/notebooks\/rucker_mandelbulb_ver7_sept24_2009.pdf\"> Mandelbulb 7 PDF File<\/a>.  I post these files not so much because I\u2019m finished, but rather because I\u2019m sick of working on it, and I\u2019d like to share the gain and the pain.  This post presents most of the material. <\/p>\n<p>The Mandelbrot set M is defined in terms of a plane map mandelmap[z,c] which takes z into z*z + c.  We add plane points by adding their Cartesian components&#8212;this is easy. Multiplying plane points (in particular computing z times z) is done by pretending the plane points represent complex numbers.   A problem in defining a 3D Mandelbrot set is that there is no good 3D analogue of complex numbers, and therefore there&#8217;s no obvious best way to \u201csquare\u201d\u009d a 3D point (x, y, z).<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rudyrucker.com\/blog\/images2\/bclown.jpg\"><br \/>\n<em>[Bozo the Mandelbrot set!]<\/em><\/p>\n<p> Various other ideas have been tried for finding the platonic 3D bulb, such as using quaternions. The quaternion approach gives taffy-like structures lacking the warty smooth quality we seek.  Daniel White discusses the quest and some of the approaches in his web page about his search for the Mandelbulb.<\/p>\n<p>  What do we want?  A \u201cMandelbulb,\u201d\u009d a root-like object that&#8217; s like a big sphere with a dimple in the bottom and with  bulbs on it, and further warts on the bulbs.  I wrote about this object in my 1987 science-fiction short story \u201c<a target=\"blank\" href=\"https:\/\/www.rudyrucker.com\/pdf\/3dmandelbrotsetstory.pdf\">As Above, So Below<\/a>,\u201d\u009d  which I&#8217;ve just placed online for reference. [Note that this story is not to be confused with my novel of the same name.]  <\/p>\n<p>  <strong>The Cubic Connectedness Map<\/strong><\/p>\n<p> I&#8217;ll mention here as an aside a completely different approach to looking for a 3D Mandelbrot set.  The idea is to take a 3D cross section of a 4D fractal called the Cubic Connectedness Map, which was first investigated by Adrian Douady, John Hubbard and  John Milnor.  <\/p>\n<p>  In a nutshell, if k is a complex number, we define Mk to be the set of complex numbers c such that both k and -k, when plugged in for z, lead to a finitely large sequence of iterates in the map z =  z^3 &#8211; 3*k*z + c.  The set of all Mk in k-c space forms the four-dimensional Cubic Connectedness map or CCM.  <\/p>\n<p> I created some software for finding 2D cross-sections of the Cubic Connectedness map in the Autodesk CHAOS program, see my remarks at <a target=\"blank\" href=\"https:\/\/www.rudyrucker.com\/oldhomepage\/cubic_mandel.htm\">https:\/\/www.rudyrucker.com\/oldhomepage\/cubic_mandel.htm<\/a>  Note that you can download the <a target=\"blank\"  href=\"https:\/\/www.rudyrucker.com\/oldhomepage\/chaos.htm\">Windows CHAOS program <\/a>here as well. <\/p>\n<p>   I think I got the idea for the CCM fractal from the technical papers: Adrian Douady and John Hubbard, \u201c<a target=\"blank\" href=\"http:\/\/archive.numdam.org\/ARCHIVE\/ASENS\/ASENS_1985_4_18_2\/ASENS_1985_4_18_2_287_0\/ASENS_1985_4_18_2_287_0.pdf\">On the Dynamics of Polynomial-like Mappings<\/a> Bodil Branner and John Hubbard,   <a target=\"blank\" href=\"http:\/\/www.math.cornell.edu\/~hubbard\/IterationCubics1.pdf\">The iteration of cubic polynomials Part I<\/a>, and <a target=\"blank\" href=\"http:\/\/www.math.cornell.edu\/~hubbard\/IterationCubics2.pdf\">The iteration of cubic polynomials Part II: Patterns and parapatterns<\/a> .  Whew!<\/p>\n<p> Another of the surprisingly few links on this rich topic is an article by the Swedish amateur mathematician Ingvar Kullberg, <a target=\"blank\" href=\"http:\/\/klippan.seths.se\/ik\/CubTut\/cubictut.html\">\u201cThe Cubic Tutorial,<\/a>\u201d\u009d concerning a plug-in that generates these images with the popular Ultra Fractal software. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rudyrucker.com\/blog\/images2\/mandelbulb5_sept15_2009_1.gif\"><\/p>\n<p> Shown above is a detail of the Mk you get when k = -0.4055 -0.1135 i. The detail is the image is in the area centered on (0.12, 0.87) in the c plane. I call this guy \u201cFafnir\u201d\u009d after the famous dragon.<\/p>\n<p>  By incrementing up and down through the k parameters, I had gotten the impression that by \u201cstacking\u201d\u009d some of these 2D slices while varying a single real-number parameter, such as the real part of k, we could get a nice 3D Mandelbulb, and I still can&#8217;t quite believe this isn&#8217;t true.  But <a target=\"blank\" href=\"http:\/\/www.bugman123.com\/Hypercomplex\/index.html\">Paul Nylander <\/a>recently rendered a run that looks discouraging. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rudyrucker.com\/blog\/images2\/mandelbulb5_sept15_2009_2.gif\"><\/p>\n<p> I still have some slight hope that Paul&#8217;s rendering algorithm might be in some way not be quite what we want, or that, perhaps we need to do something other than simple stacking of 2D cross-sections in order to find the Mandelbulb within the CCM.<\/p>\n<p>By the way, another great math-graphics hacker <a target=\"blank\" href=\"http:\/\/williamrood.net\/\">Billy Rood<\/a> had a shot at this &#8220;stacking&#8221; algorithm, also without being able to find the Mandelbulb we&#8217;d hoped for. <\/p>\n<p>  <strong>A Spherical Coordinates Algorithm<\/strong><br \/>\nA different way of thinking of complex number multiplication is to express (x,y) in polar coordinates (norm,theta).  In these coordinates, multiplying two complex numbers means multiplying their norm-values and adding their thetas.  This is readily generalized to traditional 3D spherical coordinates.  A point can be represented by a triple (norm,theta,phi), where phi is the azimuth elevation above the xy plane, and theta is the polar theta of the point&#8217;s projection onto  the xy plane.  And then multiplying two of these numbers means multiplying their norm-values, adding their thetas, and adding their phis.<\/p>\n<p> So squaring a complex number in the plane passes from (r, theta) to (r*r, 2 theta).  And in spherical 3D coordinates, (r, theta, phi) becomes (r*r, 2 theta, 2 phi).  This is an idea I spent a little time on in 1988, and recently I came back to it again. Details are in that <em>Mathematica <\/em> Mandelbulb Version 5 notebook of mine I mentioned at the start of this post.   One encouraging thing about this approach is that we can be sure that the set we get will have a familiar Mandelbrot set as its intersections with both the xy plane and the xz plane&#8230;for in the xy plane, phi is identically zero; and in the zy plane, theta is identically zero. <\/p>\n<p>Here\u2019s a test run, done by crudely splitting space up into voxels and marking the spots that are inside the intended Mandelbulb. <\/p>\n<p >\n <img decoding=\"async\" src=\"https:\/\/www.rudyrucker.com\/blog\/images2\/mandelbulb5_sept15_2009_5.gif\"><\/p>\n<p>   In 2007, a similar approach was used by Daniel White, who posted about his search for a nice  3D Mandelbrot shape on <a target=\"blank\"  href=\"http:\/\/www.skytopia.com\/project\/fractal\/mandelbrot.html\">his website<\/a>  mentioned above,   and on the <a target=\"blank\" href=\"http:\/\/www.fractalforums.com\/3d-fractal-generation\/true-3d-mandlebrot-type-fractal\/msg4109\/?PHPSESSID=e16569e0fdbf61cb290d61d04a9c0896#msg4109\">fractalforums site<\/a><a target=\"blank\" href=\"http:\/\/www.fractalforums.com\/3d-fractal-generation\/true-3d-mandlebrot-type-fractal\/msg4109\/?PHPSESSID=e16569e0fdbf61cb290d61d04a9c0896#msg4109\"><\/a>, a site where the elite meet to geek. <\/p>\n<p> And White coined the world \u201cMandelbulb\u201d\u009d for the image we seek. <\/p>\n<p> As I mentioned, the gifted computerist Paul Nylander blogs about \u201chypercomplex fractals\u201d\u009d at <a target=\"blank\" href=\"http:\/\/www.bugman123.com\/Hypercomplex\/index.html\">his Bugman site<\/a>.   Here he shows a rendered image of a White Mandelbulb that, as White already noted, doesn&#8217;t  look like the smooth bulbous shape we&#8217;d dreamed of.  It&#8217;s close, but it has the taffy\/whipped-cream\/spun-glass excrescences that we want to sand away.<\/p>\n<p>   <img decoding=\"async\" src=\"https:\/\/www.rudyrucker.com\/blog\/images2\/mandelbulb5_sept15_2009_6.gif\"><\/p>\n<p>  <strong>What Next?<\/strong><\/p>\n<p> One problem might be that there&#8217; s an imparity in how we get the two angles, theta and phi, in the spherical coordinates, in that theta is an &#8220;argument&#8221; angle in the xy plane and phi is an azimuth elevation above the xy plane.  They aren&#8217;t really the same types of angles.  So maybe it&#8217; s not surprising that simply doubling those angles doesn&#8217;t produce a smooth bulbous 3 d Mandelbulb.  It would be nice if the angles were more similar in nature. <\/p>\n<p>To make this happen, we might define both angles as azimuths like phi&#8230;or define both angles as arguments like theta, I have a little more about this in that <em>Mathematica <\/em>notebook I mentioned&#8230;but these approaches don&#8217;t seem to work.<\/p>\n<p>Another problem could be that, when we double two angles we&#8217;re in some sense moving the point too violently.  Perhaps you should be multiplying the angles not by two, but by some weighting factors mul1 and mul2 which might depend on whether, say the point is closer to the xy plane or to the xz plane. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rudyrucker.com\/blog\/images2\/popbulge999.jpg\"><\/p>\n<p>Meanwhile&#8230;we\u2019re still waiting for the Mandelbulb to touch down!<\/p>\n<p><strong>The Eighth Power<\/strong><\/p>\n<p>Dan White, Paul Nylander, and David Makin have been investigating a different approach.  We go with the spherical coordinates version of the 3D Mandelbrot set, but instead of squaring the number in each iteration, we raise it to, say, the eighth power, that is, we raise the radial length the eighth power and multiply the theta and phi angles by eight.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rudyrucker.com\/blog\/images2\/nylander7mandel3d.jpg\"><br \/>\n[8th power 3D Mandelbrot, rendered by Paul Nylander]<\/p>\n<p>Other powers give nice results too&#8212;at present it seems as if the crud only shows up in the squaring version.  Or perhaps the views we have of the higher powers aren&#8217;t sufficiently detailed to show some lurking crud.  But latest zooms are looking good.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rudyrucker.com\/blog\/images2\/white7mandel3dzoom.jpg\"><br \/>\n[Close-up of the 8th power 3D Mandelbrot, rendered by Daniel White.]<\/p>\n<p>White comments:  &#8220;In this gold pic, see how the sine wave style curves of the 2D mandelbrot translate to &#8216;egg carton&#8217; type shapes, and also how the background in the gold pic is &#8216;smoother\/flatter&#8217; than the foreground. Often, parts of the 2D mandelbrot do exactly the same when the iteration level is low enough (the end of stalks round off).&#8221;<\/p>\n<p>I have some more material about these ideas in my later post, &#8220;<a target=\"blank\" href=\"https:\/\/www.rudyrucker.com\/blog\/2009\/09\/21\/breaking-the-bank-of-computation\/\">Breaking the Bank of Computation.<\/a>&#8220;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is an update about a project I&#8217;ve been working on for twenty years. I recently did some work on it with Mathematica, and I&#8217;ve posted my latest version of my work both as a Mandelbulb 7 Mathematica notebook, and as a Mandelbulb 7 PDF File. I post these files not so much because [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1610","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.rudyrucker.com\/blog\/wp-json\/wp\/v2\/posts\/1610","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rudyrucker.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rudyrucker.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rudyrucker.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rudyrucker.com\/blog\/wp-json\/wp\/v2\/comments?post=1610"}],"version-history":[{"count":16,"href":"https:\/\/www.rudyrucker.com\/blog\/wp-json\/wp\/v2\/posts\/1610\/revisions"}],"predecessor-version":[{"id":1616,"href":"https:\/\/www.rudyrucker.com\/blog\/wp-json\/wp\/v2\/posts\/1610\/revisions\/1616"}],"wp:attachment":[{"href":"https:\/\/www.rudyrucker.com\/blog\/wp-json\/wp\/v2\/media?parent=1610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rudyrucker.com\/blog\/wp-json\/wp\/v2\/categories?post=1610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rudyrucker.com\/blog\/wp-json\/wp\/v2\/tags?post=1610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}