|
![](/i/fill.gif) |
Tor Olav Kristensen wrote:
>
> Now I have read your question thoroughly.
> (as I should have done in the first place :)
>
> And I have also tested your code.
>
> Below you find the code for my new suggestion.
> The "big" difference is the passing of the
> spike shape trough a variable; "Thing" to
> the macro.
>
> (POV-Ray does not force you to do this, but
> I think this is good programming practice.)
>
I agree. I had thought about it since your first post. The one thing
that is not entirely intuitive to me is this part
#declare Grid_1 =
union {
Make_Grid(Spike, 0.5, 6)
pigment { color Yellow }
}
object {
Grid_1
rotate 45*x
translate 3*y
}
Now if I wanted two "Grids" I'd have to do another #declare Grid_2...
etc., and another object {Grid_2 ...}. Now this is how I thought it
would work. especially after reading (and misunderstanding, i presume)
the section in the povray docs about macros as functions that return
some value.
#declare Grid_1 = object{ Make_Grid(Spike, 0.5, 6) }
and then I hoped to be able to do something like
object {
Grid_1
rotate 45*x
translate 3*y
}
I'm pretty sure I tried this, and I'm pretty sure it didn't do what I
expected. What I expected was what your initial solution did.
But anyway, this is all probably just a result of me not knowing the
language completely.
Thanks for your help,
Ross
Post a reply to this message
|
![](/i/fill.gif) |