POV-Ray : Newsgroups : povray.general : checkered passed : Re: checkered passed Server Time
8 Aug 2024 16:19:14 EDT (-0400)
  Re: checkered passed  
From: Ron Parker
Date: 15 Nov 2000 09:37:52
Message: <slrn9157u6.6sa.ron.parker@fwi.com>
On 15 Nov 2000 09:32:07 -0500, Ron Parker wrote:
>On Wed, 15 Nov 2000 16:42:06 +1000, Chris Colefax wrote:
>>This macro can be easily modified for tiling complete textures, and extended
>>into the third dimension (z) if needed.  The only thing to note is that the
>>gradient pattern is symmetrical around the origin, so the tiling breaks
>>along the x and y axes.  This is easily avoided by translating the pattern
>>origin out of view.
>
>Or using a repeat warp, which is how I would have done it.

That is,

 #macro checker_pigment (Pigment1, Pigment2, Pigment3)
         gradient x pigment_map {
            [1/3 Pigment1] [1/3 Pigment2] [2/3 Pigment2] [2/3 Pigment3]}
         warp {repeat x}
         warp {repeat y offset 1/3*x}
         scale <3,1,1>
   #end



-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

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