POV-Ray : Newsgroups : povray.beta-test : v3.8b2. height_field input values at 0.0 not clean. : Re: v3.8b2. height_field input values at 0.0 not clean. Server Time
23 Feb 2024 19:35:54 EST (-0500)
  Re: v3.8b2. height_field input values at 0.0 not clean.  
From: William F Pokorny
Date: 17 Feb 2023 04:51:17
Message: <63ef4e15$1@news.povray.org>
On 2/16/23 19:56, Bald Eagle wrote:
> since a 3-term select statement is divided into 2 results:  negative or
 > ????.

Bill W (BE) explained well.

However, I'm going to re-state things because what showed up where I 
have ???? characters above looks different on the web than what I see in 
Thunderbird(a).

There are two forms of select(). The is a four term/argument version and 
a three term version. The four term allows 'actions' for negative, zero 
and positive input values. The three term one allows actions for 
negative and (zero or positive) values.

I used the 4 term because I think it reads a little cleaner when setting 
up a boolean test in the first term which can only return a zero or one 
- the negative action is never used as Bill W said.

Aside: You can use the 3 term select depending upon a boolean result in 
the first term test by doing something like:

select(1-(2*((x<0.0) | (x>1.0))), 0, 1)

I think this form less clear and, FWIW, it's slower than the four term 
version.

Bill P.

(a) The leading '>' character got picked up as being an indication of 
text from a previous post and is displaying as a vertical bar '|' in 
Thunderbird.


Post a reply to this message

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