|
|
>> #declare Fn1 =
>> {
>> ( (sin(x) * cos(y) * tan(z))*sqrt(x*y / z) - exp(log(x)*y - z) ) *
>> (tan(sin(x) * cos(y) * tan(z) + sqrt(x*y / z)) - log(exp(log(x)*y - z)) )
>> }
>>
>> Notice how A, B and C have to be calculated *TWICE*...
>>
>> Is there any way round this??
>
>
> Yes. I once presented a solution to this.
>
> It's halfway down in this message:
>
> http://tinyurl.com/3f642
>
http://news.povray.org/povray.text.scene-files/message/%3C3fbe6e34%40news.povray.org%3E/#%3C3fbe6e34%40news.povray.org%3E
Aaaahhhh.... I seeeee..... If a pass a variable into a second function,
POV-Ray calculates the value to pass ONCE, and then passes it, and it
can then be used multiple times within the second function... excellent!
The *real* function I want to render is recursive... POV-Ray reports
412K tokens. (!!) If I can figure out how to do it this way, it will
hopefully parse raster and render lots faster too... (Will probably have
to use the file-I/O directives to write an SDL file, then #include it
back in.)
Thanks for that!
Andrew @ home.
Post a reply to this message
|
|