[pstricks] almost closed c with pstricks

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sat Jul 17 06:15:50 CEST 2010


Am 16.07.2010 20:49, schrieb Herbert Voss:
> Am 16.07.2010 20:00, schrieb mathias legrand:
> 
>> is there a specific known manner to create example 53 (beginfig(53))
>> of the following webpage :
>> http://zoonek.free.fr/LaTeX/Metapost/metapost.html
>> with pstricks. I know how to draw it with some personal tricks but I feel
>> there is much better.

or a more general one. .5 and 2 for the radii can also be set
as \def\r{0.5 } and \def\R{2 }

\documentclass{article}
\parindent0pt
\pagestyle{empty}
\usepackage{pstricks,pst-math}
\SpecialCoor

\def\Rr{4 }
\def\Alpha{357 }

\begin{document}
\begin{pspicture}(-2,-2)(2,2)
\pscustom[fillstyle=eofill,fillcolor=blue!30]{%
  \psarc(0,0){2}{!360 \Alpha sub}{\Alpha}
  \psline(2;\Alpha)(0.5,0|2;\Alpha)
  \psarcn(0,0){0.5}{!\Alpha sin \Rr mul ASIN RadtoDeg}
                   {!360 \Alpha sub sin \Rr mul ASIN RadtoDeg}
  \psline(!0.5 360 \Alpha sub sin \Rr mul ASIN RadtoDeg PtoC)
         (!2 360 \Alpha sub PtoC)
}
\end{pspicture}
\end{document}

Herbert


More information about the PSTricks mailing list