POV-Ray : Newsgroups : povray.general : Help - using rgb colors with triangles : Re: Help - using rgb colors with triangles Server Time
11 Aug 2024 17:14:18 EDT (-0400)
  Re: Help - using rgb colors with triangles  
From: Ken
Date: 18 Jun 1999 20:51:20
Message: <376AE69B.B42DCC46@pacbell.net>
David Arcoleo wrote:
> 
> Hi all, I'm writing an application that takes graphs in Mathematica and
> converts them to povray source.  I construct the objects using triangles
> and am including an option to do an exact color match.  How do I give a
> triangle an rgb?  Everything I try doesn't seem to work.
> 
> Thanks,
> -Dave

There are a couple ways of adding pigments to triangles.

 Both you can do with and without the union or mesh wrapper -

  union  {
triangle { <...>,<...>,<...> pigment { rgb<...> }}
triangle { <...>,<...>,<...> pigment { rgb<...> }}
triangle { <...>,<...>,<...> pigment { rgb<...> }}
triangle { <...>,<...>,<...> pigment { rgb<...> }}
         }

or

#declare T1 = texture { pigment { rgb<...> }}
#declare T2 = texture { pigment { rgb<...> }}
#declare T3 = texture { pigment { rgb<...> }}
#declare T4 = texture { pigment { rgb<...> }}

    mesh {
triangle { <...>,<...>,<...> texture {T1}}
triangle { <...>,<...>,<...> texture {T2}}
triangle { <...>,<...>,<...> texture {T3}}
triangle { <...>,<...>,<...> texture {T4}}
         }





-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

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