|
|
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
|
|