<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>subblue</title>
    <link>http://www.subblue.com/</link>
    <pubDate>Sat, 19 Sep 2009 23:00:00 GMT</pubDate>
    <description>Experiments in mathematical and generative art with a dash of web development.</description>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/subblue" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <title>4D Quaternion Julia Set Ray Tracer</title>
      <link>http://feedproxy.google.com/~r/subblue/~3/b0ZaYSwY-EM/quaternion_julia</link>
      <description>&lt;h2&gt;A quaternion Julia set is a four-dimensional equivalent of the standard two-dimensional fractal. By taking a 3D 'slice' through the 4D space it is possible to visualise a solid fractal.&lt;/h2&gt;
&lt;p&gt;This quaternion Julia set ray tracer is a port of &lt;a href="http://www.cs.caltech.edu/~keenan/project_qjulia.html"&gt;Keenan Crane's Cg GPU implementation&lt;/a&gt; for &lt;a href="http://labs.adobe.com/technologies/pixelbender/"&gt;Adobe Pixel Bender&lt;/a&gt; and a more general GLSL shader patch for &lt;a href="http://developer.apple.com/graphicsimaging/quartzcomposer/"&gt;Quartz Composer&lt;/a&gt;. The Pixel Bender version lets you render out high resolution images in Photoshop CS4 (or animate the parameters in After Effects). The Quartz Composer patch lets you animate any parameter in real-time.&lt;/p&gt;
&lt;p&gt;
&lt;object width="585" height="439"&gt;
&lt;param name="allowfullscreen" value="true" /&gt;
&lt;param name="allowscriptaccess" value="always" /&gt;
&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6664482&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=2391BB&amp;amp;fullscreen=1" /&gt;&lt;embed type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="585" height="439" src="http://vimeo.com/moogaloop.swf?clip_id=6664482&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=2391BB&amp;amp;fullscreen=1"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;h3&gt;The maths bit&lt;br /&gt;&lt;/h3&gt;
&lt;p&gt;Complex numbers have two components that define a point in a plane and are the core build blocks of fractal calculations. In 1843 the Irish mathematician Sir William Rowan Hamilton developed &lt;a href="http://en.wikipedia.org/wiki/Quaternion" title="Quaternions on Wikipedia" class="popup"&gt;quaternions&lt;/a&gt; as a way of describing complex points in three-dimensional space. The only snag was he had to add a fourth dimension to make the maths work (hence the quad part of the name). Whilst complex numbers are described as the sum of a real and imaginary component:  &lt;em&gt;z = a + bi&lt;/em&gt;, quaternions are similar but have three imaginary components: &lt;em&gt;z = a + bi + cj + dk&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Fractals can be calculated using quaternions with the usual equation &lt;em&gt;z&lt;sub&gt;n+1&lt;/sub&gt; = z&lt;sub&gt;n&lt;/sub&gt;&lt;sup&gt;2&lt;/sup&gt; + c &lt;/em&gt;where we track which points have a magnitude greater than the bailout threshold. The problem is trying to visualise the set of 4D points in 3D space. At this point I'll direct you to an &lt;a href="http://www.devmaster.net/forums/showthread.php?t=4448"&gt;excellent write-up&lt;/a&gt; Keenan has posted that describes the process in detail.&lt;/p&gt;
&lt;h3&gt;The ray tracing bit&lt;/h3&gt;
&lt;p&gt;The ray tracing is actually more like the ray-marching process I used in the &lt;a href="http://www.subblue.com/blog/2009/3/7/tracing_a_terrain"&gt;procedural terrain renderer&lt;/a&gt;; a ray vector is fired into the scene and stepped forward until it gets within a collision threshold of the fractal. This brute-force approach is very inefficient but fortunately there are couple of optimisations that can be taken advantage of.&lt;/p&gt;
&lt;p&gt;Firstly, a bounding sphere is defined as the limit of the fractal and used as the starting point for the initial ray vector for each pixel. This removes any unnecessary stepping at the start.&lt;/p&gt;
&lt;p&gt;Secondly, there is a &lt;em&gt;distance estimator&lt;/em&gt; function that will return the distance to the closest point on the Julia set for any z point in quaternion space. The distance estimator accelerates the ray tracing by a method called unbounding volumes, described in the paper &lt;a href="http://graphics.cs.uiuc.edu/~jch/papers/rtqjs.pdf" title="PDF paper"&gt;Ray Tracing Deterministic 3-D Fractals&lt;/a&gt; [John Hart et al, 1989]. At each point of the rays journey through quaternion space the distance estimator returns the distance to the closest point in the Julia set. It means the next step the ray takes can be of this amount, which greatly reduces the overall number of steps required to intersect the fractal surface.&lt;/p&gt;
&lt;p&gt;When the ray comes within a defined collision distance, &lt;em&gt;epsilon&lt;/em&gt;, of the fractal surface the ray marching is stopped. Note, a fractal has an infinite level of detail so the &lt;em&gt;epsilon&lt;/em&gt; factor acts to smooth out the surface and make it renderable.&lt;/p&gt;
&lt;p&gt;The normal vector for each point is generated from the gradient of the approximate fractal surface. The full technique is described in the paper mentioned above.&lt;/p&gt;
&lt;h3&gt;Shading and ambient occlusion&lt;/h3&gt;
&lt;p&gt;My contribution with this shader is the addition of a basic &lt;em&gt;ambient occlusion (AO)&lt;/em&gt; parameter. AO darkens areas of a surface that are in close proximity and less likely to receive light from its surroundings. When combined with standard shading, ambient occlusion gives a far more realistic looking image.&lt;/p&gt;
&lt;p&gt;AO has been applied to quaternion Julia set fractals before by &lt;a href="http://iquilezles.org/www/articles/ssao/ssao.htm" title="Screen space ambient occlusion"&gt;Inigo Quilez&lt;/a&gt; and &lt;a href="http://vimeo.com/962934"&gt;animated here&lt;/a&gt;. However, these implementations are quite involved requiring multiple passes and extra sampling. The implementation used in this ray tracer is just an approximation and not physically accurate, but does add a visual improvement at very little additional computational cost.&lt;/p&gt;
&lt;p&gt;Simply darken the surface by a factor proportional to the number of ray tracing steps taken for each point and the result is comparable to ambient occlusion. It works thanks to a side effect of the unbounded volume ray tracing approach; points that are least occluded are likely to be reached in fewer steps as the distance estimator function will return a large step size for the ray. Whereas rays to points nested in creases or dips will require more steps because the neighbouring surfaces will cause the distance estimator to return a smaller step size.&lt;/p&gt;
&lt;p&gt;The image below illustrates the different components that makes up the final surface. Top row, left to right: pure ambient occlusion, pure phong. Bottom row: ambient occlusion and phong combined, and finally everything; a base colour with specular highlights and ray traced shadows.&lt;/p&gt;
&lt;p&gt;&lt;img class="left" src="http://www.subblue.com/assets/0000/4491/Shading_full.jpg" alt="Shading" title="Shading" width="585" height="467" /&gt;&lt;/p&gt;
&lt;h3&gt;Download and installation&lt;/h3&gt;
&lt;p class="info"&gt;&lt;a href="http://www.subblue.com/assets/0000/4500/QuaternionJulia.zip" title="Quaternion Julia" class="file zip"&gt;Download the Quaternion Julia set ray tracer&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For Pixel Bender open the QuaternionJulia.pbk file with the &lt;a href="http://labs.adobe.com/technologies/pixelbender/"&gt;Adobe Pixel Bender Toolkit&lt;/a&gt; or copy it into the &lt;em&gt;Pixel Bender Files&lt;/em&gt; folder in your Photoshop CS4 installation directory (you will need to have installed the PB plugin for Photoshop first).&lt;/p&gt;
&lt;p&gt;The Quartz Composer patch was created with Quartz Composer 4, which is part of the new &lt;a href="http://developer.apple.com/mac/"&gt;XCode&lt;/a&gt;. It will also work with QC3 as the patch is just a GLSL shader. I've had it running without antialising at up to 30fps @ 600x400 on my iMac with an NVIDIA GeForce 8800GS.&lt;/p&gt;
&lt;p&gt;Just after porting this to Quartz Composer I discovered that Apple have released an &lt;a href="http://developer.apple.com/mac/library/samplecode/OpenCL_RayTraced_Quaternion_Julia-Set_Example/index.html"&gt;OpenCL implementation&lt;/a&gt; for Snow Leopard. With native support now built into Snow Leopard, &lt;a href="http://www.khronos.org/opencl/"&gt;OpenCL&lt;/a&gt; opens up some very exciting possibilities for future projects.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.subblue.com/assets/0000/4473/Quaternion-Julia-10_large.jpg" class="popup"&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/4473/Quaternion-Julia-10_full.jpg" alt="Quaternion Julia 10" title="Quaternion Julia 10" width="585" height="366" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/subblue?a=b0ZaYSwY-EM:pGJyJYhsmWM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=b0ZaYSwY-EM:pGJyJYhsmWM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=b0ZaYSwY-EM:pGJyJYhsmWM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=b0ZaYSwY-EM:pGJyJYhsmWM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=b0ZaYSwY-EM:pGJyJYhsmWM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/subblue/~4/b0ZaYSwY-EM" height="1" width="1"/&gt;</description>
      <pubDate>Sat, 19 Sep 2009 23:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://www.subblue.com/blog/2009/9/20/quaternion_julia</guid>
    <feedburner:origLink>http://www.subblue.com/blog/2009/9/20/quaternion_julia</feedburner:origLink></item>
    <item>
      <title>Artforms of Nature</title>
      <link>http://feedproxy.google.com/~r/subblue/~3/FJQBjCkJMPw/artforms_of_nature</link>
      <description>&lt;h2&gt;The nineteen century German biologist Ernst Haeckel is famous for his fantastically illustrated book &lt;a href="http://commons.wikimedia.org/wiki/Kunstformen_der_Natur" class="popup"&gt;Artforms of Nature&lt;/a&gt;. The copyright for this book from 1904 has now expired and thanks to Wikimedia Commons it is available for everyone to appreciate.&lt;/h2&gt;
&lt;p&gt;Haekel's artistic interpretation of the biological forms he studied have a clarity of symmetry and detail that has been a source of inspiration for many artists and engineers over the years. They provide the perfect subject matter for the &lt;a href="http://www.subblue.com/projects/fractal_explorer" title="Fractal Explorer"&gt;Fractal Explorer&lt;/a&gt; plugin.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://commons.wikimedia.org/wiki/File:Haeckel_Ophiodea_70_Astrophyton_darwinium.jpg" class="popup"&gt;Astrophyton darwinium&lt;/a&gt;:&lt;br /&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/3652/Astrophyton-darwinium-3_full.jpg" alt="Astrophyton darwinium 3" title="Astrophyton darwinium 3" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/3776/Astrophyton-darwinium-1_full.jpg" alt="Astrophyton darwinium 1" title="Astrophyton darwinium 1" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.subblue.com/assets/0000/3776/Astrophyton-darwinium-1_large.jpg" class="popup"&gt;&lt;/a&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/3673/Astrophyton-darwinium-2_full.jpg" alt="Astrophyton darwinium 2" title="Astrophyton darwinium 2" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="left" src="http://www.subblue.com/assets/0000/3497/Haeckel-Astrophyton-darwini_full.jpg" alt="Haeckel Astrophyton darwini" title="Haeckel Astrophyton darwini" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://commons.wikimedia.org/wiki/File:Ensifera_ensifera.jpg" class="popup"&gt;Ensifera ensifera&lt;/a&gt;:&lt;br /&gt;&lt;img class="left" src="http://www.subblue.com/assets/0000/3524/Ensifera_ensifera_full.jpg" alt="Ensifera ensifera" title="Ensifera ensifera" width="585" height="390" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://commons.wikimedia.org/wiki/File:Haeckel_Ascomycetes.jpg" class="popup"&gt;Ascomycetes&lt;/a&gt;:&lt;br /&gt;&lt;img class="left" src="http://www.subblue.com/assets/0000/3452/Haeckel_Ascomycetes-5_full.jpg" alt="Haeckel Ascomycetes 5" title="Haeckel Ascomycetes 5" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="left" src="http://www.subblue.com/assets/0000/3479/Haeckel_Ascomycetes-2_full.jpg" alt="Haeckel Ascomycetes 2" title="Haeckel Ascomycetes 2" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="left" src="http://www.subblue.com/assets/0000/3470/Haeckel_Ascomycetes-3_full.jpg" alt="Haeckel Ascomycetes" title="Haeckel Ascomycetes" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="left" src="http://www.subblue.com/assets/0000/3461/Haeckel_Ascomycetes-4_full.jpg" alt="Haeckel Ascomycetes 4" title="Haeckel Ascomycetes 4" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="left" src="http://www.subblue.com/assets/0000/3488/Haeckel_Ascomycetes-1_full.jpg" alt="Haeckel Ascomycetes 1" title="Haeckel Ascomycetes 1" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://commons.wikimedia.org/wiki/File:Bio_Editors_Barnstar.png" class="popup"&gt;Asteridea&lt;/a&gt;:&lt;br /&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/3515/Haeckel-Asteridea-1_full.jpg" alt="Asteridea" title="Asteridea" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/4346/Haeckel-Asteridea-2_full.jpg" alt="Asteridea" title="Asteridea" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://commons.wikimedia.org/wiki/File:Haeckel_Aspidonia.jpg"&gt;Aspidonia&lt;/a&gt;:&lt;br /&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/3434/Haeckel_Eurypterid-1_full.jpg" alt="Eurypterid" title="Eurypterid" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/3407/Haeckel_Eurypterid-4_full.jpg" alt="Aspidonia" title="Aspidonia" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/3398/Haeckel_Eurypterid-5_full.jpg" alt="Aspidonia" title="Aspidonia" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://commons.wikimedia.org/wiki/File:Haeckel_Thalamphora.jpg" class="popup"&gt;Thalamphora&lt;/a&gt;:&lt;img class="center" src="http://www.subblue.com/assets/0000/3362/Haeckel_Thalamphora-1_full.jpg" alt="Thalamphora" title="Thalamphora" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/3353/Haeckel_Thalamphora-2_full.jpg" alt="Thalamphora" title="Thalamphora" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://commons.wikimedia.org/wiki/File:Haeckel_Phaeodaria_1.jpg"&gt;Pheaodaria&lt;/a&gt;:&lt;br /&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/3389/Haeckel_Phaeodaria-1_full.jpg" alt="Phaeodaria" title="Phaeodaria" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/3371/Haeckel_Phaeodaria-3_full.jpg" alt="Phaeodaria" title="Phaeodaria" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/3380/Haeckel_Phaeodaria-2_full.jpg" alt="Phaeodaria" title="Phaeodaria" width="585" height="585" /&gt;&lt;/p&gt;
&lt;p class="small"&gt;All images here are released under a Creative Commons Attribution-Noncommercial-Share Alike license.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/subblue?a=FJQBjCkJMPw:ATCIMc42QG0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=FJQBjCkJMPw:ATCIMc42QG0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=FJQBjCkJMPw:ATCIMc42QG0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=FJQBjCkJMPw:ATCIMc42QG0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=FJQBjCkJMPw:ATCIMc42QG0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/subblue/~4/FJQBjCkJMPw" height="1" width="1"/&gt;</description>
      <pubDate>Fri, 17 Jul 2009 23:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://www.subblue.com/blog/2009/7/18/artforms_of_nature</guid>
    <feedburner:origLink>http://www.subblue.com/blog/2009/7/18/artforms_of_nature</feedburner:origLink></item>
    <item>
      <title>Fractal Explorer Pixel Bender Plugin</title>
      <link>http://feedproxy.google.com/~r/subblue/~3/CnLMK7hEajk/fractal_explorer</link>
      <description>&lt;h2&gt;A new Pixel Bender plugin for generating a wide variety of fractals in real-time. A key feature enables images to be mapped into fractal space creating some amazing results.&lt;/h2&gt;
&lt;p&gt;Head over to the &lt;a href="http://www.subblue.com/projects/fractal_explorer" title="Fractal Explorer"&gt;Fractal Explorer project page&lt;/a&gt; to download the plugin and find out more.&lt;/p&gt;
&lt;p class="small"&gt;&lt;a href="http://www.subblue.com/assets/0000/3163/tri-mask_large.jpg" class="popup"&gt;&lt;img class="left" src="http://www.subblue.com/assets/0000/3163/tri-mask_full.jpg" alt="Original image: http://www.flickr.com/photos/audringje/535107837/" title="Original image: http://www.flickr.com/photos/audringje/535107837/" width="585" height="448" /&gt;&lt;/a&gt;&lt;br /&gt;The above image is licensed under the Creative Commons Share Alike-Attribution-Non-Commercial license as per the original thanks to &lt;a href="http://www.flickr.com/photos/audringje/535107837/"&gt;Audringje&lt;/a&gt;.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/subblue?a=CnLMK7hEajk:r6HI8w_mYA0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=CnLMK7hEajk:r6HI8w_mYA0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=CnLMK7hEajk:r6HI8w_mYA0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=CnLMK7hEajk:r6HI8w_mYA0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=CnLMK7hEajk:r6HI8w_mYA0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/subblue/~4/CnLMK7hEajk" height="1" width="1"/&gt;</description>
      <pubDate>Mon, 13 Jul 2009 23:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://www.subblue.com/blog/2009/7/14/fractal_explorer</guid>
    <feedburner:origLink>http://www.subblue.com/blog/2009/7/14/fractal_explorer</feedburner:origLink></item>
    <item>
      <title>Fractals and generative art resources</title>
      <link>http://feedproxy.google.com/~r/subblue/~3/k8gAwuWTT-8/fractals_and_generative_art_resources</link>
      <description>&lt;h2&gt;&lt;img class="left" src="http://www.subblue.com/assets/0000/3036/Glynn1_full.jpg" alt="Glynn Tree" title="Glynn Tree" width="585" height="422" /&gt;&lt;br /&gt;&lt;br /&gt;As a follow up to my talk on Fractals and Generative Art at the Apple Store in Glasgow here is a list of links for further reading and exploration.&lt;br /&gt;&amp;nbsp;&lt;/h2&gt;
&lt;h3&gt;The mathematics of fractals&lt;/h3&gt;
&lt;p&gt;Good places to start learning about the mathematics of fractals are &lt;a href="http://en.wikipedia.org/wiki/Fractal"&gt;Wikipedia&lt;/a&gt; and &lt;a href="http://mathworld.wolfram.com/Fractal.html"&gt;Mathworld&lt;/a&gt;. There are many books on the subject but three books I can recommend are &lt;a href="http://www.amazon.co.uk/Chaos-Fractals-New-Frontiers-Science/dp/0387202293"&gt;Chaos and Fractals - New Frontiers of Science&lt;/a&gt;, &lt;a href="http://www.amazon.com/Computational-Beauty-Nature-Explorations-Adaptation/dp/0262561271"&gt;The Computational Beauty of Nature&lt;/a&gt; and the definitive work by Mandelbrot, &lt;a href="http://www.amazon.co.uk/Fractal-Geometry-Nature-Benoit-Mandelbrot/dp/0716711869"&gt;The Fractal Geometry of Nature&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Fractal generation&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;img class="right" src="http://www.subblue.com/assets/0000/3045/Glynn2_preview.jpg" alt="Tolkien Tree" title="Tolkien Tree" width="139" height="100" /&gt;&lt;/strong&gt;&lt;strong&gt;&lt;a href="http://www.ultrafractal.com/"&gt;Ultrafractal&lt;/a&gt;&lt;/strong&gt; is the Photoshop of the fractal world. It's Windows only but works very nicely via Parallels on the Mac. Other programs worth investigating is the open-source &lt;a href="http://wmi.math.u-szeged.hu/xaos/doku.php"&gt;GNU Xaos&lt;/a&gt; and the Mac only &lt;a href="http://www.gandreas.com/products_graphics.html"&gt;Quadrium&lt;/a&gt; apps.&lt;br /&gt;Writing your own fractal rendering scripts is highly recommended as a good way to explore the subject.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fractal explorer&lt;/strong&gt; is the &lt;a href="http://labs.adobe.com/technologies/pixelbender/"&gt;Pixel Bender&lt;/a&gt; plugin for Photoshop and After Effects CS4 that I demonstrated in the talk. I'm making some final tweaks and will be releasing it soon!&lt;/p&gt;
&lt;h3&gt;Fractal Flames&lt;br /&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img class="right" src="http://www.subblue.com/assets/0000/3090/Apophysis-090501-17_preview.jpg" alt="Aperture" title="Aperture" width="139" height="139" /&gt;Fractals flames are a form of Iterative Functional Systems (IFS). To find out more see &lt;a href="http://flam3.com"&gt;flam3.com&lt;/a&gt;. &lt;strong&gt;&lt;a href="http://www.apophysis.org/"&gt;Apophysis&lt;/a&gt;&lt;/strong&gt; is the daddy of this area. Mac users have to use the Java port, &lt;a href="http://jfbouzereau.free.fr/apophysis.html"&gt;Apophysis-j&lt;/a&gt;. The open-source programme can take a bit of effort to get interesting results but these &lt;a href="http://apophysis.wikispaces.com/Tutorials"&gt;tutorials&lt;/a&gt; will help you on your way. The &lt;a href="http://apophysis.deviantart.com/"&gt;Apophysis group&lt;/a&gt; on deviantART is a great place to see what is possible.&lt;/p&gt;
&lt;p&gt;I also recommend the excellent &lt;a href="http://electricsheep.org/"&gt;Electric Sheep&lt;/a&gt; animated fractal flame screen saver - keeps you tripping for hours.&lt;/p&gt;
&lt;h3&gt;Context Free&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.contextfreeart.org"&gt;Context Free&lt;/a&gt;&lt;/strong&gt; is an open-source programme for visualising Context Free Design Grammars (CFDG) and is an excellent tool for exploring generative graphics. The images are rendered from a set of simple recursive rules that can often create surprising beautiful results. Try out some of the code examples in the &lt;a href="http://www.contextfreeart.org/gallery/"&gt;gallery&lt;/a&gt; for a quick start.&lt;/p&gt;
&lt;h3&gt;Structure Synth&lt;/h3&gt;
&lt;p&gt;&lt;img class="right" src="http://www.subblue.com/assets/0000/2486/framework-top_preview.jpg" alt="Box pyramid 1" title="Box pyramid 1" width="139" height="104" /&gt;Taking CFDG into the third dimension, &lt;strong&gt;&lt;a href="http://structuresynth.sourceforge.net/"&gt;Structure Synth&lt;/a&gt;&lt;/strong&gt; is a fantastic open-source tool for creating abstract 3D models. There are some good example scenes included to get you started and an active &lt;a href="http://www.flickr.com/groups/structuresynth/"&gt;Flickr group&lt;/a&gt; to feed your inspiration.&lt;/p&gt;
&lt;h3&gt;Sunflow&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://sunflow.sourceforge.net/"&gt;Sunflow&lt;/a&gt;&lt;/strong&gt; is an open-source global illumination rendering system written in Java. There hasn't been a new release of the programme in a couple of years, but it is already a very capable system. Structure Synth can export Sunflow scenes and it has plugins to integrate with the open-source 3D package &lt;a href="http://www.blender.org/"&gt;Blender&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;TopMod&lt;br /&gt;&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.topmod3d.org/"&gt;TopMod&lt;/a&gt;&lt;/strong&gt; is a specialist open-source 3D topology modelling tool with support for Python scripting. It's not really a tool for pure generative graphics but damn cool all the same!&lt;/p&gt;
&lt;h3&gt;Terragen&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.planetside.co.uk"&gt;Terragen&lt;/a&gt;&lt;/strong&gt; is an amazing photo-realistic landscape and environment renderer. Its fractal based terrain generator enables you to create entire worlds procedurally. There is a resolution limited free version you can use for non-commercial projects to get started with.&lt;/p&gt;
&lt;h3&gt;Flash, Flex, Actionscript 3.0, Pixel Bender and friends&lt;br /&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img class="right" src="http://www.subblue.com/assets/0000/3027/iMac-lowres_preview.jpg" alt="iMac Droste" title="iMac Droste" width="139" height="93" /&gt;Adobe Flash is one of the best ways to share your visualisations and the power of Actionscript 3.0, especially combined with &lt;a href="http://labs.adobe.com/technologies/pixelbender/"&gt;Pixel Bender&lt;/a&gt; and &lt;a href="http://labs.adobe.com/technologies/alchemy/"&gt;Alchemy&lt;/a&gt;, has enabled some pretty impressive stuff. You also don't need the full Adobe Flash IDE to create Flash apps. See the &lt;a href="http://opensource.adobe.com"&gt;Adobe open-source site&lt;/a&gt; for more information.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=productHome&amp;amp;exc=26"&gt;Pixel Bender exchange&lt;/a&gt; is a good source for example scripts. Also keep your eye on the &lt;a href="http://labs.adobe.com/"&gt;Adobe Labs&lt;/a&gt; site as there is always cool stuff going on. See the &lt;a href="http://www.subblue.com/projects/droste" title="Escher's Droste Effect"&gt;Droste effect plugin&lt;/a&gt; project page to get started.&lt;/p&gt;
&lt;h3&gt;Processing&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.processing.org/"&gt;Processing&lt;/a&gt;&lt;/strong&gt; is an open-source Java based programming language and environment for generating images, animations and visualisations. It is one of the biggest players in the generative graphics scene with a huge&amp;nbsp; community, many online resources and a number of books on the subject.&lt;/p&gt;
&lt;h3&gt;Nodebox&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.nodebox.net"&gt;Nodebox&lt;/a&gt;&lt;/strong&gt; is a Mac only graphics programming environment very similar to Processing but based on Python. Although it might have a much smaller community than Processing it still has a very complete selection of libraries and can generate extremely high quality images and animations.&lt;/p&gt;
&lt;h3&gt;Open frameworks&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.openframeworks.cc/"&gt;Open Frameworks&lt;/a&gt;&lt;/strong&gt; is another visual programming environment, this time based on C++. See the &lt;a href="http://www.openframeworks.cc/forum/"&gt;forum&lt;/a&gt; and &lt;a href="http://wiki.openframeworks.cc"&gt;wiki&lt;/a&gt; for more information.&lt;/p&gt;
&lt;h3&gt;Blogs and places of inspiration&lt;/h3&gt;
&lt;p&gt;There are a huge number of blogs and sites focusing on generative graphics by many extremely talented people. A few to get you started:&lt;br /&gt; &lt;a href="http://www.generatorx.no/"&gt;Generator.x&lt;/a&gt;&lt;br /&gt; &lt;a href="http://dataisnature.com/"&gt;Data is Nature&lt;/a&gt;&lt;br /&gt; &lt;a href="http://www.flight404.com/blog/"&gt;Flight 404&lt;/a&gt;&lt;br /&gt; &lt;a href="http://www.shiffman.net/"&gt;Daniel Shiffman&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.davebollinger.com/works/"&gt;Dave Bollinger&lt;/a&gt;&lt;br /&gt; &lt;a href="http://www.bit-101.com/blog/"&gt;BIT-101&lt;/a&gt;&lt;br /&gt; &lt;a href="http://blog.drwoohoo.com/"&gt;Dr. Woohoo!&lt;/a&gt;&lt;br /&gt; &lt;a href="http://www.quasimondo.com/"&gt;Quasimondo&lt;/a&gt;&lt;br /&gt; &lt;a href="http://www.memo.tv/"&gt;Memo.tv&lt;/a&gt;&lt;br /&gt; &lt;a href="http://blog.soulwire.co.uk/"&gt;Soulwire&lt;/a&gt;&lt;br /&gt; &lt;a href="http://www.wblut.com/"&gt;W:Blut&lt;/a&gt;&lt;br /&gt; &lt;a href="http://infosthetics.com/"&gt;Information Aestetics&lt;/a&gt;&lt;br /&gt; &lt;a href="http://www.visualcomplexity.com/vc/"&gt;Visual Complexity&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Credits&lt;/h3&gt;
&lt;p&gt;Specific thanks to &lt;a href="http://www.flickr.com/photos/crickography/sets/72157600393348064/?page=3"&gt;Chris Creek&lt;/a&gt; and &lt;a href="http://www.flickr.com/photos/sfauth/sets/72157594433040508/"&gt;Sven Fauth&lt;/a&gt; for letting me use a couple of their Apophysis images in the presentation and &lt;a href="http://www.michael-hogg.co.uk/"&gt;Michael Hogg&lt;/a&gt; for sharing his Mandelbrot deep zoom animation.&lt;/p&gt;
&lt;p&gt;&lt;img class="left" src="http://www.subblue.com/assets/0000/3153/flowers_full.jpg" alt="Flowers to the power 4" title="Flowers to the power 4" width="585" height="585" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;A preview of my new Pixel Bender fractal explorer plugin - see the new &lt;a href="http://www.subblue.com/projects/fractal_explorer" title="Fractal Explorer"&gt;project page&lt;/a&gt;.&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/subblue?a=k8gAwuWTT-8:8Vy-sV9CK0c:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=k8gAwuWTT-8:8Vy-sV9CK0c:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=k8gAwuWTT-8:8Vy-sV9CK0c:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=k8gAwuWTT-8:8Vy-sV9CK0c:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=k8gAwuWTT-8:8Vy-sV9CK0c:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/subblue/~4/k8gAwuWTT-8" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 13 May 2009 23:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://www.subblue.com/blog/2009/5/14/fractals_and_generative_art_resources</guid>
    <feedburner:origLink>http://www.subblue.com/blog/2009/5/14/fractals_and_generative_art_resources</feedburner:origLink></item>
    <item>
      <title>Fractals and generative art talk</title>
      <link>http://feedproxy.google.com/~r/subblue/~3/uDg7S0WC2Os/fractals_and_generative_art_talk</link>
      <description>&lt;p&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/3027/iMac-lowres_full.jpg" alt="iMac Droste" title="iMac Droste" width="585" height="390" /&gt;&lt;/p&gt;
&lt;h2&gt;6pm on Thursday 14th May at the Apple Store in Glasgow.&lt;/h2&gt;
&lt;p&gt;I'm going to be talking about creating fractals and generative art on the Mac. I'll be focussing on demonstrating some of the many open-source apps and scripts freely available. There will be lots of pretty pictures and animations and no mathematical or programming experience will be required.&lt;/p&gt;
&lt;p&gt;Hopefully it will sow a few seeds for the curious to go away and explore the world of fractal and generative art themselves.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="http://www.subblue.com/blog/2009/5/12/fractals_and_generative_art_resources"&gt;A write-up is now online.&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/subblue?a=uDg7S0WC2Os:srCPaoveOcM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=uDg7S0WC2Os:srCPaoveOcM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=uDg7S0WC2Os:srCPaoveOcM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=uDg7S0WC2Os:srCPaoveOcM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=uDg7S0WC2Os:srCPaoveOcM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/subblue/~4/uDg7S0WC2Os" height="1" width="1"/&gt;</description>
      <pubDate>Sat, 09 May 2009 23:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://www.subblue.com/blog/2009/5/10/fractals_and_generative_art_talk</guid>
    <feedburner:origLink>http://www.subblue.com/blog/2009/5/10/fractals_and_generative_art_talk</feedburner:origLink></item>
    <item>
      <title>Tracing a terrain</title>
      <link>http://feedproxy.google.com/~r/subblue/~3/exN4nWG7lts/tracing_a_terrain</link>
      <description>&lt;h2&gt;This is a basic terrain rendering filter for Pixel Bender based on the Quasi-Analytic Error-Bound (QAEB, or "kweeb") ray tracing algorithm.&lt;br /&gt;&lt;/h2&gt;
&lt;p&gt;QAEB tracing is a raymarching algorithm for rendering realistic looking terrains using procedural fractal functions first introduced by &lt;a href="http://www.wizardnet.com/musgrave/qaeb.html"&gt;Ken Musgrave&lt;/a&gt;. After reading the chapter about it in the excellent book, "Texturing &amp;amp; Modeling: A Procedural Approach", I thought it might make an interesting challenge for an interactive Pixel Bender filter.&lt;/p&gt;
&lt;p&gt;The process is fairly unsubtle; a ray vector for each pixel is fired into the scene and its offset, &lt;em&gt;y&lt;/em&gt;, above a 2D height field, &lt;em&gt;f(x, z)&lt;/em&gt;, is calculated. The ray is repeatedly stepped, or marched, forward until it intersects the terrain. At this point the colour for the pixel is determined based on its calculated height and angle between the surface normal-vector and sun position. A secondary ray can be fired off from the intersection point towards the sun and if it intersects the terrain again we know that the original surface point must be in shadow.&lt;/p&gt;
&lt;p&gt;A couple of optimisations can be used to speed up the rendering. Firstly the step interval can be increased proportionally with distance as the geometric details get smaller in screen space the deeper into the scene. The second optimisation requires the scene to be rendered from the bottom up (near to far). It uses the calculated scene depth of the pixel below the one we want to calculate as the starting point for its ray as we know that as we move up the image we go deeper into the scene. However, Pixel Bender calculates many pixels in parallel on the GPU and so you can't use the result of one pixel calculation as the starting point for another, which unfortunately means we can't take advantage of this second optimisation.&lt;/p&gt;
&lt;p&gt;This filter uses a composition of sinusoidal functions at different frequencies to generate the height map. It's by no means perfect but at a low altitude gives a reasonable cartoon-like landscape where the repeating structure isn't obvious. I created a different version that used Perlin noise for the height field, which generated a much more realistic terrain but would cripple Pixel Bender causing a few hard reboots! I'm porting this version to Processing and will post about that soon.&lt;/p&gt;
&lt;p&gt;Other features such as the water level are set by clipping the height field at a lower limit and building like structures can be generated using a combination of &lt;a href="http://pixelero.wordpress.com/2008/07/28/various-functions-with-modulo/"&gt;modulo functions&lt;/a&gt;. There is also an option to overlay contour lines on the terrain.&lt;/p&gt;
&lt;p&gt;For more technical details on terrain rendering and other excellent computer graphics goodies see &lt;a href="http://iquilezles.org/www/"&gt;Inigo Quilez's site&lt;/a&gt;.&lt;/p&gt;
&lt;p class="info"&gt;&lt;a href="http://www.subblue.com/assets/0000/3017/landscape.zip" title="Landscape" class="file zip"&gt;Download the Landscape PixelBender filter&lt;/a&gt;&lt;br /&gt;&lt;em&gt;See the &lt;a href="http://labs.adobe.com/technologies/pixelbender/"&gt;Adobe PixelBender page&lt;/a&gt; for instructions on using the filters with Photoshop CS4 and After Effects&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/2972/landscape_full.png" alt="Landscape" title="Landscape" width="585" height="236" /&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/subblue?a=exN4nWG7lts:UIYRv2q8dvI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=exN4nWG7lts:UIYRv2q8dvI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=exN4nWG7lts:UIYRv2q8dvI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=exN4nWG7lts:UIYRv2q8dvI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=exN4nWG7lts:UIYRv2q8dvI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/subblue/~4/exN4nWG7lts" height="1" width="1"/&gt;</description>
      <pubDate>Sat, 07 Mar 2009 00:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://www.subblue.com/blog/2009/3/7/tracing_a_terrain</guid>
    <feedburner:origLink>http://www.subblue.com/blog/2009/3/7/tracing_a_terrain</feedburner:origLink></item>
    <item>
      <title>Escher's Droste Effect</title>
      <link>http://feedproxy.google.com/~r/subblue/~3/Dg_YVdnRHhM/eschers_droste_effect</link>
      <description>&lt;h2&gt;The "Droste effect" derives from a Dutch chocolate maker that used an image of its box on the box recursively at smaller and smaller scales.&lt;/h2&gt;
&lt;p&gt;MC Escher's "&lt;a href="http://www.artchive.com/artchive/e/escher/escher_gallery.jpg.html"&gt;Prentententoonstelling&lt;/a&gt;" (print gallery) image took this idea one step further and mapped the image on itself in a spiral. However, he only got so far with pen and paper leaving an enigmatic white centre. It wasn't until the Dutch mathematician, Hendrik Lenstra, worked out the maths behind the image transformation that the complete effect could be visualised. Take a look at the &lt;a href="http://escherdroste.math.leidenuniv.nl/index.php?menu=intro"&gt;illustrated write-up&lt;/a&gt; that gives a good explanation about the process.&lt;/p&gt;
&lt;p&gt;Jos Leys took the process further and created a &lt;a href="http://www.josleys.com/article_show.php?id=82"&gt;generic logrithmic image transformation&lt;/a&gt; that can create endless zooming animations. This process was turned into a Mathmap script by &lt;a href="http://www.flickr.com/photos/joshsommers/"&gt;Josh Sommers&lt;/a&gt; and &lt;a href="http://www.flickr.com/photos/breic/"&gt;Briec&lt;/a&gt; and now has an active &lt;a href="http://www.flickr.com/groups/escherdroste/"&gt;Flickr group&lt;/a&gt; that use it.&lt;/p&gt;
&lt;p&gt;I've ported the Mathmap script over to Adobe's new Pixel Bender Toolkit. Pixel Bender was officially released as part of the CS4 suite but is also available as a &lt;a href="http://labs.adobe.com/technologies/pixelbender/"&gt;free download&lt;/a&gt;. The filters will run in After Effects, Photoshop CS4 and Flash 10 (in some cases) so there is huge creative potential here!&lt;/p&gt;
&lt;p class="info"&gt;&lt;a href="http://www.subblue.com/projects/droste" title="Escher's Droste Effect Project"&gt;See the project page for download and usage instructions&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.subblue.com/projects/droste" title="Escher's Droste Effect"&gt;&lt;img class="left" src="http://www.subblue.com/assets/0000/3027/iMac-lowres_full.jpg" alt="iMac spiral" title="iMac spiral" width="585" height="390" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/subblue?a=Dg_YVdnRHhM:lp6tggbiHcM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=Dg_YVdnRHhM:lp6tggbiHcM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=Dg_YVdnRHhM:lp6tggbiHcM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=Dg_YVdnRHhM:lp6tggbiHcM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=Dg_YVdnRHhM:lp6tggbiHcM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/subblue/~4/Dg_YVdnRHhM" height="1" width="1"/&gt;</description>
      <pubDate>Mon, 17 Nov 2008 00:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://www.subblue.com/blog/2008/11/17/eschers_droste_effect</guid>
    <feedburner:origLink>http://www.subblue.com/blog/2008/11/17/eschers_droste_effect</feedburner:origLink></item>
    <item>
      <title>Fast Mandelbrot Renderer</title>
      <link>http://feedproxy.google.com/~r/subblue/~3/u7DQq1KDHcA/fast_mandelbrot_renderer</link>
      <description>&lt;h2&gt;Here is another version of the classic Mandelbrot set, however this one runs fast enough in Pixel Bender for real-time zooming all the way down to the limit of the floating point number precision (at which point you get some glitchy goodness).&lt;/h2&gt;
&lt;p&gt;Adobe recently launched the Pixel Bender Toolkit, which is a high-performance graphics processing language for image processing. It will offload the image processing to the GPU enabling very high performance operations.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You will need to install the Pixel Bender Toolkit (available as a &lt;a href="http://labs.adobe.com/wiki/index.php/Pixel_Bender_Toolkit"&gt;free download here&lt;/a&gt;) and then copy &amp;amp; paste in the code below.&lt;/p&gt;
&lt;p&gt;Some pixel bender scripts can be compiled into filters than can be used within Flash 10 applications. However, Flash doesn't yet support filters with loops like this one, so we won't have a super-charged Flash fractal explorer just yet.&lt;/p&gt;
&lt;pre&gt;/**&lt;br /&gt; * Mandelbrot.pbk&lt;br /&gt; * &lt;br /&gt; * Copyright (c) 2008 Tom Beddard&lt;br /&gt; * http://www.subblue.com&lt;br /&gt; * &lt;br /&gt; * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php&lt;br /&gt; * &lt;br /&gt; * &lt;br /&gt; * Tips:&lt;br /&gt; * - Use the centerPreset option to jump to interesting parts of the Mandelbrot set.&lt;br /&gt; * - Increase the maxIterations option to increase detail on high zooms.&lt;br /&gt; * &lt;br /&gt; * As loops aren't supported with Hydra code it curently isn't possible to export this&lt;br /&gt; * for use in Flash. &lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;&amp;lt;languageVersion: 1.0;&amp;gt;&lt;br /&gt;&lt;br /&gt;kernel Mandelbrot&lt;br /&gt;&amp;lt;   namespace : "com.subblue.filters";&lt;br /&gt;    vendor : "Tom Beddard";&lt;br /&gt;    version : 1;&lt;br /&gt;    description : "Mandelbrot set renderer";&lt;br /&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;#define BAILOUT 10.0&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;    output pixel4 dst;&lt;br /&gt;    &lt;br /&gt;    parameter int2 size&lt;br /&gt;    &amp;lt;&lt;br /&gt;        minValue:int2(100, 100);&lt;br /&gt;        maxValue:int2(1000, 1000);&lt;br /&gt;        defaultValue:int2(640, 480);&lt;br /&gt;    &amp;gt;;&lt;br /&gt;    &lt;br /&gt;    parameter float2 center&lt;br /&gt;    &amp;lt;&lt;br /&gt;        minValue:float2(-2.0, -1.0);&lt;br /&gt;        maxValue:float2(2.0, 1.0);&lt;br /&gt;        defaultValue:float2(-0.5, 0.0);&lt;br /&gt;    &amp;gt;;&lt;br /&gt;    &lt;br /&gt;    parameter float2 centerOffset&lt;br /&gt;    &amp;lt;&lt;br /&gt;        minValue:float2(-1.0, -1.0);&lt;br /&gt;        maxValue:float2(1.0, 1.0);&lt;br /&gt;        defaultValue:float2(0.0, 0.0);&lt;br /&gt;    &amp;gt;;&lt;br /&gt;    &lt;br /&gt;    parameter int centerPreset&lt;br /&gt;    &amp;lt;&lt;br /&gt;        minValue:0;&lt;br /&gt;        maxValue:4;&lt;br /&gt;        defaultValue:0;&lt;br /&gt;    &amp;gt;;&lt;br /&gt;    &lt;br /&gt;    parameter float zoomMajor&lt;br /&gt;    &amp;lt;&lt;br /&gt;        minValue:0.0;&lt;br /&gt;        maxValue:20.0;&lt;br /&gt;        defaultValue:0.0;&lt;br /&gt;    &amp;gt;;&lt;br /&gt;    &lt;br /&gt;    parameter float zoomMinor&lt;br /&gt;    &amp;lt;&lt;br /&gt;        minValue:0.0;&lt;br /&gt;        maxValue:10.0;&lt;br /&gt;        defaultValue:0.0;&lt;br /&gt;    &amp;gt;;&lt;br /&gt;    &lt;br /&gt;    parameter int maxIterations&lt;br /&gt;    &amp;lt;&lt;br /&gt;        minValue:20;&lt;br /&gt;        maxValue:800;&lt;br /&gt;        defaultValue:200;&lt;br /&gt;    &amp;gt;;&lt;br /&gt;    &lt;br /&gt;    region generated()&lt;br /&gt;    {&lt;br /&gt;        return region(float4(0, 0, size.x, size.y));&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    void&lt;br /&gt;    evaluatePixel()&lt;br /&gt;    {&lt;br /&gt;        pixel4 p;&lt;br /&gt;        float aa, bb, zz, twoab;&lt;br /&gt;        float x0 = center.x;&lt;br /&gt;        float y0 = center.y;&lt;br /&gt;        &lt;br /&gt;        // Use a center preset to find some nice parts of the Mandelbrot set&lt;br /&gt;        if (centerPreset == 1) {&lt;br /&gt;            x0 = -0.742522478103764;&lt;br /&gt;            y0 = -0.143708014488453;&lt;br /&gt;        } else if (centerPreset == 2) {&lt;br /&gt;            x0 = 0.36295341867850555;&lt;br /&gt;            y0 = -0.6455617463848476;&lt;br /&gt;        } else if (centerPreset == 3) {&lt;br /&gt;            x0 = 0.3218759918211005;&lt;br /&gt;            y0 = 0.03518083572368085;&lt;br /&gt;        } else if (centerPreset == 4) {&lt;br /&gt;            x0 = -1.673497088962531;&lt;br /&gt;            y0 = -0.0003318667941149705;&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        float zoom = exp(zoomMajor + zoomMinor);&lt;br /&gt;        float x1 = x0 - 2.0 / zoom;			// Left limit of x&lt;br /&gt;        float x2 = x0 + 2.0 / zoom;			// Right limit of x&lt;br /&gt;        &lt;br /&gt;        float spanX = x2 - x1;&lt;br /&gt;        float spanY = spanX * (float(size.y) / float(size.x));&lt;br /&gt;        float y1 = y0 - spanY / 2.0;&lt;br /&gt;        float y2 = y0 + spanY / 2.0;&lt;br /&gt;        &lt;br /&gt;        x1 += centerOffset.x * spanX;       // Shift centre for fine tuning of position&lt;br /&gt;        y1 += centerOffset.y * spanY;&lt;br /&gt;        &lt;br /&gt;        float2 z = float2(x1, y1) + outCoord() * float2(spanX / float(size.x), spanY / float(size.y));&lt;br /&gt;        float2 z0 = z;&lt;br /&gt;        int n = 0;&lt;br /&gt;        &lt;br /&gt;        dst = pixel4(0.0, 0.0, 0.0, 1.0);   // Set everything to black first&lt;br /&gt;        &lt;br /&gt;        /**&lt;br /&gt;		 *  Mandelbrot formula&lt;br /&gt;		 *	z' = z^2 + c&lt;br /&gt;		 *	 where: z = a + bi&lt;br /&gt;		 *		    z^2 = (a^2 - b^2) + (2ab)i&lt;br /&gt;		 *	 and: c = x + yi&lt;br /&gt;		 */&lt;br /&gt;        while (n &amp;lt; maxIterations) {&lt;br /&gt;            aa = z.x * z.x;&lt;br /&gt;            bb = z.y * z.y;&lt;br /&gt;            &lt;br /&gt;            if (aa + bb &amp;gt; BAILOUT) {&lt;br /&gt;                // Fill the pixel based on the time it takes to reach the bailout threshold&lt;br /&gt;                p = pixel4(1.0 - float(n) / float(maxIterations));&lt;br /&gt;                p.a = 1.0;&lt;br /&gt;                dst = p;&lt;br /&gt;                break;&lt;br /&gt;            }&lt;br /&gt;            &lt;br /&gt;            twoab = 2.0 * z.x * z.y;&lt;br /&gt;            z.x = aa - bb + z0.x;&lt;br /&gt;			z.y = twoab + z0.y;&lt;br /&gt;            n += 1;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/subblue?a=u7DQq1KDHcA:_pH2YhSfCMQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=u7DQq1KDHcA:_pH2YhSfCMQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=u7DQq1KDHcA:_pH2YhSfCMQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=u7DQq1KDHcA:_pH2YhSfCMQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=u7DQq1KDHcA:_pH2YhSfCMQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/subblue/~4/u7DQq1KDHcA" height="1" width="1"/&gt;</description>
      <pubDate>Thu, 13 Nov 2008 00:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://www.subblue.com/blog/2008/11/13/fast_mandelbrot_renderer</guid>
    <feedburner:origLink>http://www.subblue.com/blog/2008/11/13/fast_mandelbrot_renderer</feedburner:origLink></item>
    <item>
      <title>Butterfly curves</title>
      <link>http://feedproxy.google.com/~r/subblue/~3/lXJ19voBwPY/butterfly_curves</link>
      <description>&lt;h2&gt;Taken from Clifford Pickover's book, Computers and the Imagination, is this experiment that creates butterfly like curves.&lt;/h2&gt;
&lt;p&gt;The formula is expressed in polar coordinates as:&lt;br /&gt;&lt;br /&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/2495/butterfly_curve.gif" alt="" width="242" height="46" /&gt;&lt;br /&gt;By changing the A, B, a, b and c parameters you can get some nice results. &lt;br /&gt;Click on the image below to give it a go.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.subblue.com/projects/butterfly" title="Explore the butterfly curves"&gt;&lt;img class="left" src="http://www.subblue.com/assets/0000/2511/butterfly_1225924540_full.jpg" alt="butterfly 1225924540" title="butterfly 1225924540" width="585" height="375" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/subblue?a=lXJ19voBwPY:_kflvx27cBA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=lXJ19voBwPY:_kflvx27cBA:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=lXJ19voBwPY:_kflvx27cBA:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=lXJ19voBwPY:_kflvx27cBA:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=lXJ19voBwPY:_kflvx27cBA:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/subblue/~4/lXJ19voBwPY" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 05 Nov 2008 00:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://www.subblue.com/blog/2008/11/5/butterfly_curves</guid>
    <feedburner:origLink>http://www.subblue.com/blog/2008/11/5/butterfly_curves</feedburner:origLink></item>
    <item>
      <title>Guilloché Patterns</title>
      <link>http://feedproxy.google.com/~r/subblue/~3/-FbMthX3vh0/guilloche</link>
      <description>&lt;h2&gt;If you wanted to design your own bank notes or passport you might consider using a Guilloch&amp;eacute; pattern as one of your anti-counterfeiting measures.&lt;/h2&gt;
&lt;p&gt;I first heard about Guilloch&amp;eacute; patterns in a recent post over at the &lt;a href="http://ministryoftype.co.uk/words/article/guilloches/" title="A blog worth adding to your feeds"&gt;Ministry of Type&lt;/a&gt; blog run by Aegir Hallmundur. Guilloch&amp;eacute; machines (also known as geometric lathes) have been used since the 17th century by watchmakers and goldsmiths, such as Faberg&amp;egrave;, for for ornamentation.&lt;/p&gt;
&lt;p&gt;Using the set of &lt;a href="http://mathworld.wolfram.com/Hypotrochoid.html"&gt;Hypotrochoid equations&lt;/a&gt; Aegir describes I've built a little Flash app to experiment with the various parameters. Click the picture below to play.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.subblue.com/projects/guilloche" title="Click to explore the Guilloche"&gt;&lt;img class="center" src="http://www.subblue.com/assets/0000/2365/guilloche_1223715406_full.jpg" alt="guilloche 1223715406" title="guilloche 1223715406" width="585" height="375" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="info"&gt;Download the &lt;a href="http://www.subblue.com/assets/0000/2421/guilloches.zip" title="Guilloches" class="file zip"&gt;AS3 source code&lt;/a&gt; and play with the &lt;a href="http://www.subblue.com/projects/guilloche"&gt;Guilloch&amp;eacute; explorer&lt;/a&gt;.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/subblue?a=-FbMthX3vh0:lgYACiQ3kM8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=-FbMthX3vh0:lgYACiQ3kM8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=-FbMthX3vh0:lgYACiQ3kM8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/subblue?a=-FbMthX3vh0:lgYACiQ3kM8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/subblue?i=-FbMthX3vh0:lgYACiQ3kM8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/subblue/~4/-FbMthX3vh0" height="1" width="1"/&gt;</description>
      <pubDate>Thu, 09 Oct 2008 23:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://www.subblue.com/blog/2008/10/10/guilloche</guid>
    <feedburner:origLink>http://www.subblue.com/blog/2008/10/10/guilloche</feedburner:origLink></item>
  </channel>
</rss>
