POV-Ray : Newsgroups : povray.newusers : tartan pattern : Re: tartan pattern Server Time
14 May 2024 01:23:10 EDT (-0400)
  Re: tartan pattern  
From: Thomas de Groot
Date: 10 Mar 2014 05:13:36
Message: <531d8240$1@news.povray.org>
Following your post, I remembered a tartan pattern made with Moray in 
2002. I don't remember who the author was though. I reworked it for 
POV-Ray (left-handed system) and version 3.7. Here is the code. Enjoy 
and explore further developments ;-)

//Start Code
#declare Col1 = <1.0, 0.0, 0.0>;
#declare Col2 = <1.0, 0.0, 0.0>;

#declare Pig1 =
pigment {
   gradient x
   color_map {
     [0.190 srgb <0.0, 0.0, 0.0>]
     [0.190 srgb Col1]
     [0.233 srgb Col1]
     [0.233 srgb <0.0, 0.0, 0.0>]
     [0.304 srgb <0.0, 0.0, 0.0>]
     [0.304 srgb <1.0, 1.0, 1.0>]
     [0.325 srgb <1.0, 1.0, 1.0>]
     [0.325 srgb <0.0, 0.0, 0.0>]
     [0.396 srgb <0.0, 0.0, 0.0>]
     [0.396 srgb Col1]
     [0.441 srgb Col1]
     [0.441 srgb <0.0, 0.0, 0.0>]
     [0.625 srgb <0.0, 0.0, 0.0>]
     [0.625 srgb Col1]
   }
}

#declare Pig2 =
pigment {
   gradient x
   color_map {
     [0.190 srgb <0.0, 0.0, 0.0>]
     [0.190 srgb Col2]
     [0.233 srgb Col2]
     [0.233 srgb <0.0, 0.0, 0.0>]
     [0.304 srgb <0.0, 0.0, 0.0>]
     [0.304 srgb <1.0, 1.0, 1.0>]
     [0.325 srgb <1.0, 1.0, 1.0>]
     [0.325 srgb <0.0, 0.0, 0.0>]
     [0.396 srgb <0.0, 0.0, 0.0>]
     [0.396 srgb Col2]
     [0.441 srgb Col2]
     [0.441 srgb <0.0, 0.0, 0.0>]
     [0.625 srgb <0.0, 0.0, 0.0>]
     [0.625 srgb Col2]
   }
}

#declare Mat_McGregor =
material {
   texture {
     pigment_pattern {
       gradient <1.0, 1.0, 0.0>
       color_map {
         [0.0 srgb <0.0, 0.0, 0.0>]
         [0.5 srgb <0.0, 0.0, 0.0>]
         [0.9 srgb <1.0, 1.0, 1.0>]
         [1.0 srgb <1.0, 1.0, 1.0>]
       }
       scale  0.03
       rotate 45.0*y
     }
     texture_map {
       [0.0 pigment {Pig1}]
       [1.0 pigment {Pig2} rotate -90.0*y]
     }
   }
}

//End Code

Thomas


Post a reply to this message

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