 |
 |
|
 |
|
 |
|  |
|  |
|
 |
From: Lars Rohwedder
Subject: inside() results in: Parse Error: Expected 'operand', object identifier, found instead
Date: 27 May 2025 19:27:36
Message: <68364a68@news.povray.org>
|
|
 |
|  |
|  |
|
 |
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>---
==== [Parsing...] ===================================================
File 'bugreport.pov' line 6: Parse Error: Expected 'operand', object
identifier found instead
Fatal error in parser: Cannot parse input.
Render failed
----<snap>----
I ask a search engine and found the same bug reported already many eons
ago, but without useful replies, e.g. from 2010:
http://news.povray.org/povray.advanced-users/message/%3Cweb.4c7d7306e632d53a274f74a20%40news.povray.org%3E/
or from 2002:
https://news.povray.org/povray.newusers/thread/%3C083umu8qdb1gjq1o9nr1kjtlp0s93a3peq%404ax.com%3E/
Is it a bug in povray, can you reproduce it? Or am I holding it wrong?
Lars
Post a reply to this message
Attachments:
Download 'bugreport.pov.txt' (1 KB)
|
 |
|  |
|  |
|
 |
From: Cousin Ricky
Subject: Re: inside() results in: Parse Error: Expected 'operand', objectidentifier, found instead
Date: 27 May 2025 20:06:29
Message: <68365385$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
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
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: William F Pokorny
Subject: Re: inside() results in: Parse Error: Expected 'operand',objectidentifier, found instead
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
|
 |
|  |
|  |
|
 |
From: Thorsten
Subject: Re: inside() results in: Parse Error: Expected 'operand', objectidentifier, found instead
Date: 27 May 2025 20:36:48
Message: <68365aa0$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 28.05.2025 01:27, Lars Rohwedder wrote:
>
>
https://news.povray.org/povray.newusers/thread/%3C083umu8qdb1gjq1o9nr1kjtlp0s93a3peq%404ax.com%3E/
>
> Is it a bug in povray, can you reproduce it? Or am I holding it wrong?
Well, if you had decided to read the whole thread instead of just some
random message in it, you would already have found the answer yourself:
https://news.povray.org/povray.advanced-users/thread/%3Cweb.4c608fec6babf39befdd5d0%40news.povray.org%3E/?mtop=350184&moff=10
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Lars Rohwedder <rok### [at] gmx de> wrote:
> I tried some magic with inside() and isosurface, but povray does not
> like even the simplest terms involving the inside() function,
inside () never got implemented in the function virtual machine, so:
Use an object pigment pattern in your function instead:
function {
pigment{
object{
MyObject
rgb 0 // outside
rgb 1 // inside
}
}
}
Then the result of your "inside" test will be the rgb value.
- BE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |