Welcome to Fractal Forums

Fractal Software => Mandelbulb 3d => Topic started by: luc2 on March 06, 2012, 04:45:41 PM




Title: A possible 3D fractal formula
Post by: luc2 on March 06, 2012, 04:45:41 PM
Dear all,

Excuse my English, it's not my natural language and I'll try to be as clear as possible.

One 2D fractal formula I used a lot is the quad formula from Stephen Ferguson's Tierazon, 8 years ago I asked for help and had it code for UF, because I used this formula a lot I have a good mental representation of it and I think a 3D version of it could be very interesting. It's possible that someone already tried it and it's not interesting or it's already exist and I did'n recognize it in the list of formulas...

Sadly, even if I used math, fractal, 2D and 3D algorithms a lot in my images, I have a really limited knowledge of maths and coding.

I add the code of this formula in my post and like to have your opinion about a 3D version of this formula;

Quad {
;
; Based on an algorithm for Tierazon formula 90 from Stephen Ferguson,
; via Luc Benard. Very sensitive to changes in bailout value and
; min. distance. For Bailout-Test "|Z - LastZ|", 15 is a good bailout
; value. For Bailout-Test "|Z|", 4 to 6 are good bailout values.
; See blb.txt for comments.
; 18 April 2003
;
init:
  z = @ZInitFunc(#pixel) 
  if @ThisMode == "Mandelbrot"
    c = @CFunc(#pixel)
  else ;Julia
    c = @CFunc(@seed)
  endif

  complex LastZ
  float zr
  float zi
  float dist

loop:
  LastZ = z
 
  z = z*@ZFactor + c
  zr = real(z)
  zi = imag(z)
 
  if zr >= 0
    zr = zr - @Offset
  else
    zr = zr + @Offset
  endif
 
  if zi >= 0
    zi = zi - @Offset
  else
    zi = zi + @Offset
  endif
 
  z = zr + flip(zi)
 
  if @BailTest == "|Z - LastZ|"
    dist = |z - LastZ|
  else ; "|Z|"
    dist = |z|
  endif
 
bailout:
  dist > @DistMin && dist  < @Bailout

default:
  title = "Quad"
  magn = 0.24 
  param ThisMode ;Current Mode
    default = 0
    enum = "Mandelbrot" "Julia"
    visible = False
  endparam
  param NextMode ;Mode to switch to
    default = 1
    enum = "Mandelbrot" "Julia"
    visible = False
  endparam 
  heading
    caption = "M-Set Mode  (F7 to Switch)"
    visible = (@ThisMode == "Mandelbrot")
  endheading
  heading
    caption = "J-Set Mode  (F7 to Switch)"
    visible = (@ThisMode == "Julia")
  endheading 
  complex param seed
    caption = "Julia seed"
    default = (0,0)
    visible = (@ThisMode == "Julia")
  endparam   
  param BailTest
    caption = "Bailout Test"
    enum = "|Z - LastZ|" "|Z|"
    default = 0
  endparam   
  float param Bailout
    caption = "Bailout value"
    default = 15
    min = 0
  endparam
  float param DistMin
    caption = "Minimum Distance"
    default = .001
    min = 0
  endparam
  func ZInitFunc
    caption = "Z Init. Function"
    default = ident()
  endfunc   
  func CFunc
    caption = "C Function"
    default = ident()
  endfunc 
  float param ZFactor
    caption = "Z Factor"
    default = 1
  endparam 
  float param Offset
    caption = "Offset"
    default = 2
  endparam   
 
switch:
  type = "Quad"
  ThisMode = NextMode
  NextMode = ThisMode
  seed = #pixel
  BailTest = BailTest
  Bailout = Bailout
  DistMin = DistMin
  ZInitFunc = ZInitFunc
  CFunc = CFunc
  ZFactor = ZFactor
  Offset = Offset   
} ;END OF "Quad"
 


Title: Re: A possible 3D fractal formula
Post by: DarkBeam on March 06, 2012, 05:51:33 PM
At a first glance I see that it is discontinue, this makes it not portable in 3d, you need continue ones
If you can not derive your formula it produces noise
Sorry
Luca


Title: Re: A possible 3D fractal formula
Post by: Alef on March 06, 2012, 07:05:27 PM
I would recomend to code it first in some simpler programm. Say Chaos pro. Then you could represent 3D render. Just use quaternionic numbers an quaternionic parameters instead of complex. There are just two formula writers for M3D (Jesse included), and at first they would be interested in their own projects, and just at he second of those of others (as all would).


Title: Re: A possible 3D fractal formula
Post by: DarkBeam on March 08, 2012, 11:57:19 AM
And remember, use continue transforms whenever possible :angel1:


Title: Re: A possible 3D fractal formula
Post by: Alef on March 09, 2012, 03:19:49 PM
I just implemented fracmonk's 2D formulas into UF database (as EM.ufm). It literary took a whole day from the morning, and after I had tested and implemented some of these formulas in Chaos pro database, so knowing how they works.

So I can imagine that in 3D, having restricted conditions and no easy native compiler it would be a ten times more time consuming / hard.

This formula realy don't looks would be usefull in 3D. 3D fractals are insides without 2D outsides;)


Title: Re: A possible 3D fractal formula
Post by: luc2 on March 11, 2012, 06:43:11 AM
Thank you all for your answers. just an other time where my intuition got wrong :-). From what I understand of your answers, with my limited knowledge of math and coding, the formula will give a cloud of points instead of a solid form, this seem logical, may be the best way to play with this formula in 3D, is to code it in Structure Synth and associate cubes or spheres to the point generate by the equation.


Title: Re: A possible 3D fractal formula
Post by: Alef on March 14, 2012, 03:45:10 PM
These shapes looks interesting:
http://en.wikipedia.org/wiki/Hyperbolic_geometry#Visualizing_hyperbolic_geometry (http://en.wikipedia.org/wiki/Hyperbolic_geometry#Visualizing_hyperbolic_geometry)

Just that there is no formulas for these coral shapes.

And a very strange stuff:
http://www.math.cornell.edu/~dwh/papers/crochet/crochet.html (http://www.math.cornell.edu/~dwh/papers/crochet/crochet.html)