POV-Ray : Newsgroups : povray.general : Question About Macros : Re: Question About Macros Server Time
10 Aug 2024 23:27:09 EDT (-0400)
  Re: Question About Macros  
From: Larry Fontaine
Date: 13 Oct 1999 22:04:47
Message: <38053A78.5EAF7600@isd.net>
Translate and scale seem like a good idea to put in the macro as it
makes for shorter code; you don't need the full words translate and
scale on every line using the macro. But, like Ken said, it all depends
what the macro is intended for. In my tree macro I have a parameter for
an array of three pigments, so that the pigment of each individual leaf
can be varied, also I send the actual leaf object definition. This seems
like a lot of data to send to a macro, but it's everything needed to
make the tree. For most other macros, though, you wouldn't want to send
a pigment, because leaving it outside gives more freedom in the
texturing and makes for less macro parameters.

Andrea Ryan wrote:

>     Is it a good idea to include transformations in macros like:
>
> #macro MakeBall (translatex, translatey, translatez, scalex, scaley,
> scalez, radius)
> sphere { <translatex, translatey, translatez>,radius
> scale <scalex, scaley, scalez>
> texture {...}
> }
> #end
>
> or let others add object statements and transformations?
> Brendan Ryan


Post a reply to this message

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