|
|
In article <web.3e594598d27a3e2ede2a6cfb0@news.povray.org>,
"Lenx" <lenx_@hotmail.com> wrote:
> Jellby wrote:
> >
> >So you finally have:
> >
> >object {
> > cylinder { }
> > translate
> > cylinder { }
> > translate
> > ...
> >}
>
> i don't understand how you come to that :-s
Your macro:
#macro Fence(Flength, Fheight, Fspace, Fdiam)
#local i=0;
#while(i< Flength/Fspace+1 )
cylinder{ <0,0,0> <0,Fheight,0> Fdiam/2 }
translate <i*Fspace, 0, 0>
#local i=i+1;
#end
#end
It loops over a cylinder and translate statement. You then call it in an
object block...and get the expected result.
Since your translate statement is apparently intended to translate the
cylinder, it should go in the cylinder block. And an object block can
only contain one object, you need to put either the macro call or the
loop itself in a union.
BTW, your "i" variable is poorly named. It is a good idea to always use
at least one upper-case letter in a variable name, which will prevent
conflicts with future keywords.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|