Subject: Re: [pstricks] Gouraud shading
Eugene K. Ressler
eugene.ressler at frontiernet.net
Sat May 28 22:32:17 CEST 2005
> From: Herbert Voss <LaTeX at zedat.fu-berlin.de>
> >There is a PS code example at
> >
> >http://www.math.ubc.ca/~cass/graphics/manual/
> in which part ?
Chapter 14, page 13. Included below. This PS draws a triangle with
shading interpolated among red, black, and white. A syntax like the
following would be nice
\gouraudtriangle[options...](0,.866){1,0,0}(-.5,0){1,1,1}(.5,0){0,0,0}
or alternately (but not very good for many purposes including mine
because you might end up defining many, many colors)
\gouraudtriangle[options...](0,.866){red}(-.5,0){white}(.5,0){black}
Thanks for the consideration.
Gene
/A [ 0 3 sqrt 2 div ] def
/B [ -0.5 0 ] def
/C [ 0.5 0 ] def
/ds [
0 A aload pop 1 0 0
0 B aload pop 1 1 1
0 C aload pop 0 0 0
] def
newpath
<<
/ShadingType 4
/ColorSpace [ /DeviceRGB ]
/DataSource ds
>>
shfill
More information about the PSTricks
mailing list