POV-Ray : Newsgroups : povray.binaries.images : yet another iso : Re: yet another iso Server Time
31 Jul 2024 12:13:30 EDT (-0400)
  Re: yet another iso  
From: Alain
Date: 18 Oct 2009 19:39:15
Message: <4adba723$1@news.povray.org>

> nice iso
> here the formular:
>   2*(x*x*pow((3-4*x*x),2)+y*y*pow((3-4*y*y),2)+z*z*pow((3-4*z*z),2))-3
>   contained_by{box{-1.2,1.2}}
>   threshold -.2
> 
> rendered with cm-pov
> 
> H.Karsten
> 
> 
> ------------------------------------------------------------------------
> 
Nice little box.

I remenber a tread where it was said that "pow(x,2)" is faster than 
"x*x". It may only be due to the fact that the variable is evaluated 
only once, but it seems to be faster.

So, if you rewrite:
2*(x*x*pow((3-4*x*x),2)+y*y*pow((3-4*y*y),2)+z*z*pow((3-4*z*z),2))-3

As:
2*(pow(x,2)*pow((3-4*pow(x,2),2)+pow(y,2)*pow((3-4*pow(y,2),2)+pow(z,2)*pow((3-4*pow(z,2),2)-3

You should get a performance improvement.



Alain


Post a reply to this message

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