|
![](/i/fill.gif) |
On 08/31/2010 06:24 PM, Sven Geier wrote:
> That's not much of a documentation, I'd like to note. I had never heard of this
> function, but from the documentation I concluded that it should be possible to
> do something like this with it:
>
> #declare letters = object { text { ttf "arialuni.ttf" "OPQ", 1, 0} };
> isosurface {
> function { 0.5-inside( letters ,<x,y,z> ) }
> contained_by {sphere {0 2}}
> max_gradient 5
> pigment {color rgb .5}
> }
so you want to subtract either 0 or 1 from 0.5 .... that's what inside
is going to give you.
> Instead, this gives me the laconic error message
>
> "C:\Documents and Settings\Sven\test.pov" line 17: Parse Error: Expected
> 'operand', object identifier found instead
maybe this applies:
inside does not accept object-identifiers to non-solid objects.
> So apparently "inside()" doesn't actually accept an object reference
> as an argument, but requires an "operand" (whatever that may mean in this
> context).
This works OK fine for me:
#declare TestObject = box { 0, 1 pigment { rgb 1 } };
#if ( inside ( TestBox, <0.5,0.5,0.5> ) )
#debug "Inside\n"
#else
#debug "Outside\n"
#end
change the vector to something outside the test object and the "Outside"
message is issued.
Post a reply to this message
|
![](/i/fill.gif) |