|
|
Eitan Tal <eit### [at] netvisionnetil> wrote:
: Povray Ver 3.0 doesn't support #macro, but 3.1 does
: I need to know what it does so I can understand and use some examples
: I cannot run.
You can declare a kind of function with the #macro feature. The uses of
this feature are so extensive that it would require an entire tutorial to
list them in detail.
Let me tell one of its uses:
Create your own mathematical functions. For example:
#macro F(X, Y)
-exp(-X*X-Y*Y)*sin(sqrt(X*X+Y*Y))
#end
Now you can use F() as if it was a normal mathematical function.
For example:
#declare P1 = <F(i1, i2), F(i2, i3), F(i3, i1)>;
#declare P2 = <F(i2, i3), F(i3, i4), F(i4, i2)>;
(supposing, of course, that here i1, i2, i3 and i4 are some declared
variables, for example, loop indices)
Other uses are parametric object creation, etc.
However, #macros are not the only good things about 3.1. There is also
the file-IO, arrays, etc. File-IO is sometimes extremely useful. For example,
see the povray compressed mesh macro by Chris Colefax at:
http://www.geocities.com/SiliconValley/Lakes/1434/pcm.html
See also all the other macros at:
http://www.geocities.com/SiliconValley/Lakes/1434/
For example the PCM macro would have been completely impossible to do with
povray 3.0.
There is also another advantage of povray 3.1: Surfaces of revolution and
lathes are rendered a LOT faster than in 3.0.
: I don't like any newer versions of povray, they try to sell me all of
: their cdroms, and I hate it.
Oh, I haven't noticed this. Where exactly does this happen? I use the
windows and the unix versions.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|