POV-Ray : Newsgroups : povray.unofficial.patches : complicated functions : Re: complicated functions Server Time
1 Sep 2024 20:15:34 EDT (-0400)
  Re: complicated functions  
From: Chris Huff
Date: 7 Nov 2000 14:51:15
Message: <chrishuff-738264.14511707112000@news.povray.org>
In article <3a07db72@news.povray.org>, "Wlodzimierz ABX Skiba" 
<abx### [at] abxartpl> wrote:

> I have checked that simple R function is called
> nearly 400 times by subfunctions for the same coordinates,
> subfunctions are also called many times
> and I want ask if there is optimized calling with the same arguments ?
> function at call should checks last called arguments
> and compare with new one
> if are equal than return remebered result instead of calculated

This type of optimization has been discussed a while ago, I think the 
discussion started in povray.general and spread to .programming...
Unfortunately, nobody has ever done anything about it. There don't seem 
to be any people who understand the isosurface code well enough and have 
the time to implement this. Or maybe, like me, they are simply waiting 
for 3.5 to come out so they don't have to forget a lot of what they 
learned and have a cleaner, more stable set of code to work with.


> to avoid slower render time for simple isosurface
> this feature should be switched inside isosurface
> (i.e. keyword "fast_results")

This could be done at parse time so it wouldn't slow down even the 
simplest functions, so this option would be unnecessary.

Another possibly useful feature would be the ability to use variables in 
the function, for example:
function {
    A = sqr(x+y*Func(x,y,z));
    Func2(A, A+2, x+A/2)
}
And of course, functions allowing different numbers of parameters...

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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