POV-Ray : Newsgroups : povray.binaries.scene-files : f_mandelbulb.010.zip Server Time
25 Apr 2024 07:01:14 EDT (-0400)
  f_mandelbulb.010.zip (Message 1 to 10 of 20)  
Goto Latest 10 Messages Next 10 Messages >>>
From: waggy
Subject: f_mandelbulb.010.zip
Date: 19 Dec 2009 02:05:35
Message: <4b2c7b3f@news.povray.org>
Here is a zip containing files you may use to render the mandelbulb in 
POV-Ray.  It contains the following files, mbsdl_* for use with any 
version of POV-Ray, and mb_* for use with a patched POV-Ray.


mbsdl_standalone.pov and mb_standalone.pov are minimal files with no 
dependencies.

mbsdl.inc          This is the include file used by all of the mbsdl_* 
files below.

mbsdl_stage1.pov   mb_stage1.pov   Minimal files
mbsdl_basic.pov    mb_basic.pov    A mandelbulb isosurface colored by a 
'bulb function
mbsdl_powers.pov   mb_powers.pov   Six mandelbulbs, powers 2-7
mbsdl_multi_p.pov  mb_multi_p.pov  Six composite power bulbs
mbsdl_pattern.pov  mb_pattern.pov  Use f_mandelbulb() as a pigment pattern
mbsdl_media.pov    mb_media.pov    Use f_mandelbulb() as a media density

mbsdl_renderall.sh mb_renderall.sh Bash scripts to render them all. (Linux)


There is also a long README.TXT, patches and replacement files to add 
f_mandelbulb() internally, and a patch to extend the expiration of beta 34.


Post a reply to this message


Attachments:
Download 'f_mandelbulb.010.zip' (57 KB)

From: waggy
Subject: Re: f_mandelbulb.010.zip [Rendered Images]
Date: 19 Dec 2009 02:11:56
Message: <4b2c7cbc@news.povray.org>
Here are small anti-aliased images of each of the scene files.


Post a reply to this message


Attachments:
Download 'mb_basic.png' (70 KB) Download 'mb_media.png' (57 KB) Download 'mb_multi_p.png' (50 KB) Download 'mb_pattern.png' (52 KB) Download 'mb_powers.png' (59 KB) Download 'mb_stage1.png' (11 KB) Download 'mb_standalone.png' (36 KB)

Preview of image 'mb_basic.png'
mb_basic.png

Preview of image 'mb_media.png'
mb_media.png

Preview of image 'mb_multi_p.png'
mb_multi_p.png

Preview of image 'mb_pattern.png'
mb_pattern.png

Preview of image 'mb_powers.png'
mb_powers.png

Preview of image 'mb_stage1.png'
mb_stage1.png

Preview of image 'mb_standalone.png'
mb_standalone.png


 

From: waggy
Subject: f_mandelbulb.020.zip
Date: 27 Dec 2009 23:21:14
Message: <4b38323a@news.povray.org>
Here's the update.  [I see the .binaries, so I should be OK.]

I incremented straight to 0.020 since the new function has one more 
parameter than the old (making it incompatible with existing calls), a 
phase parameter between p_phi and i.

I also put in a clunky way to switch between using the SDL and internal 
function, if you compiled it into POV-Ray with the internal patch.  Just 
rename or remove the mbsdl.inc file and the sample scenes will switch to 
using the internal function.  I updated the README.TXT to try to explain 
these and other mostly minor changes.

Also, I added another sample showing the four major variations.  The 
mb_variations.pov scene file is set to show the four power 8 variations, 
but I also attached an image of the power two variants to highlight the 
differences.

Happy 'Bulbing!

~David


Post a reply to this message


Attachments:
Download 'f_mandelbulb.020.zip' (50 KB) Download 'mb_variations.png' (35 KB) Download 'mb2_variations.png' (34 KB)

Preview of image 'mb_variations.png'
mb_variations.png

Preview of image 'mb2_variations.png'
mb2_variations.png


 

From: waggy
Subject: Re: Tricorn Fractal (f_mandelbulb.020.zip )
Date: 31 Dec 2009 05:48:07
Message: <4b3c8167@news.povray.org>
This looks an awful lot like a 3D version of the tricorn to me.

http://en.wikipedia.org/wiki/Tricorn_%28mathematics%29

It's made with the new function using a phase of 0, p_r=2, p_theta=-2, 
p_phi=2 at ten iterations.  (Note the negative p_theta.)

On another note, Paolo Bonzini recently published a paper describing how 
to express the mandelbulb function variations as a quaternion function 
mapping.  I generalized his expression to work with any scalar power, 
and besides being more flexible, it looks like it will be more 
computationally efficient than the non-integral exponent versions of the 
White, Nylander, et. al., formulae (the ones currently in use).

This quaternion version requires only 1 atan2, 1 cos, 1 sin, 2 sqrt, 1 
fractional pow(), and 3 scalar divisions per iteration (along with a 
bunch of fast multiplies and adds).  Unfortunately, the expression 
becomes extremely cumbersome when attempting to shoehorn it into a 
single SDL function, so no working code yet.

I also plan to flirt with insanity by taking a crack at reworking it for 
full quaternion power exponents.

~David


Post a reply to this message


Attachments:
Download 'mb_iso_tricorn.png' (130 KB)

Preview of image 'mb_iso_tricorn.png'
mb_iso_tricorn.png


 

From: waggy
Subject: Happy 2,0,1,0 Quaternion-power 'Bulb!
Date: 1 Jan 2010 17:10:23
Message: <4b3e72cf@news.povray.org>
I previosly wrote:
> I also plan to flirt with insanity by taking a crack at reworking it for 
> full quaternion power exponents.

Well, something cracked, all right.  Since I had to recompile anyway, I 
went ahead and coded a full quaternion power version.  Once I worked out 
the math (or more accurately, it worked me out), the resulting algorithm 
isn't that much more computationally intensive than the old White and 
Naylander formulas, and may even be a touch faster.  (It would still be 
too much to code in SDL unless I can learn how to build functions from 
macros, or write an external script to make the SDL function.)

However, although it returns a reasonable straight power-two mandelbulb, 
the current code doesn't seem to be doing higher powers quite right. 
Regardless, what varying the imaginary parts of the quaternion power 
does is indescribable.

There are much weirder 'bulbs than the one attached, but this (2,0,1,0) 
    quaternion power beast seemed appropriate for the new year.

Wishing ya'll the best!

~David Wagner


Post a reply to this message


Attachments:
Download 'mbq2010_beast_512.png' (136 KB)

Preview of image 'mbq2010_beast_512.png'
mbq2010_beast_512.png


 

From: waggy
Subject: Re: Happy 2,0,1,0 Quaternion-power 'Bulb!
Date: 3 Jan 2010 20:40:38
Message: <4b414716@news.povray.org>
Earlier, I blathered:
> However, although it returns a reasonable straight power-two mandelbulb, 
> the current code doesn't seem to be doing higher powers quite right. 
> Regardless, what varying the imaginary parts of the quaternion power 
> does is indescribable.
> 
> There are much weirder 'bulbs than the one attached, but this (2,0,1,0) 
>    quaternion power beast seemed appropriate for the new year.

I found and corrected one error that only applied to using a power with 
an imaginary part.  I attached the 2,0,1,0 mandelquat after rendering it 
with the updated code.

For pure real power mandelbulbs, I'm still only getting the expected 
results for power two, and still don't know why.

~David


Post a reply to this message


Attachments:
Download 'mbq2010_beast_640.png' (199 KB)

Preview of image 'mbq2010_beast_640.png'
mbq2010_beast_640.png


 

From: waggy
Subject: Mandelquat Mapping (WAS: Happy 2,0,1,0 Quaternion-power 'Bulb!)
Date: 3 Jan 2010 23:40:45
Message: <4b41714d$1@news.povray.org>
waggy babbled on:
> For pure real power mandelbulbs, I'm still only getting the expected 
> results for power two, and still don't know why.

Bonzini updated his paper today, and my pure real power results are 
consistent with his.  The formulas needed to reproduce arbitrary real 
higher-power mandelbulbs using quaternions are quite different than 
originally described (except for power two, after trig reduction), and 
seem to involve even more trig functions than the classic formulation.

http://github.com/bonzini/mbulb/raw/master/mbulb.pdf

There still may or may not be errors in how my code handles the 
imaginary part of quaternion powers.  I think I need to take a step back 
and figure out what it's supposed to do rather than continue to muck 
about with variations.

If there's interest, I'll post what I have so far.  Otherwise, I'll hang 
onto it until I can describe what it does.

~David


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Happy 2,0,1,0 Quaternion-power 'Bulb!
Date: 5 Jan 2010 19:00:01
Message: <web.4b43d232b2edd653527a960f0@news.povray.org>
waggy <hon### [at] handbasketorg> wrote:
> I previosly wrote:
> > I also plan to flirt with insanity by taking a crack at reworking it for
> > full quaternion power exponents.
>
> Well, something cracked, all right.  Since I had to recompile anyway, I
> went ahead and coded a full quaternion power version.  Once I worked out
> the math (or more accurately, it worked me out), the resulting algorithm
> isn't that much more computationally intensive than the old White and
> Naylander formulas, and may even be a touch faster.  (It would still be
> too much to code in SDL unless I can learn how to build functions from
> macros, or write an external script to make the SDL function.)
....

David,

If you would like to see how hyou can build functions with macros,
then below is a macro that produces a function that is similar to
your recursive (non-quaternion) Mandelbrot function.


// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#macro MandelBulbFunction(R_Pwr, R_BO, Ph_Pwr, Ph_Phase, Th_Pwr, Max_Iter)

  #local ln_R_BO = ln(R_BO);
  #local ln_R_Pwr = ln(R_Pwr);
  #local J = Max_Iter - 1;
  #local MB_Fns = array[Max_Iter][2]
  #local I = Max_Iter;
  #while (I > 0)
    #local I = I - 1;
    #local MB_Fns[I][1] =
      function(x, y, z, _r, _rp, _ph, _th) {
        #if (I = J)
          0
        #else
          select(
            _r - R_BO,
            MB_Fns[I+1][0](
              x,
              y,
              z,
              x + _rp*cos(_ph)*cos(_th),
              y + _rp*sin(_ph),
              z + _rp*cos(_ph)*sin(_th)
            ),
            1/(I - ln(ln(_r)/ln_R_BO)/ln_R_Pwr)
          )
        #end // if
      }
    #local MB_Fns[I][0] =
      function(x, y, z, _ix, _iy, _iz) {
        MB_Fns[I][1](
          x,
          y,
          z,
          f_r(_ix, _iy, _iz),
          pow(f_r(_ix, _iy, _iz), R_Pwr),
          Ph_Pwr*(f_ph(_ix, _iy, _iz) + Ph_Phase),
          Th_Pwr*f_th(_ix, _iy, _iz)
        )
      }
  #end // while

  function { MB_Fns[0][0](x, y, z, x, y, z) }

#end // macro MandelBulbFunction


// It can be used like this:
#declare MandelBulbFn = MandelBulbFunction(8, 3, 8, pi/2, 8, 5)

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

--
Tor Olav
http://subcube.com


Post a reply to this message

From: waggy
Subject: Re: Happy 2,0,1,0 Quaternion-power 'Bulb!
Date: 5 Jan 2010 21:52:27
Message: <4b43faeb$1@news.povray.org>
Tor Olav Kristensen wrote:
> If you would like to see how hyou can build functions with macros,
> then below is a macro that produces a function that is similar to
> your recursive (non-quaternion) Mandelbrot function.

Thank you very much!

All things considered, unless there is a big performance hit for some 
reason, I'd prefer to use this method to build the user-defined function 
at parse time.  The recursive formulation always struck me as an odd way 
to iterate, and povray crashing when the function is defined at the 
"wrong" time is reason enough not to stick with it.

Besides, if the quaternion road leads somewhere fruitful, trying to 
combine all the intermediate expressions by hand would be a nightmare.

With Great Appreciation,
~David Wagner


Post a reply to this message

From: makc
Subject: Re: Happy 2,0,1,0 Quaternion-power 'Bulb!
Date: 20 Jan 2010 10:00:01
Message: <web.4b57198bb2edd6533de567e60@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> [SNIP]
> // It can be used like this:
> #declare MandelBulbFn = MandelBulbFunction(8, 3, 8, pi/2, 8, 5)
>

could you please make a pov file with that for all the newbies to learn from?


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.