Mike Williams wrote:
>>
>>Although it will be quite a bit faster if you use the internal function
>>f_sphere().
>
>
> That gives a speed increase of about 6%. (It's hard to be exact because
> it's highly dependent on the values of max_gradient, which are not the
> same in the two cases. The max_gradient values suggested by POV vary
> slightly depending on the exact details of the scene)
Of course they do - they are estimations based on the performed function
evaluations.
The real gradient of the f_sphere() function is constant and exactly one
- the non-uniform scaling of course changes that. The gradient of your
function is non-constant and much larger in some parts of the container.
So using the internal f_sphere() function instead of your variant is
especially efficient if you use a too large container like in your code.
Christoph
--
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 24 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/
Post a reply to this message
|