POV-Ray : Newsgroups : povray.newusers : Searching for logical "not" Server Time
5 Sep 2024 16:17:46 EDT (-0400)
  Searching for logical "not" (Message 1 to 7 of 7)  
From: Marc-Hendrik Bremer
Subject: Searching for logical "not"
Date: 7 Sep 2000 10:16:53
Message: <39b7a355$1@news.povray.org>
Hi,

I want do difference two functions (to add a third one afterwards) and thing
it could be done by "& not". Alas, I can't find the logical "not" operator
in functions. Do I miss something? Does a simple "& -" the job or is there
no logical "not"?
I can't use "sign -1" because that would effect the hole function.

Thanks in advance,

Marc-Hendrik


Post a reply to this message

From: Steve
Subject: Re: Searching for logical "not"
Date: 7 Sep 2000 19:01:15
Message: <slrn8rg7gd.kc9.steve@zero-pps.localdomain>
On Thu, 7 Sep 2000 16:17:02 +0200, Marc-Hendrik Bremer wrote:
>Hi,
>
>I want do difference two functions (to add a third one afterwards) and thing
>it could be done by "& not". Alas, I can't find the logical "not" operator
>in functions. Do I miss something? Does a simple "& -" the job or is there
>no logical "not"?
>I can't use "sign -1" because that would effect the hole function.
>
>Thanks in advance,
>
>Marc-Hendrik

#declare TheCount=2;

#if(TheCount !=1)

  pigment{Gold}

  #else
  
  pigment{Blue}   

#end

This works, I've just tested it, and I couldn't find it documented, I 
just tried something I've seen in other languages. 

-- 
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

 11:40pm  up 17 days,  3:53,  3 users,  load average: 1.53, 1.52, 1.25


Post a reply to this message

From: Chris Huff
Subject: Re: Searching for logical "not"
Date: 7 Sep 2000 22:30:12
Message: <chrishuff-1357B6.21315707092000@news.povray.org>
In article <slr### [at] zero-ppslocaldomain>, 
ste### [at] zeroppsuklinuxnet wrote:

> #if(TheCount !=1)
...
> This works, I've just tested it, and I couldn't find it documented, I 
> just tried something I've seen in other languages.

It *is* documented(section 4.1.3.3 "Float Operators", Relational 
expressions), but I don't think this is what he is looking for. I think 
Marc-Hendrik is looking for a not operator for isosurface functions. 
Such an operator does not exist as far as I know, it might be a better 
idea to just try CSG...though you could also do it by fiddling around 
with the functions to get their "inside" on the other side of the 
surface.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Warp
Subject: Re: Searching for logical "not"
Date: 8 Sep 2000 06:57:02
Message: <39b8c5fe@news.povray.org>
Marc-Hendrik Bremer <Mar### [at] t-onlinede> wrote:
: I want do difference two functions (to add a third one afterwards) and thing
: it could be done by "& not". Alas, I can't find the logical "not" operator
: in functions. Do I miss something? Does a simple "& -" the job or is there
: no logical "not"?

  Negating the function works if your threshold is 0.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Steve
Subject: Re: Searching for logical "not"
Date: 8 Sep 2000 15:28:55
Message: <slrn8rhgau.m2f.steve@zero-pps.localdomain>
On Thu, 07 Sep 2000 21:31:57 -0500, Chris Huff wrote:
>In article <slr### [at] zero-ppslocaldomain>, 
>ste### [at] zeroppsuklinuxnet wrote:
>
>> #if(TheCount !=1)
>...
>> This works, I've just tested it, and I couldn't find it documented, I 
>> just tried something I've seen in other languages.
>
>It *is* documented(section 4.1.3.3 "Float Operators", Relational 
>expressions), but I don't think this is what he is looking for. I think 
>Marc-Hendrik is looking for a not operator for isosurface functions. 
>Such an operator does not exist as far as I know, it might be a better 
>idea to just try CSG...though you could also do it by fiddling around 
>with the functions to get their "inside" on the other side of the 
>surface.

But you could only find it because you did a search on "!", if you didn't
know that that is waht it is and that pov actually calles them float 
operators rather that logical operators you'd be a bit stuck wouldn't you.
 

-- 
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

 11:21am  up 17 days, 15:34,  3 users,  load average: 1.19, 1.12, 1.04


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: Searching for logical "not"
Date: 9 Sep 2000 13:26:01
Message: <39ba72a9@news.povray.org>
Sorry Steve I was indeed not clear in my question. As Chris said, I was
looking for an isosurface-function-operator.

CSG does not work, because the cutout-surface would not be affected by the
third function (in this case a wood-pattern as function). In this special
case I have now, I avoided the difference by "rebuilding" the inverted shape
(a simple box) with two unioned boxes (the contained_by-object cared for the
rest). But that was only possible in this simple case.

Thanks for the help,

Marc-Hendrik

Steve schrieb in Nachricht ...
>On Thu, 07 Sep 2000 21:31:57 -0500, Chris Huff wrote:
>>In article <slr### [at] zero-ppslocaldomain>,
>>ste### [at] zeroppsuklinuxnet wrote:
>>
>>> #if(TheCount !=1)
>>...
>>> This works, I've just tested it, and I couldn't find it documented, I
>>> just tried something I've seen in other languages.
>>
>>It *is* documented(section 4.1.3.3 "Float Operators", Relational
>>expressions), but I don't think this is what he is looking for. I think
>>Marc-Hendrik is looking for a not operator for isosurface functions.
>>Such an operator does not exist as far as I know, it might be a better
>>idea to just try CSG...though you could also do it by fiddling around
>>with the functions to get their "inside" on the other side of the
>>surface.
>
>But you could only find it because you did a search on "!", if you didn't
>know that that is waht it is and that pov actually calles them float
>operators rather that logical operators you'd be a bit stuck wouldn't you.
>
>
>--
>Cheers
>Steve              email mailto:ste### [at] zeroppsuklinuxnet
>
>%HAV-A-NICEDAY Error not enough coffee  0 pps.
>
>web http://www.zeropps.uklinux.net/
>
>or  http://start.at/zero-pps
>
> 11:21am  up 17 days, 15:34,  3 users,  load average: 1.19, 1.12, 1.04


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: Searching for logical "not"
Date: 9 Sep 2000 13:29:22
Message: <39ba7372$1@news.povray.org>
Thanks Warp!

I'll try that. 

Marc-Hendrik

Warp schrieb in Nachricht <39b8c5fe@news.povray.org>...
>
>  Negating the function works if your threshold is 0.
>


Post a reply to this message

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