[pstricks] How to draw a radial-type fill?

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Sat Nov 8 23:50:18 CET 2003


Storozhev Maksim schrieb:

> Well, it's like a circle with many drawing radiuses. And if I can do it, can
> I setup a step in gradus, radius of such type filling?
> 
> Small picture:
> 
> \ | /
>  \|/
> ---
>  /|\
> / | \
> 
> :-) Here's my smile
> 
> P.S. I have read pst-slpe.tex carefully, but cannot get the such effect.

I do not know if I really understand what you want to have.

herbert

\documentclass{minimal}
\usepackage{pstricks}
\usepackage{pst-grad}
\usepackage{multido}
\SpecialCoor
%angleA,angleB,r1,r2
\def\fillSector#1#2#3#4{%
	\pscustom[fillstyle=gradient,gradbegin=black,%
		gradend=white,gradmidpoint=0,gradangle=45]{%
		\psline(#3;#1)(#4;#1)
		\psarc(0,0){#4}{#1}{#2}
		\psline(#4;#2)(#3;#2)
		\psarcn(0,0){#3}{#2}{#1}
	}%
}
\begin{document}

\begin{pspicture}(-5,-5)(5,5)
\pscircle(0,0){2}
\multido{\n=0+15}{24}{\psline[linestyle=dashed](2;\n)(5;\n)}
\fillSector{0}{60}{2}{5}
\fillSector{170}{250}{2}{5}
\end{pspicture}

\end{document}




http://www.pstricks.de




More information about the PSTricks mailing list