POV-Ray : Newsgroups : povray.newusers : Tiles : Re: Tiles Server Time
5 Jul 2024 02:00:14 EDT (-0400)
  Re: Tiles  
From: clipka
Date: 10 Aug 2010 20:01:40
Message: <4c61e864$1@news.povray.org>
Am 10.08.2010 22:58, schrieb Haakon Meland Eriksen:
> Hello, I've written a simple file I call tiles.pov, which let's you declare a
> tile and then loop it to create a roof, a chessboard, a wall or some other tiled
> object. Now I need some help to turn it into a macro, something like this
>
> #macro
>
Tile(ObjectToTile,OffsetX,OffsetY,OffsetZ,DistanceXtile,DistanceYtile,DistanceZtile,RotateXtile,RotateYtile,RotateZtile
> )
> #end
>
> Unfortunately, I've been unable to figure out how to specify the first
> parameter, ObjectToTile. I want this to be any previously declared object. Can
> anyone help me solve this?

Just pass the object to the macro, such as in:

     #declare MyObject = sphere {...}
     Tile ( MyObject, ... )

or even:

     Tile ( sphere {...} , ... )

In the macro, use "ObjectToTile" just like you would use any #declare'd 
object, e.g.

     #macro Tile ( ObjectToTile, ... )
       ...
       object { ObjectToTile }
       ...
     #end


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.