Welcome to Fractal Forums

Fractal Software => Mandelbulb 3d => Topic started by: Jesse on February 12, 2011, 10:06:06 PM




Title: More handsome reciprocal formula
Post by: Jesse on February 12, 2011, 10:06:06 PM
Following a suggestion from DarkBeam i modified the reciprocal formula a bit to limit artifacts.

The results are changing with bigger limits, but are still unique enough to use it instead.

Here is a pic with limiter = 0.6, took only about 3 minutes with stepwidth limiter of 1:
(reciprocalX2 + sierpinski)

(http://nocache-nocookies.digitalgott.com/gallery/5/1127_12_02_11_9_45_29.jpeg)



Title: Re: More handsome reciprocal formula
Post by: 0Encrypted0 on February 12, 2011, 11:04:51 PM
Would a reciprocalY or reciprocalZ be possible?
If so, would they be useful?


Title: Re: More handsome reciprocal formula
Post by: DarkBeam on February 12, 2011, 11:31:35 PM
If Jesse don't write reciprocal y z i'll do by myself. It is a menace :lol:


Title: Re: More handsome reciprocal formula
Post by: Jesse on February 12, 2011, 11:38:25 PM
Only if you write a reciprocal R too, just my menace  :dink:


Title: Re: More handsome reciprocal formula
Post by: DarkBeam on February 13, 2011, 11:10:17 AM
Only if you write a reciprocal R too, just my menace  :dink:

Sphereinv is a reciprocal r. :D Already done :banana:


Title: Re: More handsome reciprocal formula
Post by: DarkBeam on February 13, 2011, 11:41:34 AM
From sphereinv description;
x', y', z' => Translate + scaling (by radius) of x, y, z with given params.
Then, defined Rho = (x'*x'+y'*y'+z'*z'), <- = R
x'' = x'/Rho
y'' = y'/Rho
z'' = z'/Rho

 :dink:


Title: Re: More handsome reciprocal formula
Post by: Jesse on February 13, 2011, 01:19:03 PM
uhm, youre absolutely right... dividing by the sqr.

But a little tip should be ok, because dividing is much slower than multiplication:
compute the reciprocal of Rho and multiplicate 3 times, fld1, fdivrp to do the reciprocal value.
Just in case you had not done so, i didnt looked at the source.

Keep up your good work!  :)


Title: Re: More handsome reciprocal formula
Post by: DarkBeam on February 13, 2011, 01:35:31 PM
uhm, youre absolutely right... dividing by the sqr.

But a little tip should be ok, because dividing is much slower than multiplication:
compute the reciprocal of Rho and multiplicate 3 times, fld1, fdivrp to do the reciprocal value.
Just in case you had not done so, i didnt looked at the source.

Keep up your good work!  :)

But in the end you have to divide in every case :hmh: ... Where is the optimization?

Another question

You divide by y+epsilon. But I meant;
compare y by epsilon
if y<epsilon, cutoff.
;)


Title: Re: More handsome reciprocal formula
Post by: Jesse on February 13, 2011, 09:35:26 PM
But in the end you have to divide in every case :hmh: ... Where is the optimization?

Instead of:
x'' = x'/Rho
y'' = y'/Rho
z'' = z'/Rho

You do:
Rho = 1 / Rho    //or include it in the step before
x'' = x'*Rho
y'' = y'*Rho
z'' = z'*Rho

So you have only 1 division instead of 3.

Quote
Another question

You divide by y+epsilon. But I meant;
compare y by epsilon
if y<epsilon, cutoff.
;)

I know, that is a bit different version.
Did not tried your version, dunno what might be better.  Just do it like you want and we have more options.  :)


Forgot:
in my formula there is a little bug, if you use negative limiter values:  i used 'or' for the sign function and not 'xor', but that affects not very much.
And it makes no difference on positive values, so it is not urgent to change it.  Just if you want to copy it...


Title: Re: More handsome reciprocal formula
Post by: DarkBeam on February 13, 2011, 11:04:11 PM
I need your help for  coding my first formula ... A 4d extension of Barnsley but too bad don't work. :) tomorrow I will send


Title: Re: More handsome reciprocal formula
Post by: Jesse on February 14, 2011, 06:26:10 PM
Would a reciprocalY or reciprocalZ be possible?
If so, would they be useful?

Here they are, gives new nice possibilities in combination with the sierpinski for example!



Title: Re: More handsome reciprocal formula
Post by: bib on February 14, 2011, 06:59:04 PM
Would a reciprocalY or reciprocalZ be possible?
If so, would they be useful?

Here they are, gives new nice possibilities in combination with the sierpinski for example!



The limiter instantly gives me animation ideas :) Thanks Jesse!


Title: Re: More handsome reciprocal formula
Post by: Madman on February 14, 2011, 07:33:06 PM
Ohw yeah very nice! The possibilities got infiniter once again  :dink: