Title: Juliabrots - 3d and more Post by: Stailinn on July 09, 2009, 08:14:36 PM I've been popping into FF for a while and y'all do awesome stuff. O0 I've been fixated for a while now on the "pure" Mandelbrot/Julia space, and finally decided to dig more into that.
Particularly, I was inspired by http://www.utopiansky.com/labratory/fractals/ (http://www.utopiansky.com/labratory/fractals/) - exploring the non-Mandelbrot and non-Julia planes, particularly the perturbed images, I was pretty sure there was interesting stuff to be mined from pure Juliabrots. So I cooked up a "raytracer" in Java (I'm afraid it's not as polished as some of what you guys are cranking!...) The 'step' size is based on the mathematical distance between screen pixels where the eye vector crosses the plane of the screen (what I wanted was to render all the visible "voxels", so the higher the res of the image, the finer the step size is...) Once I hit a surface, I do a series of binary refinements (I've been using 7, to get the refinement to under 1% of a voxel), etc. For coloring, I'm basing colors on the 'magnitude of Z in the last iteration' (ala Nick's "Fill Magnitude Rendermode" from the applet above). I noticed when using Nick's applet that, when using 'last mag of Z' to color Mandelbrot/Julia points, you get information on periodicity - bulbs which correspond to a factor of "max iterations" color with 'near zero' magnitudes. (And if you pick a prime number, you get the bulbs to color locally the same but differently from their neighbors... so it makes for an interesting surface). My "max iterations" is cranked really high: the images I've done so far use 20,011 as the escape value (the first prime above 20k). This is to eliminate as much 'noise' - false hits - as possible from the images. In 2d, false hits are OK because the points around them give contextual information, but when doing a 3d raycast I feel false hits tend to muck up the shading (at least for me). The goal at this point is to be able to visualize "all" of the points in the Juliabrot set, by rendering 3d slices as frames of an animation where the 4th axis is varied over 'time'. Ultimately, there will be four (4) animations, each one using a different component (Cr, Ci, Zr or Zi) for time. Then of course there's zoom explorations, etc... ;D Anyway! 'Nuff said 'bout that. Below are some of the images I've got so far. I think the 3rd one (@ 800x600) took ~9 minutes to render on my laptop. I've also done a series of images where Zi is varied as 'time', I'll put those up later. (a) Essentially a basic Mandelbrot as a 3d "slice" (http://www.fractalforums.com/gallery/0/639_09_07_09_7_32_50_0.png) (b) Extending the Mandelbrot upward varying the initial real component of Z (instead of being fixed at '0'), showing the "slices" of the 'Cr x Zr' plane and the 'Ci x Zr' plane (http://www.fractalforums.com/gallery/0/639_09_07_09_7_32_51_1.png) (c) Removing the constraints, showing all points (except for screen clipping ;) ) in Juliabrot where initial imaginary component of Z is fixed at '0' (http://www.fractalforums.com/gallery/0/639_09_07_09_7_32_51_2.png) This last one is hard to "see" - I expect that an animation of rotating views will give more visual context. More to come... Thanks again for the inspirations and the overall cool stuff you folks create! - Mike Title: Re: Juliabrots - 3d and more Post by: cKleinhuis on July 09, 2009, 08:23:52 PM hi there, nice coder colors :D
Title: Re: Juliabrots - 3d and more Post by: Stailinn on July 10, 2009, 12:42:24 AM Heh, yah, they're pretty 80s... I'm in it for the math, less so for the art... ::)
But I'm open to ideas for improvement - what suggestions do you (or anyone) have? - Mike Title: Re: Juliabrots - 3d and more Post by: David Makin on July 10, 2009, 02:44:49 AM Heh, yah, they're pretty 80s... I'm in it for the math, less so for the art... ::) But I'm open to ideas for improvement - what suggestions do you (or anyone) have? - Mike Well unless you're going to render *much* larger I'm guessing you're way overdoing the max.iter required to get enough detail in the renders. I just tried my latest algorithm (sorry just diffuse camera lighting at the moment): Both using max. iter. 60, bailout 1024: (http://www.fractalforums.com/gallery/0/141_10_07_09_2_04_15.png) (http://www.fractalforums.com/gallery/0/141_10_07_09_2_06_31.png) The half-render took around 38 secs @800*600 and the slice took under 10 secs @800*600. Here's my code for calculating the step values - this is the "repeat" loop for each ray where the fractal iteration is performed as an inner repeat loop: t4 is the delta value along the ray i.e. position = (startx,starty,startz,startw)+t4*(deltax,deltay,deltaz,deltaw) st4 is the initial value of t4 for the ray end is the maximum value of t4 i.e. the "back-clip" position p is initially 0 on entry into the ray's repeat loop Note that the value of t12 is stored as t10 at the beginning of the ray's repeat loop *if* p==0 dists[] are the max. distances to step on a given iteration depth - initialised to large values before entry into the ray's repeat loop. t5 is |final z| i.e. x^2+y^2 where z = x + i*y i is the iteration count gotval is false before entry into the ray's repeat loop @iter is the max. iterations value @bailout the standard bailout (as normal for fractint/UF) @minval is the minimum test distance @accuracy is for homing in on the given minimum test distance using the binary search - to get smooth surfaces for the normals (i.e. to avoid visible "stepping" on the image). @scale is for user-adjustable accuracy - default 1.0, larger values to reduce the step distances (note that this reduces the distances actually stepped but does not affect the minimum test distance value i.e. changing this won't change the distance from "inside" of the render, it just changes the accuracy) Code: repeat Note that the 1e-10 and 1e10 could be adjustable. Title: Re: Juliabrots - 3d and more Post by: David Makin on July 10, 2009, 03:46:12 AM Heh, yah, they're pretty 80s... I'm in it for the math, less so for the art... ::) But I'm open to ideas for improvement - what suggestions do you (or anyone) have? - Mike You mentioned using the 4th axis as "time" - IMHO it's more interesting to use "time" to rotate the axes in and out: http://www.youtube.com/watch?v=gr-ul7sZDwc&feature=channel |