[pstricks] Fill polygon with wavy pattern

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Thu Feb 20 16:36:01 CET 2003


Martin Buchmann schrieb:
> Feel free to use it, if you need things similar like this. Feel free to
> correct it, if you find an error.

a solution without multido.

Herbert

\documentclass{article}

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

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

\newcommand{\wave}{%
     \psset{xunit=0.0033cm,yunit=0.2cm}
	\begin{pspicture}(0,-1)(360,1)
		\pscustom[fillstyle=solid]{%
     			\psplot[linewidth=.5pt]{0}{360}{x sin}%
		}
	\end{pspicture}
}
\begin{document}
\psboxfill{\wave}
\begin{pspicture}(3.0,1.9)(4.8,8.7)
	\psframe[fillstyle=boxfill](3.1,1.9)(4.7,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)
	\psframe(3.0,1.9)(4.8,8.7)
\end{pspicture}

\end{document}



More information about the PSTricks mailing list