|
|
[POV-Ray for Windows v3.5 (b10)]
[400MHz Celeron w/ 320MB]
I decided to try to learn about Isosurfaces, so I went to the Isosurface tutorial in
Help.
Everything was going fine, until I tried combining functions with & and |.
When it rendered, nothing appeared.
I tried using the min() and max() methods of combining functions (as described in the
tutorial) and it worked as expected.
Attached are two image files showing my results, and below is the code that produced
them.
I looked in the 'Known bugs' posts before posting this, but didn't find anything.
I looked in revision.txt that came with beta10, and all I found was this:
Change 1238 on 2001/11/02 by thorsten@host27
Fixes problems with #undef of functions
Fixes & and | operators in functions
Fixes <= operator in functions
My Questions:
Has the meaning of & and | changed since the tutorial was written?
Or, is this a bug that wasn't quite fixed yet?
Thanks,
Tom Bates.
/* -------------- IsoTest.pov -------------- */
background {rgb 1}
light_source { <100,100,-10>, 1 }
camera {
location <10,10,15>
look_at <0,0,0>
angle 15
}
// axes
union {
cylinder { -10*x 10*x 0.02 }
cylinder { -10*y 10*y 0.02 }
cylinder { -10*z 10*z 0.02 }
pigment{green 1}
}
#declare fn_A = function { sqrt(y^2 + z^2) - 0.8 }
#declare fn_B = function { abs(x)+abs(y)-1 }
isosurface {
#switch (0)
#case (0) function { min(fn_A(x,y,z), fn_B(x,y,z)) } #break
#case (1) function { fn_A(x,y,z) | fn_B(x,y,z) } #break
#end
max_gradient 4
contained_by { box { -2, 2 } }
pigment {rgb 1}
}
Post a reply to this message
Attachments:
Download 'IsoTest0.jpg' (31 KB)
Download 'IsoTest1.jpg' (27 KB)
Preview of image 'IsoTest0.jpg'
Preview of image 'IsoTest1.jpg'
|
|
|
|
ingo <ing### [at] homenl> wrote in message news:Xns### [at] povrayorg...
> in news:3c504e4f@news.povray.org Tom Bates wrote:
>
> > Has the meaning of & and | changed since the tutorial was written?
> >
>
> Yes, I'll update the tutorial section.
>
Thanks.
Is there a document that explains how the new meaning is different from the old, and
how that makes it not work here?
Also, is there still a way of doing this (combining functions) with & and |, or is
the min() and max() methods now the only way?
> Ingo
>
--
Tom Bates
Post a reply to this message
|
|