POV-Ray : Newsgroups : povray.advanced-users : output an octree file : Re: output an octree file Server Time
1 Jul 2024 05:53:12 EDT (-0400)
  Re: output an octree file  
From: Thorsten Froehlich
Date: 1 Sep 2010 03:35:00
Message: <web.4c7e01a7e632d53ae619b42c0@news.povray.org>
"Sven Geier" <.sven.at.sgeier.dot.net.nospamplease> wrote:
> #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}
> }
>
> 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

What this means is that POV-Ray thinks "inside" is another function and hence
expects that function to have operands. The declared object "letters" is not
allowed in functions, hence you get the error message that an object identifier
(which is what "letters" is) is not allowed. It is not an operand either because
the declared value has been expanded in the function already. And objects are
not allowed in functions as operands.

You need to actually read about what is allowed in functions and what is not
allowed: <http://www.povray.org/documentation/view/3.6.1/231/>

As you can see, "inside" is not in the list of built-in functions for use in
"function" statements.

However, you can still access an object inside a function by using the object
pattern. This works because you can declare pattern functions, as described on
the manual page above (and the pages that follow/link).

Thorsten, POV-Team


Post a reply to this message

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