POV-Ray : Newsgroups : povray.binaries.images : Mandelbulb test renders : Re: Mandelbulb test renders Server Time
31 Jul 2024 16:20:43 EDT (-0400)
  Re: Mandelbulb test renders  
From: waggy
Date: 16 Dec 2009 15:59:58
Message: <4b294a4e$1@news.povray.org>
waggy wrote:
> I found a way to make "hybrid" mandelbulbs combining two different powers.  It's
> a simple adjustment with no practical impact on computational time.
> 
> newx = r^n1 * sin(theta*n1) * cos(phi*n2)
> newy = r^n1 * sin(theta*n1) * sin(phi*n2)
> newz = r^n1 * cos(theta*n1)
> 
> As a sample, I attached a test render of an 8,4-power mandelbulb.
> 
Woops.  I think the image is of a n1=p_theta=4, n2=p_phi=8 'bulb.  It 
was late.

Also, I did a little experimentation (with the SDL version), and it 
looks worthwhile to allow three independent powers, like this.

newx = r^p_r * sin(theta*p_theta) * cos(phi*p_phi)
newy = r^p_r * sin(theta*p_theta) * sin(phi*p_phi)
newz = r^p_r * cos(theta*p_theta)

Now I need to refigure what log base to use for the smoothing function 
(it was originally just base "p"), then recompile...again...

Would it be worthwhile to add two functions, f_mandelbulb() for the 
single-powered 'bulb, and f_mandelbulb3() for the multi-powered one? 
I'm thinking of just specifying the triple-powered version, and leave it 
to users to declare a single-power function if they so desire...

#declare my_mandelbulb = function(x,y,z, my_power,
       my_i_bailout, my_r_bailout)
{
    f_mandelbulb(x,y,z, my_power,my_power,my_power,
       my_i_bailout, my_r_bailout)
};


P.S.  I've switched to using a "p" to indicate the [p]ower (as is done 
in some of the literature) to avoid confusion with the [n]umber of 
iterations.


Post a reply to this message

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