POV-Ray : Newsgroups : povray.bugreports : inside() results in: Parse Error: Expected 'operand', object identifier, found instead : Re: inside() results in: Parse Error: Expected 'operand',objectidentifier, found instead Server Time
1 Jun 2025 13:33:23 EDT (-0400)
  Re: inside() results in: Parse Error: Expected 'operand',objectidentifier, found instead  
From: William F Pokorny
Date: 27 May 2025 20:28:25
Message: <683658a9$1@news.povray.org>
On 5/27/25 20:06, Cousin Ricky wrote:
> On 2025-05-27 19:27 (-4), Lars Rohwedder wrote:
>> I tried some magic with inside() and isosurface, but povray does not
>> like even the simplest terms involving the inside() function, see
>> attached scene file snippet:
>>
>> ---<snip>---
> 
> I think ABX hinted at the answer in the 2002 thread: inside() is not
> listed in the syntax diagram for user-defined functions.  The
> documentation reads, "only float functions that apply to float values
> may be used," but inside()'s arguments are not floats.
> 
> https://wiki.povray.org/content/Reference:Function
> 

Adding to that:

//---
#version 3.7;

#declare V = <1,2,3>;
#declare OBJ = torus { 5,1 }

// #declare F = function { inside(OBJ, V) }
    #declare F = function { pattern { object { OBJ } } }

plane { -z, 0
     pigment { function { F(x,y,z) } }
     finish { emission 1 }
}
#declare Cam = camera {}
camera { Cam translate -20*z}
//---

Bill P.


Post a reply to this message

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