Logo by AGUS - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. March 28, 2024, 10:58:06 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Juliabrots - 3d and more  (Read 6488 times)
0 Members and 1 Guest are viewing this topic.
Stailinn
Guest
« on: July 09, 2009, 08:14:36 PM »

I've been popping into FF for a while and y'all do awesome stuff.  afro  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/ - 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...  grin

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"





(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





(c) Removing the constraints, showing all points (except for screen clipping  wink ) in Juliabrot where initial imaginary component of Z is fixed at '0'



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
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #1 on: July 09, 2009, 08:23:52 PM »

hi there, nice coder colors cheesy
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Stailinn
Guest
« Reply #2 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...  :smiley

But I'm open to ideas for improvement - what suggestions do you (or anyone) have?

- Mike
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #3 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...  :smiley

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:





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
              if p<100
                t10 = t12
                set values for iteration to position t4
              else
                set values for iteration to position (t4+1e-10)
              endif
....iterate !
              if p==0 && i>=@iter && t4<=st4
                t4 = st4
                gotval=true
              elseif p<100
                t9 = i + (log(0.5*log(@bailout)) - log(0.5*log(t5)))/log(2)
                j = i
                p = p + 100
              else
                t12 = i + (log(0.5*log(@bailout)) - log(0.5*log(t5)))/log(2)
                t12 = (t9+@iter)/(@iter+((1.0e10*@iter)*abs(t7=t12-t9)))
                p = p - 100
              endif
              if p==0 && !gotval
                if (t12<@minval && t7>0) || i>=@iter
                  if @minval-t12<@minstep && i<@iter
                    gotval = true
                  else
                    p = 1
                    t4 = t4 - (t12 = 0.5*t10)
                  endif
                else
                  if t12>dists[(j=j-1)]
                    t12 = dists[j]
                  else
                    dists[j] = t12
                  endif
                  if t12<dists[(j=j+1)]
                    dists[j] = t12
                  endif
                  if t12<dists[(j=j+1)]
                    dists[j] = t12
                  endif
                  if t12<dists[(j=j+1)]
                    dists[j] = t12
                  endif
                  t4 = t4 + (t12 = t12/(2.5*@scale))
                endif
              elseif p<100 && !gotval
                if (abs(t5 = t12 - @minval)<@accuracy \
                   || p>(log(@minval/@accuracy)/log(2)))
                  gotval = true
                elseif t5>=0
                  t4 = t4 + (t12 = 0.5*t10)
                else
                  t4 = t4 - (t12 = 0.5*t10)
                endif
                p = p + 1
              endif
            until gotval || t4>=end


Note that the 1e-10 and 1e10 could be adjustable.
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #4 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...  :smiley

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:

<a href="http://www.youtube.com/v/gr-ul7sZDwc&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/gr-ul7sZDwc&rel=1&fs=1&hd=1</a>
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Pages: [1]   Go Down
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.342 seconds with 26 queries. (Pretty URLs adds 0.01s, 2q)