|
![](/i/fill.gif) |
Hello.
The best way of learning macros are to use them.
#declare MyArray = array[5] {4,3,2,1,0}
That declares an array of 5 posts(0-4).
#macro MyMacro(param)
sphere {
<0,0,0>
param
}
#end
declares a macro. To use it, simply call MyMacro from inside a object {}(or any CSG)
statement.
object {
MyMacro(0.5)
pigment { colour rgb 1 }
}
It does not use the macro as an function, instead, it inserts the macro at every
statement, with the parameters defined as in the macro call.
hope it helps,
//Spider
David Etter Perere wrote:
>
> hello,
>
> As I'm not programmer I did learn a lot reading Sonya Roberts's Rendering
> Times POVabilities (http://www.spake.org/rtimes/article/povindx.htm). This
> tutorial is really great for a guy like me using specially a modeller who
> needs to discover more.
>
> But since spring '98, this page didn't change. Now with the new features of
> version 3.1 like arrays and macros, the doc of Povray is not enough clear
> to help me to understand what means for exemple the scene files of the
> excellent "Running" -winner in the last IRTC.
>
> Well, does anybody knows about such tutorial on the net or anywhere else
> (even better in french)?
>
> Thank's
> --
> per### [at] bof infomaniak ch
> remove the "bof." to answer
Post a reply to this message
|
![](/i/fill.gif) |