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
2 Mar 2024 02:43:37 EST (-0500)
  Re: v3.8b2. height_field input values at 0.0 not clean.  
From: Tor Olav Kristensen
Date: 17 Feb 2023 20:50:00
Message: <web.63f02e8f1428d28bc076587389db30a9@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
>...
> 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.

I agree..


> 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)
>...

How about just this:

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

- or this:

select(
    -((0.0 <= x) & (x <= 1.0)),
    1,
    0
)


--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

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