dimanche 22 juillet 2018

pst-contourplot : fonctions complexes

Famille de courbes orthogonales à une famille de sinusoïdes :
En 1922, G.Fontané commence son article “Sur deux familles de courbes orthogonales” ainsi :
« Si l’on écrit, pour une fonction F(z) d’une variable complexe, F(z) = P(x, y) + iQ(x, y) on sait que les courbes :
P(x, y) = const, Q(x, y) = const.,
forment deux familles de courbes orthogonales. »
On peut ainsi représenter toutes les fonctions complexes classiques. En voici trois exemples :



Ces exemples sont dans le répertoire :
Fichier : exemple-5.tex. Le fichier zippé  contient tous ls fichiers.

Le listing de ces exemples :

\documentclass{article}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{pst-contourplot,pst-plot}
\usepackage{amsmath}
\usepackage[colorlinks=true]{hyperref}
\author{manuel.luque27@gmail.com}
\begin{document}
\section{Famille de courbes orthogonales à une famille de sinusoïdes}
\begin{center}
\begin{pspicture}(-3.14,-4)(3.14,4)
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10](-3,-4)(3,4)
\multido{\n=0.0+0.5,\nS=-2.4+0.4}{13}{
\psplot[algebraic,plotpoints=720,linecolor=red]{-3.14}{3.14}{\nS*sin(x)}
\psContourPlot[unit=1,a=0.1,algebraic,function=y^2-2*ln(abs(cos(x)))-\n,linecolor=blue](-3.14,-3)(3.14,3)}
\psContourPlot[unit=1,a=0.025,algebraic,function=y^2-2*ln(abs(cos(x)))-8,linecolor=blue](-3.14,-3)(3.14,3)
\psframe[dimen=middle](-3.14,-4)(3.14,4)
\multido{\i=-4+1}{9}{\psline(-3.14,\i)(-3.2,\i)\uput[l](-3.14,\i){\small\i}}
\multido{\i=-3+1}{7}{\psline(\i,-4)(\i,-4.1)\uput[d](\i,-4){\small\i}}
\end{pspicture}
\end{center}
\section{Familles de courbes orthogonales définies par une fonction complexe}
G.Fontané commence son article ``\textit{Sur deux familles de courbes orthogonales}''\footnote{\url{www.numdam.org/article/NAM_1922_5_1__173_0.pdf}} ainsi :

<< Si l'on écrit, pour une fonction F(z) d'une variable complexe,
 $F(z)=P(x,y)+iQ(x,y)$
 on sait que les courbes :
 \[ P(x,y)=\text{const},\quad Q(x,y)=\text{const.},\]
 forment deux familles de courbes orthogonales. >>

On peut ainsi représenter toutes les fonctions complexes classiques. En voici trois exemples :

%\[\cos(z)=\cos(x)\cosh(y)-i\sin(x)\sinh(y)\]
\begin{center}
\begin{pspicture}(-3.5,-5.5)(3.5,5.5)
\rput(0,5.25){$\cos(z)=\cos(x)\cosh(y)-i\sin(x)\sinh(y)$}
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10](-3,-5)(3,5)
\psframe(-3.15,-5)(3.15,5.1)
\multido{\n=-8.0+1.0}{17}{
\psContourPlot[unit=1,a=0.05,algebraic,function=cos(x)*ch(y)-\n,linecolor=blue](-3.14,-5)(3.14,5)
\psContourPlot[unit=1,a=0.05,algebraic,function=-sin(x)*sh(y)-\n,linecolor=red](-3.15,-5)(3.14,5)}
\multido{\i=-5+1}{11}{\psline(-3.15,\i)(-3.2,\i)\uput[l](-3.15,\i){\small\i}}
\multido{\i=-3+1}{7}{\psline(\i,-5)(\i,-5.1)\uput[d](\i,-5){\small\i}}
\uput{0.2}[d](-3.2,-4.9){$-\pi$}\uput[d](3.15,-4.9){$\pi$}
\end{pspicture}
\end{center}

%\[\tanh(z)=\frac{\sinh(2x)}{\cos(2y) + \cosh(2x)}+i\frac{\sin(2y)}{\cos(2y) + \cosh(2x)} \]
\begin{center}
\begin{pspicture}(-4,-6)(4,7)
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=7pt,griddots=10](-4,-6)(4,6)
\rput(0,6.5){$\tanh(z)=\frac{\sinh(2x)}{\cos(2y) + \cosh(2x)}+i\frac{\sin(2y)}{\cos(2y) + \cosh(2x)}$}
\psgrid[unit=2,subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10](-2,-3)(2,3)
\psframe(-4,-6)(4.1,6.1)
\multido{\n=-2.5+0.5,\nH=0.0+.1}{11}{
\psContourPlot[unit=2,a=0.05,algebraic,function=sh(2*x)/(cos(2*y)+ch(2*x))-\n,linecolor=blue](-2,-3)(2,3)
\psContourPlot[unit=2,a=0.05,algebraic,function=sin(2*y)/(cos(2*y)+ch(2*x))-\n,linecolor=red](-2,-3)(2,3)
}
\end{pspicture}
\end{center}

%\[ \mathrm{e}^z=\mathrm{e}^x \cos(y) + i \mathrm{e}^x\sin(y)\]

\begin{center}
\begin{pspicture}(-4,-3.5)(4,4)
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10](-4,-3)(4,3)
\rput(0,3.5){$ \mathrm{e}^z=\mathrm{e}^x \cos(y) + i \mathrm{e}^x\sin(y)$}
\psframe(-4,-3.14)(4.1,3.2)
\foreach \r in {-8,-6,-4,-2,-0.5,-0.2,-0.05,0.05,0.2,0.5,2,4,6,8}{%
\psContourPlot[unit=1,a=0.1,algebraic,function=Euler^x*cos(y)-\r,linecolor=blue](-4,-3.14)(4,3.14)
\psContourPlot[unit=1,a=0.1,algebraic,function=Euler^x*sin(y)-\r,linecolor=red](-4,-3.2)(4,3.14)}
\multido{\i=-3+1}{7}{\psline(-4,\i)(-4.1,\i)\uput[l](-4,\i){\small\i}}
\multido{\i=-4+1}{9}{\psline(\i,-3.14)(\i,-3.2)\uput[d](\i,-3.14){\small\i}}
\end{pspicture}
\end{center}

\begin{center}
\begin{pspicture}(-4,-3.5)(4,4)
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10](-4,-3)(4,3)
\rput(0,3.5){$ \mathrm{e}^z=\mathrm{e}^x \cos(y) + i \mathrm{e}^x\sin(y)$}
\psframe*[linecolor=red](-4,-3.14)(4.1,3.2)
\multido{\n=1.0+-0.1,\nH=0.0+0.05}{21}{%
% \psContourPlot[unit=1,a=0.1,algebraic,function=Euler^x*cos(y)-\r,linecolor=blue](-4,-3.14)(4,3.14)
\psContourPlot[unit=1,a=0.1,algebraic,function=Euler^x*sin(y)-\n,Fill,fillcolor={[hsb]{\nH,1,1}},linecolor=white](-4,-3.2)(4,3.14)}
\multido{\i=-3+1}{7}{\psline(-4,\i)(-4.1,\i)\uput[l](-4,\i){\small\i}}
\multido{\i=-4+1}{9}{\psline(\i,-3.14)(\i,-3.2)\uput[d](\i,-3.14){\small\i}}
\end{pspicture}
\end{center}
\end{document}






Aucun commentaire:

Enregistrer un commentaire