|
![](/i/fill.gif) |
CShake wrote:
[...]
> return (float)i + 1 - (log(log(r)/log(bailout)))/log(n);
[...]
You're return value may be a bit off. The function log(r)/log(bailout) is the
base bailout logarithm of r,* which may not be what you intended. The usual
formulation of this part is the (base n log of the natural log of the bailout)
minus (the base n log of natural log of the radius), where n is the power of the
mandelbulb. This can then be simplified a little.
return (float)i + 1 - ( log(log(bailout))-log(log(r)) )/log(n)
//then
return (float)i + 1 - log(log(bailout)/log(r)) / log(n)
(Somebody check my math, please. This might be simplified a bit more using the
root/log relationships...)
I don't know if this is the root of your current problem; the formulation you're
using may be just fine. I would like to test it, since I've been monkeying with
continuous return values for the last couple of weeks, but won't be able to do
much more on this until after finals.
* http://en.wikipedia.org/wiki/Logarithms#Change_of_base
Post a reply to this message
|
![](/i/fill.gif) |