POV-Ray : Newsgroups : povray.newusers : many identical object with different textures : Re: many identical object with different textures Server Time
5 Sep 2024 20:17:15 EDT (-0400)
  Re: many identical object with different textures  
From: Chris Huff
Date: 8 Sep 1999 08:46:58
Message: <37D65B0B.A6B1B134@compuserve.com>
That is the hard way. :-)
Try something like this:
#declare kolCntr = 0;
#macro KOL()
    union {
      cylinder { <0, 0, 0>,<0, 5.47, 0>, 29.79 texture{ myTexA } }
      object   { OBJECTA texture{ myTexB }  }
      cylinder { <0,14.55,0>, <0,400,0> ,22.5 texture{MyMarble translate
kolCntr*10}}

      scale 2
    }
    #declare k=k+1;
#end

Every time you call KOL(), the variable kolCntr(which in this case
stands for "KOL counter") increases by 1, which makes the next call
translate the texture by 10 units more.


Post a reply to this message

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