|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |