|
|
Tor Olav Kristensen <tor_olav_kCURLYAhotmail.com> wrote in
news:Xns### [at] 204213191226:
> Since f_r() is a built in function in POV-Ray, it should be a
> little bit faster. But I doubt that you will be able to measure
> any significant speed increase with it in your macros.
> [...]
Thanks for clearing that. Oh, and just in case you may think I'm not
reading your suggestions (after that ln() thing), I feel I need to
explain why I opted not to use some of your suggestions:
Let's take for example:
#if (R > 0)
#local S = sin(R)/R;
#else
#local S = 0;
#end // if
(Et*<S*Q.x, S*Q.y, S*Q.z, cos(R)>)
I've decided to leave it as:
#if (R > 0)
#local S = ET*sin(R)/R;
#else
#local S = 0;
#end
<S*Q.x,S*Q.y,S*Q.z,ET*cos(R)>
Simply for performance issues. I realize it's not much, but the first
one will have two more multiplications if R>0 and will have three more
multiplications if R <= 0. And perhaps, it's simply a coding style as
well.
But I do appreciate any and all input, it helps.
Post a reply to this message
|
|