POV-Ray : Newsgroups : povray.newusers : max(0,min(1,x)) : Re: max(0,min(1,x)) Server Time
5 Sep 2024 00:16:04 EDT (-0400)
  Re: max(0,min(1,x))  
From: Mark Wagner
Date: 3 Oct 2002 00:00:36
Message: <pan.2002.10.03.03.59.41.233724.211@gte.net>
On Wed, 02 Oct 2002 09:05:24 -0400, Rafal 'Raf256' Maj quoth:

> "Marc-Hendrik Bremer" <Mar### [at] t-onlinede> wrote in
> news:3d9aec64@news.povray.org
> 
>> There is really no need to build in everythink in the Pov-Code.
> 
> speed ?
> We have i.e. 1 room (inverted box) inside with we have camera,
> lightsource and i.e. white sphere.
> Box is covered with function with 1-3 constructions like
> max(0,min(1,x+y...))
> 
> And now we add radiosity - fo reach pixel formula min(max(... must be
> counted about 10..50 times depending on radiosity setting - that can
> probably give 5-15% of render time lost. Hmm I guess I should just add
> this minmax() function and see is speed improvment notacible :)
 
You won't gain much speed.  For example, I once converted a complicated
isosurface function for clouds to an internal pattern, and only got a
speedup of about 10%.  For a simple function such as clip(), you probably
won't be able to measure the speedup.

-- 
Mark


Post a reply to this message

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