POV-Ray : Newsgroups : povray.general : Pov 4.00 question : Re: Possible POV Object Scheme (was Re: Pov 4.00 question) Server Time
7 Aug 2024 01:24:53 EDT (-0400)
  Re: Possible POV Object Scheme (was Re: Pov 4.00 question)  
From: Hermann Voßeler
Date: 15 Feb 2002 15:31:21
Message: <3C6D6E3E.1090606@webcon.de>
...if macros are defined strictly as mere copy-and-paste
operations, then there will be no problem as long as the
compiler sees valid code after macro expansion. (One of
the haskell compilers indeed uses the c preprocessor to
do such things)

Warp wrote:

 >   How would it handle something like this:
 >
 > #if(Fast)
 >   box
 >     -1,1
 > #else
 >   superellipsoid
 >     <.1,1>
 > #end
 >     pigment
 >       rgb 1
 >



> I wonder how it could handle this in intendation mode:
> #macro o()object{#end
> #macro b()box{#end
> #macro f()function{#end
> #macro p()pigment{color#end
> #local C=f()pattern{o()b()1 2}}}}
> #local B=b()C(1.5,1.5,1.5)2p()1}}
> o()B}
> 
> :-)
> 
> ABX
>


Post a reply to this message

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