|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
For a scene i would like to include a floor.
Therefore is modified the superellipsoid example.
Running this whitout the #macro and #end the schene renders perfect
[code]
#macro Floor(MaxTile, MaxRow)
#declare Offset = 2.1;
#declare Tile = superellipsoid { <0.5, 0.1>
scale <1, .05, 1>
}
#declare Row = union {
object { Tile }
#declare index =-MaxTile;
#while(index <= MaxTile)
object { Tile translate z*Offset*index }
#declare index = index + 1;
#end
}
#declare index = -MaxRow;
union{
object { Row }
#while(index <= MaxRow)
object { Row translate x*Offset*index }
#declare index = index + 1;
#end
pigment { White_Marble }
finish { phong 1 phong_size 50 reflection .35 }
}
plane {
y, 0 //this is the grout
pigment { color White }
finish { ambient .4 diffuse .7 }
}
#end
[/code]
But if i call it as a macro like object{Floor(10,10) } it produces a error at
the plane command. It puzzles me how this is possible. Anny help is welcome.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"gharryh" <h.a### [at] harry-arendsnl> wrote:
> For a scene i would like to include a floor.
> Therefore is modified the superellipsoid example.
> Running this whitout the #macro and #end the schene renders perfect
>
> [code]
> union{
> object { Row }
>
> #while(index <= MaxRow)
> object { Row translate x*Offset*index }
> #declare index = index + 1;
> #end
>
> pigment { White_Marble }
> finish { phong 1 phong_size 50 reflection .35 }
> }
>
> plane {
> y, 0 //this is the grout
> pigment { color White }
> finish { ambient .4 diffuse .7 }
> }
> #end
> [/code]
>
> But if i call it as a macro like object{Floor(10,10) } it produces a error at
> the plane command. It puzzles me how this is possible. Anny help is welcome.
This is because you have two separate objects, the union{} and the plane{}, in
the macro. When you are calling it inside your object{} wrapper, it is looking
for only one, so when it reaches the second, it returns an error.
Try calling it union{Floor(10,10) } instead, or put the plane and union together
in a union{} wrapper inside the macro.
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I did the last solution. Thnx
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> "gharryh" <h.a### [at] harry-arendsnl> wrote:
> > For a scene i would like to include a floor.
> > Therefore is modified the superellipsoid example.
> > Running this whitout the #macro and #end the schene renders perfect
> >
> > [code]
> > union{
> > object { Row }
> >
> > #while(index <= MaxRow)
> > object { Row translate x*Offset*index }
> > #declare index = index + 1;
> > #end
> >
> > pigment { White_Marble }
> > finish { phong 1 phong_size 50 reflection .35 }
> > }
> >
> > plane {
> > y, 0 //this is the grout
> > pigment { color White }
> > finish { ambient .4 diffuse .7 }
> > }
> > #end
> > [/code]
> >
> > But if i call it as a macro like object{Floor(10,10) } it produces a error at
> > the plane command. It puzzles me how this is possible. Anny help is welcome.
>
> This is because you have two separate objects, the union{} and the plane{}, in
> the macro. When you are calling it inside your object{} wrapper, it is looking
> for only one, so when it reaches the second, it returns an error.
>
> Try calling it union{Floor(10,10) } instead, or put the plane and union together
> in a union{} wrapper inside the macro.
>
> -tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|