POV-Ray : Newsgroups : povray.binaries.images : 'Accidental' isosurface : Re: 'Accidental' isosurface Server Time
23 Jun 2024 15:54:48 EDT (-0400)
  Re: 'Accidental' isosurface  
From: waggy
Date: 13 Dec 2009 18:00:00
Message: <web.4b2570edce81d185f99d05c80@news.povray.org>
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

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