[pstricks] Fill polygon with wavy pattern

Martin Buchmann Martin_Buchmann at gmx.net
Thu Feb 20 11:33:43 CET 2003


Hello,

i have something like this:

<--- example.tex --->

\documentclass{article}

\usepackage{pstcol}
\usepackage{pst-grad}

\definecolor{solidhigh}{rgb}{0.4, 0.4, 0.9}
\definecolor{solidlow}{rgb}{0.8, 0.8, 0.9}
\definecolor{liquid}{rgb}{0.3, 0.3, 0.9}

\begin{document}

\begin{pspicture}(0,0)(14,10)
    
    \psframe(3.0,1.9)(4.8,8.7)
    
    \pspolygon[linewidth=.5pt,fillstyle=gradient,gradangle=0,%
    	gradmidpoint=0,gradbegin=solidhigh,gradend=solidlow]%
    	(3.0,1.9)(3.0,3.2)(3.225,7.5)(3.45,3.2)(3.675,7.5)(3.9,3.2)%
	(4.125,7.5)(4.35,3.2)(4.575,7.5)(4.8,3.2)(4.8,1.9)(3.0,1.9)
	
    \pspolygon[linewidth=0pt,fillstyle=solid,fillcolor=liquid]%
	(3.0,8.7)(3.0,3.2)(3.225,7.5)(3.45,3.2)(3.675,7.5)(3.9,3.2)%
	(4.125,7.5)(4.35,3.2)(4.575,7.5)(4.8,3.2)(4.8,8.7)(3.0,8.7)
    
\end{pspicture}

\end{document}

<--- eof --->

Is there any possibility to add a pattern to the upper polygon? I have
to make clear that it's liquid and my phd supervisor used a pattern of
wavy lines (like small sin-curves) to do this in the past. 

Any idea how to achieve this?

Thanks,
Martin 

-- 
C makes it easy to shoot yourself in the foot, C++ makes it harder,
but when you do, it blows away your whole leg
-- Bjarne Stroustrup


More information about the PSTricks mailing list