POV-Ray : Newsgroups : povray.unofficial.patches : Why & has higher precedence than + or - in isosurface functions? : Re: Why & has higher precedence than + or - in isosurface functions? Server Time
2 Sep 2024 06:18:25 EDT (-0400)
  Re: Why & has higher precedence than + or - in isosurface functions?  
From: Warp
Date: 2 Aug 2000 05:09:57
Message: <3987e565@news.povray.org>
pk <thi### [at] videotronca> wrote:
:> uh... I always thought + meant AND...
: .... i meant to say:"i always thought * (well, dot with valign=center)
: meant AND...

  Nope, they don't mean the same thing.
  The function { x * y } is certainly not the same as function { x & y }
(you can render them if you want to see the difference).
  What you are saying in the first function is that a point <x,y,z> is inside
the shape if and only if x*y < 0.
  The the second case you are saying that a point <x,y,z> is inside the shape
if and only if x < 0 and y < 0.
  For example <-1,2,0> is inside the function { x * y } but it's not inside
the function { x & y }.

  The inverted V-looking operator (and I don't have any reason to believe
that & in isosurface functions is anything else) is a basic operator in
set theory. The same goes for | (which is the V-looking operator in set
theory and denotes union).

:> So, what's the opposite of AND? NAND? i don't think so....

  Basic set theory (I use & and | here because of the lack of the proper
characters):

  The inverse of A&B is -(A&B) ie. (-A)|(-B).

  Here '-' means "not" (ie. "not in the set"). That is, a point is not in
A&B if and only if it's either not in A or not in B (that is, it's not in
both at the same time).

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

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