POV-Ray : Newsgroups : povray.general : Request for Syntax Suggestions : Re: Request for Syntax Suggestions Server Time
7 May 2024 05:33:47 EDT (-0400)
  Re: Request for Syntax Suggestions  
From: Christian Froeschlin
Date: 23 Apr 2016 09:12:30
Message: <571b74be$1@news.povray.org>
On 23.04.2016 8:19, Le_Forgeron wrote:

> Could you move the bounded_by in the initial declare ?

This would seem more logical to me too. I don't even think
a new keyword is needed since the presence of the bounded_by
block is obvious to the parser. So having a bounding object
becomes an attribute that any function object may have (and
which might later be exploited in other context too).

However as far as I understand it the problem technically
would be in the need to analyze the compound function expression
to determine that it is indeed just a sum of functions with
attached bounding object. Such information should be available
from the parse tree of the expression but I don't know how it
is implemented in POV-Ray. If some way is needed to specify
expected limitation ahead of time one option might be to
add a new operator that accepts only bounded values, e.g.

#declare Compound_Function = function
{
   bounded_sum(f1,bounded_sum(f2,f3)).
}

or

#declare Compound_Function = function
{
   f1 [+] f2 [+] f3
}


Post a reply to this message

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