# [pstricks] drawing implicit (polar) plot

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Tue Oct 5 22:42:24 CEST 2004

Arnaud Schmittbuhl wrote:

> This equation is the one we get by studying flow around a cylinder.
> The result can be seen here
>
> http://www.mecaps.cict.fr/cfd/ifm/cylinder.gif

ok, understood

Herbert

\listfiles
\documentclass[a4paper]{article}
\usepackage{pstricks}
\usepackage{multido}
\def\func{%
const x sin dup mul 3 mul div neg /p exch def
p abs sqrt neg /r exch def
-0.5 /q exch def
p 0 lt {
p dup mul p mul q dup mul add 0 le {
q r 3 exp  div arccos
3 div cos r dup add neg mul
}{
q r 3 exp div arch
3 div cosh r dup add neg mul
} ifelse
}{
q r 3 exp div arsh
3 div sinh r dup add neg mul
} ifelse
}
\begin{document}

\begin{pspicture*}(-5,-2.5)(5,2.5)
\pstVerb{
/e 2.718281828459045 def
/arccos { dup dup mul neg 1.0 add sqrt exch atan } def
/sinh { dup e exch exp exch neg e exch exp sub 2 div } def
/cosh { dup e exch exp exch neg e exch exp add 2 div } def
/arsh { dup dup mul 1 add sqrt add ln } def
/arch { dup dup mul 1 sub sqrt add ln } def
}
\psaxes(0,0)(-5,-2.5)(5,2.5)
\psset{plotpoints=360,linewidth=0.1pt,polarplot=true,linecolor=blue}
\multido{\rA=0.05+0.05}{20}{
\psplot{1}{179}{%
/const \rA\space def
\func
}
\psplot{181}{359}{%
/const \rA\space def
\func
}%
}
\end{pspicture*}

\end{document}

--
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes