POV-Ray : Newsgroups : povray.unofficial.patches : megapov bug: condition inside declaration of function{pigment{}} Server Time
5 Jul 2024 13:44:32 EDT (-0400)
  megapov bug: condition inside declaration of function{pigment{}} (Message 1 to 4 of 4)  
From: Wlodzimierz ABX Skiba
Subject: megapov bug: condition inside declaration of function{pigment{}}
Date: 22 Aug 2001 05:44:27
Message: <3b837efb@news.povray.org>
This construction works fine

#declare Q=no;
#declare Radial=pigment{radial#if(Q)turbulence.3#end}

and this not

#declare Q=no;
#declare Radial=function{pigment{radial#if(Q)turbulence.3#end}}

error: No matching } in pigment, # found instead.

MegaPOV 0.6a under Windows NT 4 - PII 233 128 MB

--
#macro Sig(A,B,X)_(A,B)_(B,X)_(X,A)#end#macro _(A,B)cylinder{<A.x,A.y,3>,<B.u,
B.v,3>.1,9}#end global_settings{max_trace_level 9}light_source{0 1}camera{up y
*4right-3*x}blob{_(<3,1>,<1,-5>)_(<2,-2>,<4,-2>)Sig(x,<-1,1.5>,<1,3>)_(z-1,z-4
)pigment{rgb 1}}box{-3 3pigment{rgb 0}finish{reflection 1}hollow} // POV-Ray31


Post a reply to this message

From: Scott Hill
Subject: Re: megapov bug: condition inside declaration of function{pigment{}}
Date: 22 Aug 2001 07:51:21
Message: <3b839cb9@news.povray.org>
"Wlodzimierz ABX Skiba" <abx### [at] abxartpl> wrote in message
news:3b837efb@news.povray.org...
>
> error: No matching } in pigment, # found instead.
>

    I've had this problem - it seems 'function' uses its own parsing
routines which don't support the entire set of POV keywords... The solution
is to do something like this :

#declare Q=no;
#declare RadialPigment=pigment{radial#if(Q)turbulence.3#end}
#declare RadialFunction=function{pigment{RadialPigment}}

--
Scott Hill.
Software Engineer.
E-Mail        : sco### [at] innocentcom
Pandora's Box : http://www.pandora-software.com

*Everything in this message/post is purely IMHO and no-one-else's*


Post a reply to this message

From: Wlodzimierz ABX Skiba
Subject: Re: megapov bug: condition inside declaration of function{pigment{}}
Date: 22 Aug 2001 08:03:25
Message: <3b839f8d@news.povray.org>
Scott Hill wrote in message <3b839cb9@news.povray.org>...
>"Wlodzimierz ABX Skiba" <abx### [at] abxartpl> wrote in message
>news:3b837efb@news.povray.org...
>>
>> error: No matching } in pigment, # found instead.
>>
>
> I've had this problem - it seems 'function' uses its own parsing
> routines which don't support the entire set of POV keywords...

This way it should duplicate parsing code for objects{} and pigments{}.
Impossible. IMO there is some switch for exlusion of #directives during parse of
functions{}

> The solution is to do something like this :

I know, I know, but thanks for good intentions :-)

--
#macro Sig(A,B,X)_(A,B)_(B,X)_(X,A)#end#macro _(A,B)cylinder{<A.x,A.y,3>,<B.u,
B.v,3>.1,9}#end global_settings{max_trace_level 9}light_source{0 1}camera{up y
*4right-3*x}blob{_(<3,1>,<1,-5>)_(<2,-2>,<4,-2>)Sig(x,<-1,1.5>,<1,3>)_(z-1,z-4
)pigment{rgb 1}}box{-3 3pigment{rgb 0}finish{reflection 1}hollow} // POV-Ray31


Post a reply to this message

From: Christoph Hormann
Subject: Re: megapov bug: condition inside declaration of function{pigment{}}
Date: 22 Aug 2001 08:04:17
Message: <3B83A04E.3CEC1082@gmx.de>
Scott Hill wrote:
> 
>     I've had this problem - it seems 'function' uses its own parsing
> routines which don't support the entire set of POV keywords... The solution
> is to do something like this :
> 
> #declare Q=no;
> #declare RadialPigment=pigment{radial#if(Q)turbulence.3#end}
> #declare RadialFunction=function{pigment{RadialPigment}}
> 

Yes, a lot of Povray's language features can't be used in isosurface
functions.  This will be improved in Povray 3.5 BTW, even macros can be
used then.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

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