POV-Ray : Newsgroups : povray.binaries.images : Question about isosurface functions and & Server Time
4 Nov 2024 17:41:47 EST (-0500)
  Question about isosurface functions and & (Message 1 to 3 of 3)  
From: Warp
Subject: Question about isosurface functions and &
Date: 31 Jul 2000 08:50:43
Message: <39857622@news.povray.org>
This question would have been better posted in p.u.patches, but since it's
much easier to explain with images, I'll just post this question here.

  I have problems understanding the & operator in isosurface functions.
I had the impression that it's equivalent to the CSG intersection, ie.
"f1(x,y,z) & f2(x,y,x)" is 'solid' or true at a specific <x,y,z> if and
only if both f1(x,y,z) and f2(x,y,z) are 'solid'/true at that point. This
is equivalent to the intersection CSG.

  So if I have this function:

function { y-x }

  I get this:


Post a reply to this message


Attachments:
Download 'func1.jpg' (8 KB) Download 'func2.jpg' (9 KB) Download 'func3.jpg' (7 KB)

Preview of image 'func1.jpg'
func1.jpg

Preview of image 'func2.jpg'
func2.jpg

Preview of image 'func3.jpg'
func3.jpg


 

From: Warp
Subject: Re: Question about isosurface functions and &
Date: 31 Jul 2000 08:57:02
Message: <3985779e@news.povray.org>
I got it.
  For some reason the operator & has higher precedence than + or -. So the
solution is to put proper parentheses:

function { (y-x) & (-(y+.1)+x) }

  Instead of deleting my question, I'll just leave it here for others to
learn from my mistake.

-- 
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: Tony[B]
Subject: Re: Question about isosurface functions and &
Date: 31 Jul 2000 09:17:45
Message: <39857c79@news.povray.org>
I think you need to put each one into a parenthesis, like this: function
 (y-x) & (-(y+.1)+x) }


Post a reply to this message

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