POV-Ray : Newsgroups : povray.general : optimisation of functions - how to? : Re: optimisation of functions - how to? Server Time
30 Jul 2024 02:15:39 EDT (-0400)
  Re: optimisation of functions - how to?  
From: makc
Date: 20 Jan 2010 05:30:00
Message: <web.4b56d9dd6e27db373de567e60@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> "makc" <mak### [at] gmailspamcom> wrote:
> I can't remember having seen a function where this way of doing it is
> not possible.
>
> But if you or anyone else can come up with a good challenge, then
> please post it.

Not exactly my original problem, but nevertheless major waste of cpu: the
absence of "if"-like function (or am I overlooking it?)

Simple condition (x > 0) ? func (x) : 0 can be modelled, for example, with
something like func (x) * ceil ((1 + abs(x) - abs (x - 1)) / 2), but this means
pov will calculate func (x) for every x < 0 where it is not needed.

I am actually trying to render 3D fractals with isosurface, and it works, but is
painfully slow, and I don't see anything I can do about it without recompiling
povray with added internal functions :(


Post a reply to this message

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