diff options
author | Karl Berry <karl@freefriends.org> | 2018-07-19 22:55:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-07-19 22:55:42 +0000 |
commit | 8a7ec1021a1ed4ece8c842a258680c18becc74e8 (patch) | |
tree | 6f3bba45ae9483fb4721bfbb86bc029e16a3743b /Master/texmf-dist | |
parent | 650a28baf6493c8072fcb2773ec4c814ce407982 (diff) |
pst-contourplot (18jul18)
git-svn-id: svn://tug.org/texlive/trunk@48230 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
27 files changed, 1824 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/README b/Master/texmf-dist/doc/generic/pst-contourplot/README new file mode 100644 index 00000000000..8789afe261f --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/README @@ -0,0 +1,12 @@ +=========================== + pst-contourplot PSTricks package +=========================== + +Manuel Luque (c) 2018 + +The pst-contourplot package allows to draw implicit functions f(x,y)=0 with options for coloring the inside of the surfaces, to marking the points and arrowing the curve at points chosen by the user. This package uses the "marching squares" algorithm. + +This material is subject to the LaTeX Project Public License. See +http://mirror.ctan.org/help/Catalogue/licenses.lppl.html +for the details of that license. + diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/Les-Ovales-de-Descartes.pdf b/Master/texmf-dist/doc/generic/pst-contourplot/examples/Les-Ovales-de-Descartes.pdf Binary files differnew file mode 100644 index 00000000000..5242567b5a3 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/Les-Ovales-de-Descartes.pdf diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/Les-Ovales-de-Descartes.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/Les-Ovales-de-Descartes.tex new file mode 100644 index 00000000000..073fd1c2410 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/Les-Ovales-de-Descartes.tex @@ -0,0 +1,200 @@ +\documentclass{article} +\usepackage[a4paper,margin=2cm]{geometry} +\usepackage[latin1]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[garamond]{mathdesign} +\usepackage{pst-contourplot,pst-plot} +\usepackage{amsmath} +\usepackage[colorlinks=true]{hyperref} +\usepackage{framed} +\definecolor{Beige} {rgb}{0.93,0.93,0.85} +\renewcommand{\FrameCommand}{\fcolorbox{Beige}{Beige}} + +\title{Ovales de Descartes} +\date{14 juin - 11 juillet 2018} +\author{manuel.luque27@gmail.com} +\begin{document} +\maketitle +Henri Bouasse (1866-1953) est l'auteur d'une série d'ouvrages publiés sous l'intitulé ``Bibliothèque scientifique de l'ingénieur et du physicien'' à la librairie Delagrave à Paris entre les années 1900 et 1934. Chaque livre, et parfois deux sont nécessaires, traite d'un sujet particulier comme ``Gyroscopes et projectiles''(1923), ``Phénomènes liés à la symétrie''(1931), ``Vision et reproduction des formes et des couleurs''(1917). Cet ensemble d'ouvrages constitue l'encyclopédie la plus complète de la physique classique qui ait jamais été publiée. Chaque livre s'ouvre sur une préface d'Henri Bouasse dans laquelle celui-ci exprime ses idées sur l'enseignement des sciences. Ses propos y sont d'une telle franchise qu'on peut dire qu'Henri Bouasse n'était pas un adepte de la langue de bois ! J'avais mis en ligne quelques extraits sur le site : + +\centerline{\url{http://melusine.eu.org/syracuse/mluque/bouasse/}} + +où vous pourrez lire l'opinion d'Henri Bouasse sur le téléphone dans le document : + +\centerline{\url{http://melusine.eu.org/syracuse/mluque/bouasse/disqueBouasse.pdf}} + +Si on regroupait toutes ces préfaces, on obtiendrait un volume d'un intérêt certain par la qualité de son écriture, la pertinence de ses remarques qui paraissent toujours très actuelles, son humour et l'acidité de ses observations. + +Wikipedia donne la liste des ouvrages et le thème des préfaces : + +\centerline{\url{https://fr.wikipedia.org/wiki/Henri_Bouasse}} + +Deux ouvrages sont consacrés aux mathématiques : +``Cours de Mathématiques générales''(1911) et, écrit avec Émile Turrière, ``Exercices et compléments de mathématiques générales''(1920). C'est de ce dernier ouvrage que j'extrais quelques exemples des exercices sur les ovales de Descartes afin de les illustrer avec PSTricks\footnote{Sur internet, de nombreux sites traitent des ovales de Descartes d'une manière très complète et avec de magnifiques illustrations comme :\newline +\centerline{\url{https://www.mathcurve.com/courbes2d/descartes/descartes.shtml}} et \newline +\centerline{\url{http://debart.pagesperso-orange.fr/geometrie/ovale.html}}}. +Le paragraphe §426 intitulé ``Ovales de Descartes'' débute ainsi (les auteurs prennent l'origine en $O_1$)~: + +\begin{framed} +<< +Construire les courbes d'équation bipolaire : +\[r_1+\alpha r_2=V +\] +On supposera $\alpha>0$ : on vérifiera immédiatement que sans diminuer la généralité du problème on peut poser $\alpha >1$. On appellera $a$ la distance $\overline{O_1O_2}$ des pôles. Enfin on n'oubliera pas que les quantités $r_1$ et $r_2$ sont essentiellement positives.>> +\begin{center} +\begin{pspicture}[showgrid=false](-2,-3)(6,3) +\psgrid[subgriddiv=1,gridcolor=lightgray,griddots=10,gridlabels=0pt] +\pstVerb{/ai 2 def}% +\psset{unit=2,algebraic,a=0.1} +\psContourPlot[linecolor=red,function=sqrt(x^2+y^2)+2.25*sqrt((x-ai)^2+y^2)-4](-2,-3)(6,3) +\pnode(2.25,0.688055){M}\psdot(M) +\pnode(!ai 0){O2}\pnode(0,0){O1} +\psline(O1)(M)(O2) +\uput[ur](M){$M$} +\pcline[offset=5pt,linestyle=none]{}(O1)(M) +\ncput[nrot=:U]{$r_1$} +\pcline[offset=5pt,linestyle=none]{}(O2)(M) +\ncput[nrot=:U]{$r_2$} +\pcline[offset=-5pt,linestyle=none]{}(O1)(O2) +\ncput[nrot=:U]{$a$} +\psline{<->}(0,1.5)(0,0)(3,0) +\uput[d](0,0){$O_1$} +\uput[l](0,1.5){$y$} +\uput[u](3,0){$x$} +\psdots(!ai 0)(0,0) +\uput[d](!ai 0){$O_2$} +\psline[linecolor=blue](O1)(O2) +\end{pspicture} +\end{center} +%\end{document} +<< Les pôles étant donnés, entre quelles limites $V$ peut-il varier ? +\newline +Montrer ques courbes sont fermées et ne peuvent rencontrer la droite $O_1O_2$ qu'en deux points. +\newline +Construire le faisceau pour une valeur donnée de $\alpha$. >> +\begin{center} +\begin{pspicture}(-2,-3)(7,4) +\pstVerb{/ai 2 def +% macro de Dominique Rodriguez +% dans pst-eucl +%% x -> true (if |x| < 1E-6) +/ZeroEq { abs 1E-6 lt } bind def +%% x f g -> x y n +/NewtonSolving { + 3 dict begin + /g exch def /f exch def 0 + { %%% STACK: x0 n + 1 add exch %% one more loop + dup ZeroEq + { dup 0.0005 add fgeval + 1 index 0.0005 sub fgeval sub .001 div } + { dup 1.0005 mul fgeval + 1 index 0.9995 mul fgeval sub .001 2 index mul div } ifelse %%% STACK: n x0 fg'(x0) + %%% compute x1=x0-fg(x0)/fg'(x0) + 1 index fgeval exch div dup 4 1 roll sub exch %% stack: dx x0 n + 3 -1 roll ZeroEq %% exit if root found + 1 index 100 eq or { exit } if %% or looping for more than 100 times + } loop + dup 100 lt { exch dup /x exch def f } { pop 0 0 } ifelse + 3 -1 roll + end +} def +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +/fgeval { /x exch def f g sub } bind def + 0.2 { (sqrt(2.4^2+x^2)+2*sqrt((2.4-ai)^2+x^2)-4.6) AlgParser cvx exec } {0} NewtonSolving pop pop /y0 exch def + 0.2 { (sqrt(1.5^2+x^2)+2*sqrt((1.5-ai)^2+x^2)-4.6) AlgParser cvx exec } {0} NewtonSolving pop pop /y1 exch def + 0.2 { (sqrt(1.5^2+x^2)+2*sqrt((1.5-ai)^2+x^2)-3.8) AlgParser cvx exec } {0} NewtonSolving pop pop /y2 exch def + 0.2 { (sqrt(1.5^2+x^2)+2*sqrt((1.5-ai)^2+x^2)-3.0) AlgParser cvx exec } {0} NewtonSolving pop pop /y3 exch def} + % +\psset{unit=2,a=0.05}% ncell=200 80,algebraic +% function=sqrt(x^2+y^2)+2*sqrt((x-ai)^2+y^2)-\nV +\multido{\nV=3.0+0.8}{3}{% +\psContourPlot[function= x dup mul y dup mul add sqrt + 2 x ai sub dup mul y dup mul add sqrt mul add + \nV\space sub](-2,-3)(6,3)} +\psline{<->}(0,2)(0,0)(3.5,0) +\uput[d](0,0){$O_1$} +\uput[l](0,1.9){$y$} +\uput[u](3.5,0){$x$} +\pnode(!ai 0){O2}\pnode(0,0){O1} +\uput[d](!ai 0){$O_2$} +\pnode(!2.4 y0){A}\psdots(A)(O1)(O2)\uput[ur](A){$A$} +\psline(O1)(A)(O2) +\pnode(!1.5 y1){V1}\pnode(!1.5 y2){V2}\pnode(!1.5 y3){V3} +\uput[u](V1){$V=4.6$}\uput[u](V2){$V=3.8$}\uput[u](V3){$V=3.0$} +\end{pspicture} + +Ovales de Descartes pour $r_1+2r_2=V$. +\end{center} +\end{framed} + +Cette figure est une reproduction de celle du livre. + +Le faisceau suivant est obtenu en faisant varier $\alpha$, pour $V=4$ +\begin{center} +\begin{pspicture}[showgrid=false](-4,-5)(8,5) +\psgrid[subgriddiv=1,gridcolor=lightgray,griddots=10,gridlabels=0pt] +\pstVerb{/ai 2 def} +\psset{unit=2,a=0.1}%,algebraic +\multido{\n=3.50+-0.25}{12}{% +% function=sqrt(x^2+y^2)+\n*sqrt((x-ai)^2+y^2)-4 +\ifnum\multidocount=11\psset{linecolor=red}\else\psset{linecolor=blue}\fi% +\psContourPlot[function=x dup mul y dup mul add sqrt + \n\space x ai sub dup mul y dup mul add sqrt mul add + 4 sub](-2,-3)(6,3)} +\psline{<->}(0,2.5)(0,0)(4,0) +\uput[d](0,0){$O_1$} +\uput[l](0,2.4){$y$} +\uput[u](3.9,0){$x$} +\psdots(!ai 0)(0,0) +\uput[d](!ai 0){$O_2$} +\end{pspicture} +\end{center} +Après un paragraphe sur les ``Applications des ovales de Descartes en optique'', Henri Bouasse et Émile Turrière reviennent aux ovales dans un nouveau paragraphe intitulé encore ``Ovales de Descartes', avec la définition suivante : +\begin{framed} +<< +\[ -r_1+\alpha r_2=V\] +On peut supposer encore que $\alpha \geq 1 $, le signe de $V$ restant arbitraire. + +Montrer que pour toutes les valeurs de $\alpha>1$, les courbes du faisceau ne peuvent avoir de points à l'infini. Ce sont encore des ovales, comme dans le premier cas. + +Le cas $\alpha=1$ est exceptionnel. On retrouve le faisceau d'hyperboles déjà rencontré (§ 423). +\end{framed} + +Dans le paragraphe suivant (§429) les auteurs établissent l'équation cartésienne \textit{entière} des ovales et traitent les particuliers des limaçons de Pascal. Le paragraphe (§430) est consacré aux ovales de Cassini et le suivant(§431) aux courbes orthogonales des ovales de Cassini. + +\begin{framed} +Lieu des points tels que le produit de leurs distances à deux points fixes $O_1$ et $O_2$ soit constant. + +Soit $2a$ la distance $\overline{O_1O_2}$. + +On trouve immédiatement pour équation des ovales : +\[ +r_1r_2=k^2, \qquad (a^2+x^2+y^2)^2-4a^2x^2=k^4 +\] +Pour que l'origine appartienne à une courbe du faisceau, il faut évidemment poser : $k^2=a^2$. L'équation devient : +\[ +(x^2+y^2)^2=2a^2(x^2-y^2) +\] +C'est la lemniscate de Bernouilli. +\end{framed} + +\begin{center} +\begin{pspicture}[showgrid=false](-4,-4)(5,4) +\psgrid[subgriddiv=1,gridcolor=lightgray,griddots=10,gridlabels=0pt] +\pstVerb{/ai 2 def} +\psset{unit=1,a=0.1}% ,algebraic +% (ai^2+x^2+y^2)^2-4*ai^2*x^2-(\nk)^4 +\multido{\nk=3.50+-0.25}{10}{% +\ifnum\multidocount=7\psset{linecolor=red}\else\psset{linecolor=blue}\fi% +\psContourPlot[function=ai dup mul x dup mul add y dup mul add dup mul + 4 ai x mul dup mul mul sub \nk\space 4 exp sub](-6,-3)(6,3)} +\psline{<->}(0,4)(0,0)(5,0) +\uput[d](0,0){$O_1$} +\uput[l](0,4){$y$} +\uput[u](5,0){$x$} +\psdots(!ai 0)(0,0) +\uput[d](!ai 0){$O_2$} +\end{pspicture} +\end{center} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/README b/Master/texmf-dist/doc/generic/pst-contourplot/examples/README new file mode 100644 index 00000000000..b05249a0a1d --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/README @@ -0,0 +1,13 @@ +================================= + pst-contourplot PSTricks package + Examples +================================= + +Manuel Luque (c) 2018 + +The pst-contourplot package allows to draw implicit functions f(x,y)=0 with options for coloring the inside of the surfaces, to marking the points and arrowing the curve at points chosen by the user. This package uses the "marching squares" algorithm. + +This material is subject to the LaTeX Project Public License. See +http://mirror.ctan.org/help/Catalogue/licenses.lppl.html +for the details of that license. + diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/bourke.pdf b/Master/texmf-dist/doc/generic/pst-contourplot/examples/bourke.pdf Binary files differnew file mode 100644 index 00000000000..8619179e924 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/bourke.pdf diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/bourke.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/bourke.tex new file mode 100644 index 00000000000..793925a48e1 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/bourke.tex @@ -0,0 +1,14 @@ +\documentclass[pstricks]{standalone} +\usepackage{pst-contourplot,multido,pst-plot} +\begin{document} +% équation donnée par Paul Bourke dans : +% http://paulbourke.net/papers/conrec/ +\begin{pspicture}(-5,-5)(5,5) +\multido{\r=0.25+0.25,\n=0.0+0.1}{11}{% +\pstVerb{/isovalue \r\space def}% +\psContourPlot[algebraic,unit=2.5,a=0.02,function=1/((y^2+x^2-0.71)^2+4*y^2*(x-0.842)^2)-isovalue,linecolor={[hsb]{\n,1,1}}](-2,-2)(2,2) +}% +\end{pspicture} + +\end{document} + diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/courbe-du-diable.pdf b/Master/texmf-dist/doc/generic/pst-contourplot/examples/courbe-du-diable.pdf Binary files differnew file mode 100644 index 00000000000..0b8a0ecac38 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/courbe-du-diable.pdf diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/courbe-du-diable.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/courbe-du-diable.tex new file mode 100644 index 00000000000..200a4962e3e --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/courbe-du-diable.tex @@ -0,0 +1,15 @@ +\documentclass[pstricks]{standalone} +\usepackage{pst-contourplot} +\begin{document} +\begin{pspicture}(-6,-6)(6,6) +% Courbe du diable +% page 52 : Revue du Palais de la Découverte +% Courbes mathématiques +% Numéro spécial 8 . Juillet 1976 +% et Serge Mehl +% http://serge.mehl.free.fr/anx/Diable.html +\psframe*[linecolor=cyan](-6,-6)(6,6) +\psContourPlot[a=0.1,linecolor=red,Fill,fillcolor=yellow,ReverseColors, + function=x 4 exp y 4 exp sub 24 y 2 exp mul add 25 x 2 exp mul sub](-6,-6)(6,6) +\end{pspicture} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/courbes-diverses.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/courbes-diverses.tex new file mode 100644 index 00000000000..0aadc1a29e2 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/courbes-diverses.tex @@ -0,0 +1,90 @@ +\documentclass[pstricks]{standalone} +\usepackage{pst-contourplot,pst-plot}%,multido +\begin{document} +\begin{pspicture}[showgrid](-6,-4)(6,4) +\psContourPlot[unit=0.5,algebraic,a=0.4,linecolor=blue,Fill=false,fillcolor=red,function=x*(x^2+y^2)-10*(x^2-y^2)](-6,-8)(12,8) +\psContourPlot[unit=0.5,algebraic,a=0.4,linecolor=blue,Fill=false,fillcolor=red,function=x*(x^2+y^2)-10*(x^2-y^2)-20](-6,-8)(12,8) +\psline{<->}(0,3.5)(0,0)(5.5,0) +\uput[d](0,0){$O$} +\uput[u](0,3.5){$y$} +\uput[r](5.5,0){$x$} +\end{pspicture} + +\begin{pspicture}(-6,-4)(6,4) +\psframe*(-6,-4)(6,4) +\psContourPlot[unit=0.5,algebraic,a=0.4,linecolor=-red,Fill,fillcolor={[rgb]{0.5 0.5 1}},function=x*(x^2+y^2)-10*(x^2-y^2)-50](-6,-8)(12,8) +\psContourPlot[unit=0.5,algebraic,a=0.4,linecolor=-red,Fill,fillcolor=-blue,function=x*(x^2+y^2)-10*(x^2-y^2)-20](-6,-8)(12,8) +\psContourPlot[unit=0.5,algebraic,a=0.4,linecolor=-red,Fill,fillcolor=-green,function=x*(x^2+y^2)-10*(x^2-y^2)+10](-6,-8)(12,8) +\psgrid[subgriddiv=0,gridcolor=white,griddots=10,gridlabels=5pt] +\psline[linecolor=white]{<->}(0,3.5)(0,0)(5.5,0) +\uput[d](0,0){\white$O$} +\uput[u](0,3.5){\white$y$} +\uput[r](5.5,0){\white$x$} +\end{pspicture} + +\begin{pspicture}(-3,-3)(3,4) +\psContourPlot[unit=2,a=0.02,linecolor=yellow,Fill,fillcolor=red,function=x dup mul y dup mul add 1 sub 3 exp + x dup mul y 3 exp mul sub](-2,-2)(2,2) +\psgrid[subgriddiv=0,gridcolor=black,griddots=10,gridlabels=5pt] +\psline{<->}(0,3.5)(0,0)(2.5,0) +\uput[d](0,0){$O$} +\uput[l](0,3.5){$y$} +\uput[d](2.5,0){$x$} +\end{pspicture} + +\begin{pspicture}(-5,-5)(5,5) +\psset{unit=0.8333}% +% https://www.maplesoft.com/applications/view.aspx?sid=1582&view=html +\psContourPlot[algebraic,a=0.1,linecolor=red,Fill,fillcolor=yellow,ReverseColors,function=x*y*cos(x^2 + y^2)-1](-6,-6)(6,6) +\psaxes[labelFontSize=\scriptstyle]{->}(0,0)(-6,-6)(6,6) +\end{pspicture} + +\begin{pspicture}(-5,-5)(5,5) +% https://www.maplesoft.com/applications/view.aspx?sid=1582&view=html +\psset{unit=0.5}% +\psContourPlot[algebraic,a=0.1,linecolor=red,function=sin(x + 2*sin(y))-cos(y + 3*cos(x))](-10,-10)(10,10) +\psgrid[subgriddiv=0,gridcolor=black,griddots=10,gridlabels=0pt](-10,-10)(10,10) +\psaxes[labelFontSize=\scriptstyle]{->}(0,0)(-10,-10)(10,10)%} +\end{pspicture} + +\begin{pspicture}(-5,-5)(5,5) +% https://www.maplesoft.com/applications/view.aspx?sid=1582&view=html +\psframe*[linecolor=cyan](-5,-5)(5,5) +\psset{unit=0.5}% +\psContourPlot[algebraic,a=0.1,linecolor=red,Fill,fillcolor=yellow,ReverseColors,function=sin(x + 2*sin(y))-cos(y + 3*cos(x))](-10,-10)(10,10) +%\psgrid[subgriddiv=0,gridcolor=black,griddots=10,gridlabels=0pt](-10,-10)(10,10) +\psaxes[labelFontSize=\scriptstyle]{->}(0,0)(-10,-10)(10,10)%} +\end{pspicture} + +\begin{pspicture}(-5,-5)(5,5) +\psframe*[linecolor=cyan](-5,-5)(5,5) +% https://www.maplesoft.com/applications/view.aspx?sid=1582&view=html +\psset{unit=0.5}% +\psContourPlot[algebraic,a=0.1,linecolor=blue,Fill,fillcolor=orange,ReverseColors,function=ln((x + 7*sin(y))^2)- EXP(y + 2*cos(x))](-10,-10)(10,10) +\psaxes[labelFontSize=\scriptstyle]{->}(0,0)(-10,-10)(10,10)%} +\end{pspicture} + +\begin{pspicture}(-4,-4)(4.1,4.1) +\psframe*[linecolor=cyan](-4,-4)(4.1,4.1) +% Courbe déduite de 8 droites +% page 124 : Revue du Palais de la Découverte +% Courbes mathématiques +% Numéro spécial 8 . Juillet 1976 +\psContourPlot[algebraic,a=0.1,linecolor=blue,Fill,fillcolor=orange,ReverseColors,function=(x^4-5*x^2+4)*(y^4-5*y^2+4)+1](-4,-4)(4,4) +\psaxes[labelFontSize=\scriptstyle]{->}(0,0)(-4,-4)(4,4) +\end{pspicture} + +\multido{\r=4+-0.05}{25}{% +\begin{pspicture}(-4,-4)(4,4) +\psframe*[linecolor=orange](-4,-4)(4,4) +\pstVerb{/rayon 1 def}% +\psContourPlot[unit=2,a=0.02,linecolor={[rgb]{0 0 0.5}},Fill,fillcolor=cyan,ReverseColors, + function= + 1 x rayon 30 cos mul sub dup mul y rayon 30 sin mul add dup mul add div + 1 x rayon 30 cos mul add dup mul y rayon 30 sin mul add dup mul add div add + 1 x dup mul y rayon sub dup mul add div add + \r\space sub](-4,-4)(4,4) +\psgrid[subgriddiv=0,gridcolor=black,griddots=10,gridlabels=0pt] +\end{pspicture}} +\end{document} + diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/exemples-2.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/exemples-2.tex new file mode 100644 index 00000000000..c7abdda1f36 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/exemples-2.tex @@ -0,0 +1,49 @@ +\documentclass[pstricks]{standalone} +\usepackage{pst-contourplot,multido,pst-math} +\begin{document} +\begin{pspicture}[showgrid](-4,-4)(8,4) +\pstVerb{/ai 2 def}% +\psset{a=0.1}% ncell=150 80, +\multido{\n=-3.50+0.25,\r=0+0.0476}{21}{ +\definecolor{Descartes}{hsb}{\r\space 1 1} +\psContourPlot[linecolor=Descartes,function= + -0.75 x dup mul y dup mul add sqrt mul + 1.25 x ai sub dup mul y dup mul add sqrt mul add + \n\space add](-4,-4)(8,4)} +\psline{<->}(0,4)(0,0)(8,0) +\uput[d](0,0){$O_1$} +\uput[l](0,3.75){$y$} +\uput[u](7.9,0){$x$} +\psdots(!ai 0)(0,0) +\uput[d](!ai 0){$O_2$} +\end{pspicture} + +\begin{pspicture}[showgrid=false](-4,-4)(8,4) +\pstVerb{/ai 2 def}% +\psset{a=0.1} +\multido{\n=-3.50+0.25,\r=0+0.0476}{21}{ +\definecolor{Descartes}{hsb}{\r\space 1 1} +\psContourPlot[linecolor=Descartes,fillcolor=Descartes,Fill, + function= + -0.75 x dup mul y dup mul add sqrt mul + 1.25 x ai sub dup mul y dup mul add sqrt mul add + \n\space add](-4,-4)(8,4)} +\end{pspicture} + +\begin{pspicture}(-5,-5)(5,5) +\psframe*[linecolor=cyan](-5,-5)(5,5) +\psset{unit=0.5}% +\psContourPlot[linecolor=red,Fill,fillcolor=yellow,ReverseColors,a=0.05,function=x SIN y SIN 1 sub mul y SIN mul x SIN 1 sub mul](-10,-10)(10,10) +\end{pspicture} + +\begin{pspicture}(-6.28,-6.28)(6.28,6.28) +% http://www.ensiie.fr/~gacogne/courbes.pdf +\psframe*[linecolor=cyan](-6.28,-6.28)(6.28,6.28) +\psset{unit=0.5}% +\psContourPlot[a=0.05,linecolor=red,Fill,fillcolor=yellow,ReverseColors, + function=y SIN x COS mul x SIN sub + x SIN y COS mul y SIN sub mul](-12.57,-12.57)(12.57,12.57) +\end{pspicture} +\end{document} + + diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/exemples-3.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/exemples-3.tex new file mode 100644 index 00000000000..e317a9a014e --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/exemples-3.tex @@ -0,0 +1,35 @@ +\documentclass[pstricks]{standalone} +\usepackage{pst-contourplot,multido,pst-plot} +\begin{document} + +\begin{pspicture}(-6.25,-6.25)(6.25,6.25) +% https://mathematica.stackexchange.com/questions/547/plotting-an-implicit-polar-equation +\psframe(-6.25,-6.25)(6.25,6.25) +\pstVerb{ +/arctan { + 3 dict begin + /x exch def + /y exch def + /Arc y x atan def + Arc 180 ge {/Arc Arc 360 sub def} if + Arc + end +} def +}% +\psContourPlot[unit=0.25,a=0.1,function=y x arctan DegToRad dup mul 5.55 x dup mul y dup mul add sqrt RadToDeg cos mul sub,linewidth=0.2,Fill,fillcolor=orange](-25,-25)(25,25) +% \psContourPlot[unit=0.25,a=0.1,function=y x arctan DegToRad dup mul 5.55 x dup mul y dup mul add sqrt RadToDeg sin mul sub,linewidth=0.2,linecolor=cyan](-25,-25)(25,25) +\end{pspicture} + +\begin{pspicture}[showgrid](-0.5,-0.5)(10,10) +% https://stackoverflow.com/questions/42076864/plotting-the-implicit-function-xy-logx-logy-2-0-on-matlab +\multido{\nC=5.6+-0.5,\n=0.0+0.1}{8}{ +\psContourPlot[unit=1,a=0.1,algebraic,function=-ln(x)-ln(y)+x+y-\nC,Fill,fillcolor={[hsb]{\n,1,1}}](0.01,0.01)(10,10)} +\end{pspicture} + +\begin{pspicture}(-5,-5)(5,5) +% https://mathsbyagirl.wordpress.com/2015/12/04/math-isnt-cool/ +\psframe*[linecolor=cyan](-5,-5)(5,5) +\psContourPlot[unit=1,a=0.02,algebraic,function=sin(x^2+y^2)-cos(x*y),Fill,fillcolor=orange](-5,-5)(5,5) +\end{pspicture} +\end{document} + diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/exemples-4.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/exemples-4.tex new file mode 100644 index 00000000000..df74dec6ef2 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/exemples-4.tex @@ -0,0 +1,42 @@ +\documentclass[pstricks]{standalone} +\usepackage{pst-solides3d,pst-contourplot} +\begin{document} + +\begin{pspicture}(-5,-5)(5,5) +% Julien Royer +% https://www.math.univ-toulouse.fr/~jroyer/TD/2015-16-L2PS/L2PS-poly.pdf +\psframe(-5,-5)(5,5) +\multido{\n=-2.0+.2,\nH=0.0+0.05}{20}{ +\psContourPlot[unit=1,a=0.05,algebraic,function=sin(x)-sin(y)-\n,Fill,fillcolor={[hsb]{\nH,1,1}},ReverseColors](-5,-5)(5,5)} +\end{pspicture} + +\begin{pspicture}(-5,-5)(5,5) +% Julien Royer +% https://www.math.univ-toulouse.fr/~jroyer/TD/2015-16-L2PS/L2PS-poly.pdf +\psframe(-5,-5)(5,5) +\multido{\n=-2.0+.2,\nH=0.0+0.05}{20}{ +\psContourPlot[unit=1,a=0.05,algebraic,function=sin(x)-sin(y)-\n,linecolor={[hsb]{\nH,1,1}}](-5,-5)(5,5)} +\end{pspicture} + +\begin{pspicture}(-5,-5)(5,5) +% https://www.math.univ-toulouse.fr/~jroyer/TD/2015-16-L2PS/L2PS-poly.pdf +\psframe(-5,-5)(5,5) +\multido{\n=-1.00+.05,\nH=0.0+0.04}{25}{ +\psContourPlot[unit=2,a=0.05,algebraic,function=(x^2-2*y^2)*Euler^(-2*x^2-y^2)-\n,linecolor={[hsb]{\nH,1,1}}](-2.5,-2.5)(2.5,2.5)} +\end{pspicture} + +\begin{pspicture}(-5,-5)(5,5) +\psframe(-5,-5)(5,5) +\psset{viewpoint=50 40 20 rtp2xyz,Decran=70,lightsrc=50 30 35 rtp2xyz} +\psSurface[ + fillcolor=white,algebraic, + intersectionplan={[0 0 1 -0.1] [0 0 1 0.3] [0 0 1 0.2]}, + intersectioncolor=(bleu) (red) (green), + intersectionlinewidth=1, + intersectiontype=0, + ngrid=.1 .1,incolor=yellow!50,linewidth=0.01](-2.5,-2.5)(2.5,2.5){2*(x^2-2*y^2)*Euler^(-2*x^2-y^2)} +\end{pspicture} +\end{document} + + + diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-dipoles-lignes.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-dipoles-lignes.tex new file mode 100644 index 00000000000..2858256f592 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-dipoles-lignes.tex @@ -0,0 +1,30 @@ +\documentclass[pstricks]{standalone} +\usepackage{pst-contourplot,pst-math,multido} +\begin{document} +% 4 dipôles de Hertz aux sommets d'un carré +% dont les sommets se rapprochent +\multido{\rX=1.1+-0.05}{22}{% +\begin{pspicture}(-6.25,-6.25)(6.25,6.25) +\pstVerb{/t 0 def /k0 2 PI mul def + /xi1 -\rX\space def /xi2 \rX\space def /xi3 -\rX\space def /xi4 \rX\space def + /yi1 -\rX\space def /yi2 \rX\space def /yi3 \rX\space def /yi4 -\rX\space def}% +\psframe*(-6.25,-6.25)(6.25,6.25) +\multido{\rc=-1.1+0.2,\n=0.0+0.1}{11}{ +\definecolor{HERTZ}{hsb}{\n,1,1} +\psContourPlot[unit=5,a=0.0125,linewidth=0.01,linecolor=HERTZ, + function=/r1 x xi1 sub dup mul y yi1 sub dup mul add sqrt k0 mul def + /theta1 y yi1 sub x xi1 sub atan def + /r2 x xi2 sub dup mul y yi2 sub dup mul add sqrt k0 mul def + /theta2 y yi2 sub x xi2 sub atan def + /r3 x xi3 sub dup mul y yi3 sub dup mul add sqrt k0 mul def + /theta3 y yi3 sub x xi3 sub atan def + /r4 x xi4 sub dup mul y yi4 sub dup mul add sqrt k0 mul def + /theta4 y yi4 sub x xi4 sub atan def + r1 t sub COS r1 t sub SIN r1 div add theta1 sin dup mul mul + r2 t sub COS r2 t sub SIN r2 div add theta2 sin dup mul mul add + r3 t sub COS r3 t sub SIN r3 div add theta3 sin dup mul mul add + r4 t sub COS r4 t sub SIN r4 div add theta4 sin dup mul mul add + \rc\space sub](-1.25,-1.25)(1.25,1.25)}% +\end{pspicture}} + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-dipoles-t.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-dipoles-t.tex new file mode 100644 index 00000000000..7c23c0e648a --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-dipoles-t.tex @@ -0,0 +1,31 @@ +\documentclass[pstricks]{standalone} +\usepackage{pst-contourplot,pst-math,multido} +\begin{document} +% 4 dipôles de Hertz aux sommets d'un carré +% évolution du champ au cours du temps +\multido{\rt=0+0.2}{32}{% +\begin{pspicture}(-6.25,-6.25)(6.25,6.25) +\pstVerb{/t \rt\space def /k0 2 PI mul def + /xi1 -1 def /xi2 1 def /xi3 -1 def /xi4 1 def + /yi1 -1 def /yi2 1 def /yi3 1 def /yi4 -1 def}% +%\psframe*(-6.25,-6.25)(6.25,6.25) +\multido{\rc=-1.1+0.2,\n=0.0+0.1}{11}{ +\definecolor{HERTZ}{hsb}{\n,1,1} +\psContourPlot[unit=2.5,a=0.025,linewidth=0.02,linecolor=HERTZ, + function= + /r1 x xi1 sub dup mul y yi1 sub dup mul add sqrt k0 mul def + /theta1 y yi1 sub x xi1 sub atan def + /r2 x xi2 sub dup mul y yi2 sub dup mul add sqrt k0 mul def + /theta2 y yi2 sub x xi2 sub atan def + /r3 x xi3 sub dup mul y yi3 sub dup mul add sqrt k0 mul def + /theta3 y yi3 sub x xi3 sub atan def + /r4 x xi4 sub dup mul y yi4 sub dup mul add sqrt k0 mul def + /theta4 y yi4 sub x xi4 sub atan def + r1 t sub COS r1 t sub SIN r1 div add theta1 sin dup mul mul + r2 t sub COS r2 t sub SIN r2 div add theta2 sin dup mul mul add + r3 t sub COS r3 t sub SIN r3 div add theta3 sin dup mul mul add + r4 t sub COS r4 t sub SIN r4 div add theta4 sin dup mul mul add + \rc\space sub](-2.5,-2.5)(2.5,2.5)}% +\end{pspicture}} + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-dipoles.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-dipoles.tex new file mode 100644 index 00000000000..c771311dcf0 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-dipoles.tex @@ -0,0 +1,31 @@ +\documentclass[pstricks]{standalone} +\usepackage{pst-contourplot,pst-math,multido} +\begin{document} +% 4 dipôles de Hertz aux sommets d'un carré +% dont les sommets se rapprochent +\multido{\rX=1.1+-0.05}{22}{% +\begin{pspicture}(-6.25,-6.25)(6.25,6.25) +\pstVerb{/t 0 def /k0 2 PI mul def + /xi1 -\rX\space def /xi2 \rX\space def /xi3 -\rX\space def /xi4 \rX\space def + /yi1 -\rX\space def /yi2 \rX\space def /yi3 \rX\space def /yi4 -\rX\space def}% +\psframe*[linecolor=yellow](-6.25,-6.25)(6.25,6.25) +\multido{\rc=-1.1+0.2,\n=0.0+0.1}{11}{ +\definecolor{HERTZ}{hsb}{\n,1,1} +\psContourPlot[unit=5,a=0.0125,linewidth=0.005,fillcolor=HERTZ,Fill,ReverseColors,linecolor=HERTZ, + function= + /r1 x xi1 sub dup mul y yi1 sub dup mul add sqrt k0 mul def + /theta1 y yi1 sub x xi1 sub atan def + /r2 x xi2 sub dup mul y yi2 sub dup mul add sqrt k0 mul def + /theta2 y yi2 sub x xi2 sub atan def + /r3 x xi3 sub dup mul y yi3 sub dup mul add sqrt k0 mul def + /theta3 y yi3 sub x xi3 sub atan def + /r4 x xi4 sub dup mul y yi4 sub dup mul add sqrt k0 mul def + /theta4 y yi4 sub x xi4 sub atan def + r1 t sub COS r1 t sub SIN r1 div add theta1 sin dup mul mul + r2 t sub COS r2 t sub SIN r2 div add theta2 sin dup mul mul add + r3 t sub COS r3 t sub SIN r3 div add theta3 sin dup mul mul add + r4 t sub COS r4 t sub SIN r4 div add theta4 sin dup mul mul add + \rc\space sub](-1.25,-1.25)(1.25,1.25)}% +\end{pspicture}} + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-leminscates.pdf b/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-leminscates.pdf Binary files differnew file mode 100644 index 00000000000..729aad879da --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-leminscates.pdf diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-leminscates.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-leminscates.tex new file mode 100644 index 00000000000..69f9e7f1203 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/four-leminscates.tex @@ -0,0 +1,92 @@ +\documentclass[11pt]{article} +\usepackage[a4paper,margin=2cm]{geometry} +\usepackage[latin1]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[garamond]{mathdesign} +\usepackage{pst-contourplot,pst-plot} +\title{Exemples avec pst-contourplot : \\ courbe déduite de quatre lemniscates} +\date{27 mai 2018} +\author{manuel.luque27@gmail.com} +\begin{document} +\maketitle +Cette courbe est à la page 126 du numéro spécial 8 (Juillet 1976) `\textit{Courbes mathématiques}' de la revue du Palais de la Découverte. +% Courbe déduite de quatre lemniscates +% page 126 : Revue du Palais de la Découverte +% Courbes mathématiques +% Numéro spécial 8 . Juillet 1976 + +Les équations des lemniscates sont : +\[ +\left\{ +\begin{array}[m]{l} +f_1(x,y)=\sqrt{[(a+x)^2+y^2][x^2+(a-y)^2]}-\frac{a^2}{2}\\[1em] +f_2(x,y)=\sqrt{[(a-x)^2+y^2][x^2+(a-y)^2]}-\frac{a^2}{2}\\[1em] +f_3(x,y)=\sqrt{[(a-x)^2+y^2][x^2+(a+y)^2]}-\frac{a^2}{2}\\[1em] +f_4(x,y)=\sqrt{[(a+x)^2+y^2][x^2+(a+y)^2]}-\frac{a^2}{2}\\[1em] +\end{array} +\right. +\] +Ils sont représentés ci-dessous : +%\def\lemniscateA{sqrt(((ai+x)^2+y^2)*(x^2+(ai-y)^2))-AI} +%\def\lemniscateB{sqrt(((ai-x)^2+y^2)*(x^2+(ai-y)^2))-AI} +%\def\lemniscateC{sqrt(((ai-x)^2+y^2)*(x^2+(ai+y)^2))-AI} +%\def\lemniscateD{sqrt(((ai+x)^2+y^2)*(x^2+(ai+y)^2))-AI} +\def\lemniscateA{ai x add dup mul y dup mul add + x dup mul ai y sub dup mul add + mul sqrt AI sub } +\def\lemniscateB{ai x sub dup mul y dup mul add + x dup mul ai y sub dup mul add + mul sqrt AI sub } +\def\lemniscateC{ai x sub dup mul y dup mul add + x dup mul ai y add dup mul add + mul sqrt AI sub } +\def\lemniscateD{ai x add dup mul y dup mul add + x dup mul ai y add dup mul add + mul sqrt AI sub } +\begin{center} +\begin{pspicture}(-4,-4)(4,4) +\pstVerb{/ai 2 def /AI ai dup mul 2 div def}% +\psContourPlot[a=0.1,linecolor=blue,function=\lemniscateA](-4,-4)(4,4) +\psContourPlot[,a=0.1,linecolor=red,function=\lemniscateB](-4,-4)(4,4) +\psContourPlot[a=0.1,linecolor=green,function=\lemniscateC](-4,-4)(4,4) +\psContourPlot[a=0.1,linecolor=cyan,function=\lemniscateD](-4,-4)(4,4) +\psaxes[labelFontSize=\scriptstyle]{->}(0,0)(-4,-4)(4,4) +\end{pspicture} +\end{center} + +On représente ensuite la courbe définie par : +\[ +f_1(x,y)f_2(x,y)f_3(x,y)f_4(x,y)+K=0 +\] +\newpage +Suivant les valeurs de $K$ on obtient : +\begin{center} +$K=0$ + +\begin{pspicture}(-4,-4)(4,4) +\pstVerb{/ai 2 def /AI ai dup mul 2 div def}% +\psContourPlot[a=0.04,linecolor=blue,Fill,fillcolor=orange,function=\lemniscateA \lemniscateB mul \lemniscateC mul \lemniscateD mul ](-4,-4)(4,4) +\psaxes[labelFontSize=\scriptstyle]{->}(0,0)(-4,-4)(4,4) +\end{pspicture} +\end{center} + +\begin{center} +$K=-5$ + +\begin{pspicture}(-4,-4)(4,4) +\pstVerb{/ai 2 def /AI ai dup mul 2 div def}% +\psContourPlot[a=0.04,linecolor=blue,Fill,fillcolor=orange,function=\lemniscateA \lemniscateB mul \lemniscateC mul \lemniscateD mul 5 sub](-4,-4)(4,4) +\psaxes[labelFontSize=\scriptstyle]{->}(0,0)(-4,-4)(4,4) +\end{pspicture} +\end{center} +\newpage +\begin{center} +$K=5$ + +\begin{pspicture}(-4,-4)(4,4) +\pstVerb{/ai 2 def /AI ai dup mul 2 div def}% +\psContourPlot[a=0.04,linecolor=blue,Fill,fillcolor=orange,function=\lemniscateA \lemniscateB mul \lemniscateC mul \lemniscateD mul 5 add](-4,-4)(4,4) +\psaxes[labelFontSize=\scriptstyle]{->}(0,0)(-4,-4)(4,4) +\end{pspicture} +\end{center} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/hertz.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/hertz.tex new file mode 100644 index 00000000000..bbd1254554f --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/hertz.tex @@ -0,0 +1,59 @@ +\documentclass[pstricks]{standalone} +\usepackage{pst-contourplot,pst-math,multido} +\begin{document} +%\begin{pspicture}(-7,-7)(7,7) +%\pstVerb{/t 0 def /k0 2 PI mul def}% +%\multido{\rc=-1.1+0.2,\n=0.0+0.1}{11}{ +%\definecolor{HERTZ}{hsb}{\n,1,1} +%\psContourPlot[unit=5,ncell=120 120,a=0.025,linewidth=0.005,linecolor={[rgb]{0 0.5 0}},fillcolor=HERTZ,Fill,ReverseColors]{ +% /r x dup mul y dup mul add sqrt k0 mul def +% /theta x y atan def +% r t sub COS r t sub SIN r div add theta sin dup mul mul \rc\space sub} +%} +%\end{pspicture} + +\begin{pspicture}(-6.25,-6.25)(6.25,6.25) +\pstVerb{/t 0 def /k0 2 PI mul def /xi1 -0.4 def /xi2 0.4 def /yi1 0 def /yi2 0 def}% +\psframe*(-7,-7)(7,7) +\psset{unit=5}% +\multido{\rc=-1.1+0.2,\n=0.0+0.1}{11}{ +\definecolor{HERTZ}{hsb}{\n,1,1} +%\psContourPlot[ncell=200 200,a=0.0125,linewidth=0.005,fillcolor=HERTZ,Fill,ReverseColors]{ +\psContourPlot[ncell=200 200,a=0.0125,linewidth=0.005,linecolor=HERTZ]{ + /r1 x xi1 sub dup mul y yi1 sub dup mul add sqrt k0 mul def + /theta1 y yi1 sub x xi1 sub atan def + /r2 x xi2 sub dup mul y yi2 sub dup mul add sqrt k0 mul def + /theta2 y yi2 sub x xi2 sub atan def + 2 setlinejoin + r1 t sub COS r1 t sub SIN r1 div add theta1 sin dup mul mul + r2 t sub COS r2 t sub SIN r2 div add theta2 sin dup mul mul add + \rc\space sub}}% +\psdots(!xi1 yi1)(!xi2 yi2) +\end{pspicture} + +\begin{pspicture}(-6.25,-6.25)(6.25,6.25) +\pstVerb{/t 0 def /k0 2 PI mul def + /xi1 -1 def /xi2 1 def /xi3 -1 def /xi4 1 def + /yi1 -1 def /yi2 1 def /yi3 1 def /yi4 -1 def}% +\psframe*[linecolor=yellow](-6.25,-6.25)(6.25,6.25) +\psset{unit=5}% +\multido{\rc=-1.1+0.2,\n=0.0+0.1}{11}{ +\definecolor{HERTZ}{hsb}{\n,1,1} +\psContourPlot[ncell=200 200,a=0.0125,linewidth=0.005,fillcolor=HERTZ,Fill,ReverseColors,linecolor=HERTZ]{ +%\psContourPlot[ncell=400 400,a=0.00625,linewidth=0.01,linecolor=HERTZ,Fill,ReverseColors,fillcolor=HERTZ]{ + /r1 x xi1 sub dup mul y yi1 sub dup mul add sqrt k0 mul def + /theta1 y yi1 sub x xi1 sub atan def + /r2 x xi2 sub dup mul y yi2 sub dup mul add sqrt k0 mul def + /theta2 y yi2 sub x xi2 sub atan def + /r3 x xi3 sub dup mul y yi3 sub dup mul add sqrt k0 mul def + /theta3 y yi3 sub x xi3 sub atan def + /r4 x xi4 sub dup mul y yi4 sub dup mul add sqrt k0 mul def + /theta4 y yi4 sub x xi4 sub atan def + r1 t sub COS r1 t sub SIN r1 div add theta1 sin dup mul mul + r2 t sub COS r2 t sub SIN r2 div add theta2 sin dup mul mul add + r3 t sub COS r3 t sub SIN r3 div add theta3 sin dup mul mul add + r4 t sub COS r4 t sub SIN r4 div add theta4 sin dup mul mul add + \rc\space sub}}% +% \psdots[linecolor=white](!xi1 yi1)(!xi2 yi2)(!xi3 yi3)(!xi4 yi4) +\end{pspicture} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/pavage.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/pavage.tex new file mode 100644 index 00000000000..8ab7f7f0961 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/pavage.tex @@ -0,0 +1,10 @@ +\documentclass[pstricks]{standalone} +\usepackage{pst-contourplot,pst-math} +\begin{document} +\begin{pspicture}(-5,-5)(5,5) +% https://www.maplesoft.com/applications/view.aspx?sid=1582&view=html +\psframe*[linecolor=cyan](-5,-5)(5,5) +\psset{unit=0.5}% +\psContourPlot[a=0.1,linecolor=red,Fill,fillcolor=yellow,ReverseColors,function=x y SIN 2 mul add SIN y x COS 3 mul add COS sub](-10,-10)(10,10) +\end{pspicture} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/trefoil.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/trefoil.tex new file mode 100644 index 00000000000..cb6a29db4e2 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/trefoil.tex @@ -0,0 +1,19 @@ +\documentclass{article} +\usepackage{pst-contourplot,animate} + +\begin{document} +\begin{animateinline}[controls,palindrome, + begin={\begin{pspicture}(-4,-4)(4,4)}, + end={\end{pspicture}}]{10}% 10 images/s +\multiframe{20}{r=4+-0.1}{% +\psframe*[linecolor=orange](-4,-4)(4,4) +\pstVerb{/rayon 1 def}% +\psContourPlot[unit=2,a=0.02,linecolor={[rgb]{0 0 0.5}},Fill,fillcolor=cyan,ReverseColors, + function= + 1 x rayon 30 cos mul sub dup mul y rayon 30 sin mul add dup mul add div + 1 x rayon 30 cos mul add dup mul y rayon 30 sin mul add dup mul add div add + 1 x dup mul y rayon sub dup mul add div add + \r\space sub ](-2,-2)(2,2) +\psgrid[subgriddiv=0,gridcolor=black,griddots=10]} +\end{animateinline} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/examples/two-metaballs.tex b/Master/texmf-dist/doc/generic/pst-contourplot/examples/two-metaballs.tex new file mode 100644 index 00000000000..732b177d517 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/examples/two-metaballs.tex @@ -0,0 +1,17 @@ +\documentclass[pstricks]{standalone} +\usepackage{pst-contourplot,multido} +\begin{document} +\multido{\r=-2+0.08}{50}{ +\begin{pspicture}(-6.4,-4)(6.4,4) +\psframe*(-6.4,-4)(6.4,4) +\pstVerb{/xC \r\space def + /FonctionMetaballs { + 1 x xC sub dup mul y dup mul add sqrt div + 0.5 x xC add dup mul y dup mul add sqrt div + add + 1 sub + } def}% +\psContourPlot[unit=2,a=0.1,linewidth=0.025,linecolor=red,fillcolor=cyan,Fill,ReverseColors,function=FonctionMetaballs](-4,-2)(4,2) +\psdots(! xC 2 mul 0)(! xC neg 2 mul 0) +\end{pspicture}} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/pst-contourplot-docEN.pdf b/Master/texmf-dist/doc/generic/pst-contourplot/pst-contourplot-docEN.pdf Binary files differnew file mode 100644 index 00000000000..9bf7c382f72 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/pst-contourplot-docEN.pdf diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/pst-contourplot-docEN.tex b/Master/texmf-dist/doc/generic/pst-contourplot/pst-contourplot-docEN.tex new file mode 100644 index 00000000000..ca7b3f676d5 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/pst-contourplot-docEN.tex @@ -0,0 +1,180 @@ +\documentclass[11pt]{article} +\usepackage[a4paper,margin=2cm]{geometry} +\usepackage[latin1]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[garamond]{mathdesign} +\usepackage{multido,animate,pst-math} +\usepackage[colorlinks=true]{hyperref} +\usepackage{pst-contourplot} +\date{14 juillet 2018} +\author{Manuel Luque} +\title{The algorithm``\textit{marching squares}'' for PSTricks v\fileversion} +\begin{document} +\maketitle +\section{The command \textbackslash{psContourPlot[options](x1,y1)(x2,y2)}} +If you do not know ``\textit{marching squares}'', the article that Wikipedia devotes to him, very nicely illustrated, seems to me very complete : + +\centerline{\url{https://en.wikipedia.org/wiki/Marching_squares}} + +This is an adaptation of this algorithm to PSTricks, used in \verb+\psContourPlot[options]+\footnote{Its name comes from Mathematica:ContourPlot. } and has the following options: +\begin{enumerate} + \item \texttt{[function=])} : implicit function $f(x,y)$ of the curve in algebraic or postscript mode, it should be noted that the postscript mode is the fastest; + \item \texttt{(x1,y1)(x2,y2)} : coordinates of the lower left corner and the upper right corner of the study frame, as for \verb+\psframe(x1,y1)(x2,y2)+; + \item \texttt{[a=0.025]} : side of a (square) cell; + \item \texttt{[grid=false]} : set to \texttt{true} to draw the cell grid; + \item \texttt{[Fill=false]} : set to \texttt{true} to color the interior with the PSTricks option \texttt{[fillcolor]}; + \item \texttt{[ReverseColors=false]} : coloring inside an object is only valid for one object (a circle for instance). If there are several objects (see the 2 examples of the metaballs) it is the outside which is colored. Set to \texttt{true} this boolean to correct the problem. + \item \texttt{[ChoicePoints= liste de numéros de points]} : here we place the points where there will be an arrow on the curve, we indicate a negative value if for the positive value the arrow is not in the desired direction; + \item \texttt{[WriteData]} : boolean option allowing to save the coordinates of the points, the name of the file can be chosen with the option \texttt{[FileName=PointsCurve]}. +\end{enumerate} +To solve the 2 ambiguous cases of the algorithm, I adopted the solution proposed by Xiaoqiang Zheng and Alex Pang : + +\centerline{\url{https://classes.soe.ucsc.edu/cmps161/Winter14/papers/tensor/projects/contour/paper.pdf}} + +A second command \verb+\psReadData[FileName=...]+ allow us to draw a registered curve, the [Fill] option is not allowed. +\section{Examples} +\subsection{Circle} +\begin{center} +\begin{pspicture}[showgrid](-4,-4)(4,4) +\psContourPlot[algebraic,a=0.5,linecolor=red,grid,function=x^2+y^2-16,ChoicePoints=-4 120 -45,WriteData,FileName=circle,showpoints](-4,-4)(4,4) +\psline{<->}(0,4.5)(0,0)(4.5,0) +\uput[ul](0,0){$O$} +\uput[u](0,4.5){$y$} +\uput[r](4.5,0){$x$} +\end{pspicture} +\end{center} +\begin{verbatim} +\psContourPlot[algebraic,a=0.5,linecolor=red,grid,function=x^2+y^2-16,showpoints, + ChoicePoints=-4 120 -45,WriteData,FileName=circle](-4,-4)(4,4) +\end{verbatim} +This grid contains 16 cells along the 2 axes, the side of each is 0.5 cm. + +\subsection{Coloring inside an object} +\begin{center} +\begin{pspicture}[showgrid=false](-6,-4)(6,4) +\psContourPlot[unit=0.5,algebraic,a=0.4,linecolor=blue,Fill,fillcolor=red,function=x*(x^2+y^2)-10*(x^2-y^2),grid](-10,-8)(10,8) +\psline{<->}(0,4.5)(0,0)(5.5,0) +\uput[d](0,0){$O$} +\uput[u](0,4.5){$y$} +\uput[r](5.5,0){$x$} +\end{pspicture} +\end{center} +\begin{verbatim} +\psContourPlot[unit=0.5,algebraic,a=0.4, + linecolor=blue,Fill,fillcolor=red, + function=x*(x^2+y^2)-10*(x^2-y^2),grid](-10,-8)(10,8) +\end{verbatim} +\subsection{2D metaballs} +\begin{center} +\begin{animateinline}[controls,palindrome, + begin={\begin{pspicture}(-8,-4)(8,4)}, + end={\end{pspicture}}]{5}% 5 image/s +\multiframe{50}{r=-2+0.08}{% +\psframe*(-6.4,-4)(6.4,4) +\pstVerb{/xC \r\space def + /FonctionMetaballs { + 1 x xC sub dup mul y dup mul add sqrt div + 0.5 x xC add dup mul y dup mul add sqrt div + add + 1 sub + } def}% +\psContourPlot[unit=2,a=0.1,linewidth=0.025,linecolor=red,fillcolor=cyan,Fill,ReverseColors,function=FonctionMetaballs](-4,-2)(4,2) +\psdots(! xC 2 mul 0)(! xC neg 2 mul 0)} +\end{animateinline} +\end{center} +\begin{verbatim} +\begin{animateinline}[controls,palindrome, + begin={\begin{pspicture}(-8,-4)(8,4)}, + end={\end{pspicture}}]{5}% 5 image/s +\multiframe{50}{r=-2+0.08}{% +\psframe*(-6.4,-4)(6.4,4) +\pstVerb{/xC \r\space def + /FonctionMetaballs { + 1 x xC sub dup mul y dup mul add sqrt div + 0.5 x xC add dup mul y dup mul add sqrt div + add + 1 sub + } def}% +\psContourPlot[unit=2,a=0.1,linewidth=0.025,linecolor=red,fillcolor=cyan,Fill,ReverseColors, + function=FonctionMetaballs](-8,-4)(8,4) +\psdots(! xC 2 mul 0)(! xC neg 2 mul 0)} +\end{animateinline} +\end{verbatim} +% 5 metaballs +\begin{center} +% 1/((x-0.0001)^2+(y-1)^2)^2+ +% 1/((x-0.95)^2+(y-0.309)^2)^2+ +% 1/((x+0.5878)^2+(y+0.809)^2)^2+ +% 1/((x-0.5878)^2+(y+0.809)^2)^2+ +% 1/((x+0.95)^2+(y-0.309)^2)^2 +% -17 +\begin{pspicture}[showgrid](-4,-4)(4,4) +\psset{unit=2.5} +\pstVerb{/FonctionMetaballs { + 1 x 0.0001 sub dup mul y 1 sub dup mul add dup mul div + 1 x 0.95 sub dup mul y 0.309 sub dup mul add dup mul div add + 1 x 0.5878 sub dup mul y 0.809 add dup mul add dup mul div add + 1 x 0.5878 add dup mul y 0.809 add dup mul add dup mul div add + 1 x 0.95 add dup mul y 0.309 sub dup mul add dup mul div add + 17 sub + } def}% +\psContourPlot[a=0.025,linecolor=red,fillcolor=cyan,Fill,ReverseColors, + function=FonctionMetaballs](-4,-4)(4,4) +\psdots(0,1)(0.95,0.309)(-0.95,0.309)(-0.5878,-0.809)(0.5878,-0.809) +\pspolygon(0,1)(-0.95,0.309)(-0.5878,-0.809)(0.5878,-0.809)(0.95,0.309) +\end{pspicture} +\end{center} +\begin{verbatim} +% 5 metaballs +\begin{center} +% 1/((x-0.0001)^2+(y-1)^2)^2+ +% 1/((x-0.95)^2+(y-0.309)^2)^2+ +% 1/((x+0.5878)^2+(y+0.809)^2)^2+ +% 1/((x-0.5878)^2+(y+0.809)^2)^2+ +% 1/((x+0.95)^2+(y-0.309)^2)^2 +% -17 +\begin{pspicture}[showgrid](-4,-4)(4,4) +\psset{unit=2.5} +\pstVerb{/FonctionMetaballs { + 1 x 0.0001 sub dup mul y 1 sub dup mul add dup mul div + 1 x 0.95 sub dup mul y 0.309 sub dup mul add dup mul div add + 1 x 0.5878 sub dup mul y 0.809 add dup mul add dup mul div add + 1 x 0.5878 add dup mul y 0.809 add dup mul add dup mul div add + 1 x 0.95 add dup mul y 0.309 sub dup mul add dup mul div add + 17 sub + } def}% +\psContourPlot[a=0.05,linecolor=red,fillcolor=cyan,Fill,ReverseColors, + function=FonctionMetaballs](-4,-4)(4,4) +\psdots(0,1)(0.95,0.309)(-0.95,0.309)(-0.5878,-0.809)(0.5878,-0.809) +\pspolygon(0,1)(-0.95,0.309)(-0.5878,-0.809)(0.5878,-0.809)(0.95,0.309) +\end{pspicture} +\end{verbatim} +\subsection{The field lines of an Hertzian dipole} +\begin{center} +\begin{pspicture}[showgrid](-5,-5)(5,5) +\pstVerb{/ti 0 def /k0 2 PI mul def}% +\multido{\rc=-1.1+0.2}{11}{ +\psContourPlot[unit=5,a=0.025,linewidth=0.01,linecolor={[rgb]{0 0.5 0}}, + function=/ri x dup mul y dup mul add sqrt k0 mul def + /theta x y atan def + ri ti sub COS ri ti sub SIN ri div add theta sin dup mul mul \rc\space sub](-1,-1)(1,1) +} +\end{pspicture} +\end{center} +\begin{verbatim} +\pstVerb{/t 0 def /k0 2 PI mul def}% +\multido{\rc=-1.1+0.2}{11}{ +\psContourPlot[unit=5,a=0.025,linewidth=0.01,linecolor={[rgb]{0 0.5 0}}, + function=/r x dup mul y dup mul add sqrt k0 mul def + /theta x y atan def + r t sub COS r t sub SIN r div add theta sin dup mul mul \rc\space sub](-1,-1)(1,1)} +\end{verbatim} +\section{Complements} +Examples are included in the documentation, but you will find other examples on the blog : + +\centerline{\url{http://pstricks.blogspot.com/}} + +\noindent and as an application dedicated to physics, the drawing of magnetic field lines of parallel wires : + +\centerline{\url{http://pstricks.blogspot.com/2018/07/champs-magnetiques-crees-par-des-fils.html}} +\end{document} diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/pst-contourplot-docFR.pdf b/Master/texmf-dist/doc/generic/pst-contourplot/pst-contourplot-docFR.pdf Binary files differnew file mode 100644 index 00000000000..a4c9227c84f --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/pst-contourplot-docFR.pdf diff --git a/Master/texmf-dist/doc/generic/pst-contourplot/pst-contourplot-docFR.tex b/Master/texmf-dist/doc/generic/pst-contourplot/pst-contourplot-docFR.tex new file mode 100644 index 00000000000..f85981bb14a --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-contourplot/pst-contourplot-docFR.tex @@ -0,0 +1,185 @@ +\documentclass[11pt]{article} +\usepackage[a4paper,margin=2cm]{geometry} +\usepackage[latin1]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[garamond]{mathdesign} +\usepackage{multido,animate,pst-math} +\usepackage[colorlinks=true]{hyperref} +\usepackage{pst-contourplot} +\title{psContourPlot} +\date{14 juillet 2018} +\author{Manuel Luque} +\title{L'algorithme ``\textit{marching squares}'' adapté à PSTricks v\fileversion} +\begin{document} +\maketitle +\section{La commande \textbackslash{psContourPlot[options](x1,y1)(x2,y2)}} +Si vous ne connaissez pas les ``\textit{marching squares}'', l'article que Wikipedia lui consacre, très joliment illustré, me paraît très complet : + +\centerline{\url{https://en.wikipedia.org/wiki/Marching_squares}} + +Il s'agit d'une adaptation de cet algorithme à PSTricks, utilisé dans la commande \verb+\psContourPlot[options]+\footnote{Le nom de la commande est copié sur celle de Mathematica : ContourPlot} qui possède les options suivantes : +\begin{enumerate} + \item \texttt{[function=])} : fonction implicite $f(x,y)$ de la courbe à représenter en mode algebraic ou postscript, il faut noter que le mode postscript est le plus rapide ; + \item \texttt{(x1,y1)(x2,y2)} : les limites du cadre d'étude, comme pour \verb+\psframe(x1,y1)(x2,y2)+, coordonnées du coin inférieur à gauche et du coin supérieur à droite ; + \item \texttt{[a=0.025]} : côté d'une cellule (carré) ; + \item \texttt{[grid=false]} : booléen pour dessiner la grille des cellules ; + \item \texttt{[Fill=false]} : booléen pour colorier l'intérieur avec l'option de PSTricks \texttt{[fillcolor]} ; + \item \texttt{[ReverseColors=false]} : le coloriage de l'intérieur n'est valable que pour un seul objet (un cercle par exemple). S'il y a plusieurs objets (voir les 2 exemples des metaballs) c'est l'extérieur qui se colorise. En activant ce booléen on corrige ce problème ; + \item \texttt{[showpoints]} : booléen pour afficher les points la la courbe (option de PSTricks) ; + \item \texttt{[ChoicePoints= liste de numéros de points]} : on place ici les points où il y aura une flèche sur la courbe, on indique une valeur négative si pour la valeur positive la flèche n'est pas dans le sens souhaité~; + \item \texttt{[WriteData]} : booléen permettant d'enregistrer les coordonnées des points, le nom du fichier peut-être choisi avec l'option \texttt{[FileName=PointsCurve]}. +\end{enumerate} +Pour résoudre les 2 cas ambigus de l'algorithme, j'ai adopté la solution proposée par Xiaoqiang Zheng et Alex Pang : + +\centerline{\url{https://classes.soe.ucsc.edu/cmps161/Winter14/papers/tensor/projects/contour/paper.pdf}} + +Une deuxième commande \verb+\psReadData[FileName=...]+ permet représenter la courbe enregistrée, l'option [Fill] n'est pas permise. +\section{Exemples} +\subsection{Un cercle} +\begin{center} +\begin{pspicture}[showgrid](-4,-4)(4,4) +\psContourPlot[algebraic,a=0.5,linecolor=red,grid,function=x^2+y^2-16,ChoicePoints=-4 120 -45,WriteData,FileName=circle,showpoints](-4,-4)(4,4) +\psline{<->}(0,4.5)(0,0)(4.5,0) +\uput[ul](0,0){$O$} +\uput[u](0,4.5){$y$} +\uput[r](4.5,0){$x$} +\end{pspicture} +\end{center} +\begin{verbatim} +\psContourPlot[algebraic,a=0.5,linecolor=red,grid,function=x^2+y^2-16,,showpoints, + ChoicePoints=-4 120 -45,WriteData,FileName=circle](-4,-4)(4,4) +\end{verbatim} +Cette grille contient 16 cellules suivant les 2 axes, le côté de chacune vaut 0.5 cm. + +\subsection{Colorier l'intérieur} +\begin{center} +\begin{pspicture}[showgrid=false](-6,-4)(6,4) +\psContourPlot[unit=0.5,algebraic,a=0.4,linecolor=blue,Fill,fillcolor=red,function=x*(x^2+y^2)-10*(x^2-y^2),grid](-10,-8)(10,8) +\psline{<->}(0,4.5)(0,0)(5.5,0) +\uput[d](0,0){$O$} +\uput[u](0,4.5){$y$} +\uput[r](5.5,0){$x$} +\end{pspicture} +\end{center} +\begin{verbatim} +\psContourPlot[unit=0.5,algebraic,a=0.4, + linecolor=blue,Fill,fillcolor=red, + function=x*(x^2+y^2)-10*(x^2-y^2),grid](-10,-8)(10,8) +\end{verbatim} +\subsection{2D metaballs} +\begin{center} +\begin{animateinline}[controls,palindrome, + begin={\begin{pspicture}(-8,-4)(8,4)}, + end={\end{pspicture}}]{5}% 5 image/s +\multiframe{50}{r=-2+0.08}{% +\psframe*(-6.4,-4)(6.4,4) +\pstVerb{/xC \r\space def + /FonctionMetaballs { + 1 x xC sub dup mul y dup mul add sqrt div + 0.5 x xC add dup mul y dup mul add sqrt div + add + 1 sub + } def}% +\psContourPlot[unit=2,a=0.1,linewidth=0.025,linecolor=red,fillcolor=cyan,Fill,ReverseColors,function=FonctionMetaballs](-4,-2)(4,2) +\psdots(! xC 2 mul 0)(! xC neg 2 mul 0)} +\end{animateinline} +\end{center} +\begin{verbatim} +\begin{animateinline}[controls,palindrome, + begin={\begin{pspicture}(-8,-4)(8,4)}, + end={\end{pspicture}}]{5}% 5 image/s +\multiframe{50}{r=-2+0.08}{% +\psframe*(-6.4,-4)(6.4,4) +\pstVerb{/xC \r\space def + /FonctionMetaballs { + 1 x xC sub dup mul y dup mul add sqrt div + 0.5 x xC add dup mul y dup mul add sqrt div + add + 1 sub + } def}% +\psContourPlot[unit=2,a=0.1,linewidth=0.025,linecolor=red,fillcolor=cyan,Fill,ReverseColors, + function=FonctionMetaballs](-8,-4)(8,4) +\psdots(! xC 2 mul 0)(! xC neg 2 mul 0)} +\end{animateinline} +\end{verbatim} +\newpage +% 5 metaballs +\begin{center} +% 1/((x-0.0001)^2+(y-1)^2)^2+ +% 1/((x-0.95)^2+(y-0.309)^2)^2+ +% 1/((x+0.5878)^2+(y+0.809)^2)^2+ +% 1/((x-0.5878)^2+(y+0.809)^2)^2+ +% 1/((x+0.95)^2+(y-0.309)^2)^2 +% -17 +\begin{pspicture}[showgrid](-4,-4)(4,4) +\psset{unit=2.5} +\pstVerb{/FonctionMetaballs { + 1 x 0.0001 sub dup mul y 1 sub dup mul add dup mul div + 1 x 0.95 sub dup mul y 0.309 sub dup mul add dup mul div add + 1 x 0.5878 sub dup mul y 0.809 add dup mul add dup mul div add + 1 x 0.5878 add dup mul y 0.809 add dup mul add dup mul div add + 1 x 0.95 add dup mul y 0.309 sub dup mul add dup mul div add + 17 sub + } def}% +\psContourPlot[a=0.025,linecolor=red,fillcolor=cyan,Fill,ReverseColors, + function=FonctionMetaballs](-4,-4)(4,4) +\psdots(0,1)(0.95,0.309)(-0.95,0.309)(-0.5878,-0.809)(0.5878,-0.809) +\pspolygon(0,1)(-0.95,0.309)(-0.5878,-0.809)(0.5878,-0.809)(0.95,0.309) +\end{pspicture} +\end{center} +\begin{verbatim} +% 5 metaballs +\begin{center} +% 1/((x-0.0001)^2+(y-1)^2)^2+ +% 1/((x-0.95)^2+(y-0.309)^2)^2+ +% 1/((x+0.5878)^2+(y+0.809)^2)^2+ +% 1/((x-0.5878)^2+(y+0.809)^2)^2+ +% 1/((x+0.95)^2+(y-0.309)^2)^2 +% -17 +\begin{pspicture}[showgrid](-4,-4)(4,4) +\psset{unit=2.5} +\pstVerb{/FonctionMetaballs { + 1 x 0.0001 sub dup mul y 1 sub dup mul add dup mul div + 1 x 0.95 sub dup mul y 0.309 sub dup mul add dup mul div add + 1 x 0.5878 sub dup mul y 0.809 add dup mul add dup mul div add + 1 x 0.5878 add dup mul y 0.809 add dup mul add dup mul div add + 1 x 0.95 add dup mul y 0.309 sub dup mul add dup mul div add + 17 sub + } def}% +\psContourPlot[a=0.05,linecolor=red,fillcolor=cyan,Fill,ReverseColors, + function=FonctionMetaballs](-4,-4)(4,4) +\psdots(0,1)(0.95,0.309)(-0.95,0.309)(-0.5878,-0.809)(0.5878,-0.809) +\pspolygon(0,1)(-0.95,0.309)(-0.5878,-0.809)(0.5878,-0.809)(0.95,0.309) +\end{pspicture} +\end{verbatim} +\newpage +\subsection{Les lignes de champ d'un dipôle hertzien} +\begin{center} +\begin{pspicture}(-5,-5)(5,5) +\pstVerb{/ti 0 def /k0 2 PI mul def}% +\multido{\rc=-0.9+0.2,\i=1+1}{11}{ +\psContourPlot[unit=5,a=0.025,linewidth=0.01,linecolor={[rgb]{0 0.5 0}}, + function=/ri x dup mul y dup mul add sqrt k0 mul def + /theta x y atan def + ri ti sub COS ri ti sub SIN ri div add theta sin dup mul mul \rc\space sub](-1,-1)(1,1) +} +\end{pspicture} +\end{center} +\begin{verbatim} +\pstVerb{/t 0 def /k0 2 PI mul def}% +\multido{\rc=-1.1+0.2}{11}{ +\psContourPlot[unit=5,a=0.025,linewidth=0.01,linecolor={[rgb]{0 0.5 0}}, + function=/r x dup mul y dup mul add sqrt k0 mul def + /theta x y atan def + r t sub COS r t sub SIN r div add theta sin dup mul mul \rc\space sub](-1,-1)(1,1)} +\end{verbatim} +\section{Compléments} +Des exemples sont inclus dans la documentation, mais vous trouverez d'autres exemples sur le blog : + +\centerline{\url{http://pstricks.blogspot.com/}} + +\noindent et comme application dédiée à la physique, le tracé des lignes de champ magnétique de fils parallèles : + +\centerline{\url{http://pstricks.blogspot.com/2018/07/champs-magnetiques-crees-par-des-fils.html}} + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/pst-contourplot/pst-contourplot.tex b/Master/texmf-dist/tex/generic/pst-contourplot/pst-contourplot.tex new file mode 100644 index 00000000000..afad180f6c8 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pst-contourplot/pst-contourplot.tex @@ -0,0 +1,693 @@ +%% Package `pst-contourplot.tex' +%% +%% This program can be redistributed and/or modified under +%% the terms of the LaTeX Project Public License Distributed +%% from CTAN archives in directory macros/latex/base/lppl.txt. +%% +%% DESCRIPTION: +%% `pst-contourplot' Extension of PSTricks +%% for drawing implicit functions f(x,y)=0 +%% This package uses the "marching squares" algorithm. +%% +%% Author : <manuel.luque27@gmail.com> +%% +\csname PSTCONTOURPLOTLoaded\endcsname +\let \PSTCONTOURPLOTLoaded\endinput +\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi +\ifx\PSTXKeyLoaded\endinput \else\input pst-xkey.tex\fi +\def\fileversion{0.6} +\def\filedate{2018/07/14} +\message{`PST' v\fileversion, \filedate} +% +\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax +\pst@addfams{pst-contourplot} +\define@key[psset]{pst-contourplot}{a}{\edef\psk@contourplot@a{#1 }} % dimension d'une cellule +% +\define@boolkey[psset]{pst-contourplot}[pst@]{grid}[true]{} +\define@boolkey[psset]{pst-contourplot}[Pst@]{Fill}[true]{} +\define@boolkey[psset]{pst-contourplot}[Pst@]{ReverseColors}[true]{} +\psset[pst-contourplot]{a=0.025,grid=false,Fill=false,ReverseColors=false} +% 04 juillet 2018 +\define@boolkey[psset]{pst-contourplot}[Pst@]{Draw}[true]{} +\psset[pst-contourplot]{Draw=true} +% 6 juillet +\define@key[psset]{pst-contourplot}{function}{\edef\psk@contourplot@function{#1 }} % la fonction implicite +\define@key[psset]{pst-contourplot}{ChoicePoints}{\edef\psk@contourplot@ChoicePoints{#1 }} % choix des points pour les flèches +\psset[pst-contourplot]{function=,ChoicePoints=} +% 14 juillet +\define@boolkey[psset]{pst-contourplot}[Pst@]{WriteData}[true]{} +\psset[pst-contourplot]{WriteData=false} +\define@key[psset]{pst-contourplot}{FileName}{\edef\psk@contourplot@FileName{#1}} % nom du fichier +\psset[pst-contourplot]{FileName=PointsCurve} +% +\def\psContourPlot{\def\pst@par{}\pst@object{psContourPlot}} +\def\psContourPlot@i(#1,#2)(#3,#4){% les limites +\begin@SpecialObj +\addto@pscode{% +100 dict begin +/cm {\pst@number\psunit mul } bind def % mise à l'échelle +/Div { dup 0 eq { pop } { div } ifelse } def % control the Division +% cote du carre-cellule +/a \psk@contourplot@a def % en pts + \ifPst@algebraic + /fonction (\psk@contourplot@function) tx@AlgToPs begin AlgToPs end cvx def + \else + /fonction { \psk@contourplot@function } def + \fi + /function {2 dict begin + /y exch def + /x exch def + fonction end + } def +\ifPst@ReverseColors /flag 0 def \else /flag 1 def \fi +/tabCels [ +#1 a #3 {/x exch def +#2 a #4 {/y exch def +[ x y + x a add y + x a add y a add + x y a add] +} for +} for +] def + % indexer les sommets avec leur poids + % 0 si f(x,y)<=0 + % 1 si f(x,y)>0 +/calcValeur { + function + 0 le {(0)}{(1)} ifelse + } def +% https://en.wikibooks.org/wiki/PostScript_FAQ +/concatstringarray % [(a) (b) ... (z)] --> (ab...z) + { 0 1 index { length add } forall string + 0 3 2 roll + { 3 copy putinterval + length add + } + forall pop + } bind def +/interpolate { % x2 y2 x1 y1 interpolation lineaire => x y +7 dict begin + /y1 exch def /x1 exch def + /y2 exch def /x2 exch def + /v1 x1 y1 function def + /v2 x2 y2 function def + /delta v1 v2 v1 sub Div def + x1 delta x2 x1 sub mul sub % x + y1 delta y2 y1 sub mul sub % y + end +} def +/tabIndex [ +#1 a #3 {/x exch def +#2 a #4 {/y exch def +[ +x y calcValeur +x a add y calcValeur +x a add y a add calcValeur +x y a add calcValeur +] +concatstringarray +} for +} for +] def +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifPst@Fill +gsave +1 setlinejoin +\pst@usecolor\psfillcolor +0 1 tabCels length 1 sub {/i exch def +/valuesVertice tabIndex i get def +/cellule tabCels i get def +% les sommets +/S0 {cellule 0 2 getinterval aload pop } def +/S1 {cellule 2 2 getinterval aload pop } def +/S2 {cellule 4 2 getinterval aload pop } def +/S3 {cellule 6 2 getinterval aload pop } def +flag 0 eq {valuesVertice (1111) eq { +S0 /y exch def /x exch def +/part { +newpath +x cm y cm moveto +a cm 0 rlineto +0 a cm rlineto +a neg cm 0 rlineto +closepath +} def +part fill part stroke + } if + }{ +valuesVertice (0000) eq { +S0 /y exch def /x exch def +/part { +newpath +x cm y cm moveto +a cm 0 rlineto +0 a cm rlineto +a neg cm 0 rlineto +closepath +} def +part fill part stroke +} if +} ifelse +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +valuesVertice (1000) eq { + S0 S1 interpolate /yA exch def /xA exch def + S0 S3 interpolate /yB exch def /xB exch def + newpath +flag 1 eq { + xA cm yA cm moveto + S1 cm exch cm exch lineto + S2 cm exch cm exch lineto + S3 cm exch cm exch lineto + xB cm yB cm lineto + }{ + S0 cm exch cm exch moveto + xA cm yA cm lineto + xB cm yB cm lineto + } ifelse + closepath + fill + } if +valuesVertice (0100) eq { + S1 S0 interpolate /yA exch def /xA exch def + S1 S2 interpolate /yB exch def /xB exch def + newpath +flag 1 eq { + xA cm yA cm moveto + xB cm yB cm lineto + S2 cm exch cm exch lineto + S3 cm exch cm exch lineto + S0 cm exch cm exch lineto + }{ + xA cm yA cm moveto + xB cm yB cm lineto + S1 cm exch cm exch lineto + }ifelse + closepath + fill + } if +valuesVertice (1100) eq { + S1 S2 interpolate /yA exch def /xA exch def + S0 S3 interpolate /yB exch def /xB exch def + newpath +flag 1 eq { + xA cm yA cm moveto + S2 cm exch cm exch lineto + S3 cm exch cm exch lineto + xB cm yB cm lineto + }{ + S0 cm exch cm exch moveto + S1 cm exch cm exch lineto + xA cm yA cm lineto + xB cm yB cm lineto + }ifelse + closepath + fill + } if +valuesVertice (0001) eq { + S3 S0 interpolate /yA exch def /xA exch def + S3 S2 interpolate /yB exch def /xB exch def + newpath +flag 1 eq { + xA cm yA cm moveto + S0 cm exch cm exch lineto + S1 cm exch cm exch lineto + S2 cm exch cm exch lineto + xB cm yB cm lineto + }{ + xA cm yA cm moveto + xB cm yB cm lineto + S3 cm exch cm exch lineto + } ifelse + closepath + fill + } if +valuesVertice (1001) eq { + S0 S1 interpolate /yA exch def /xA exch def + S3 S2 interpolate /yB exch def /xB exch def + newpath +flag 1 eq { + xA cm yA cm moveto + S1 cm exch cm exch lineto + S2 cm exch cm exch lineto + xB cm yB cm lineto + }{ + xA cm yA cm moveto + xB cm yB cm lineto + S3 cm exch cm exch lineto + S0 cm exch cm exch lineto + } ifelse + closepath + fill + } if +valuesVertice (0101) eq { % ambigüité +% lever l'ambigüité +% calculer les cccordonnées du centre de la cellule +S0 /y0 exch def /x0 exch def +S2 /y2 exch def /x2 exch def +/xI x0 x2 add 2 div def +/yI y0 y2 add 2 div def + S0 S1 interpolate /yC exch def /xC exch def + S0 S3 interpolate /yD exch def /xD exch def + S2 S1 interpolate /yB exch def /xB exch def + S2 S3 interpolate /yA exch def /xA exch def +xI yI function 0 flag 0 eq {ge}{le} ifelse { + newpath + xA cm yA cm moveto + xB cm yB cm lineto + S2 cm exch cm exch lineto + closepath + fill + newpath + xD cm yD cm moveto + S0 cm exch cm exch lineto + xC cm yC cm lineto + closepath + fill + }{ + newpath + xA cm yA cm moveto + xB cm yB cm lineto + S1 cm exch cm exch lineto + xC cm yC cm lineto + S0 cm exch cm exch lineto + xD cm yD cm lineto + closepath + fill + } ifelse + } if +valuesVertice (1101) eq { + S2 S1 interpolate /yA exch def /xA exch def + S2 S3 interpolate /yB exch def /xB exch def + newpath +flag 1 eq { + xA cm yA cm moveto + S2 cm exch cm exch lineto + xB cm yB cm lineto + }{ + xA cm yA cm moveto + xB cm yB cm lineto + S3 cm exch cm exch lineto + S0 cm exch cm exch lineto + S1 cm exch cm exch lineto + }ifelse + closepath + fill + } if +valuesVertice (0010) eq { + S2 S1 interpolate /yA exch def /xA exch def + S2 S3 interpolate /yB exch def /xB exch def + newpath +flag 1 eq { + S0 cm exch cm exch moveto + S1 cm exch cm exch lineto + xA cm yA cm lineto + xB cm yB cm lineto + S3 cm exch cm exch lineto + }{ + xA cm yA cm moveto + S2 cm exch cm exch lineto + xB cm yB cm lineto + } ifelse + closepath + fill + } if +valuesVertice (1010) eq { % ambigüité +% lever l'ambigüité +% calculer les cccordonnées du centre de la cellule +S0 /y0 exch def /x0 exch def +S2 /y2 exch def /x2 exch def +/xI x0 x2 add 2 div def +/yI y0 y2 add 2 div def + S0 S1 interpolate /yC exch def /xC exch def + S0 S3 interpolate /yD exch def /xD exch def + S2 S1 interpolate /yB exch def /xB exch def + S2 S3 interpolate /yA exch def /xA exch def +xI yI function 0 flag 0 eq {ge}{le} ifelse { + newpath + xA cm yA cm moveto + xB cm yB cm lineto + S2 cm exch cm exch lineto + closepath +% fill + newpath + xD cm yD cm moveto + S0 cm exch cm exch lineto + xC cm yC cm lineto + closepath + fill + }{ + newpath + xA cm yA cm moveto + xB cm yB cm lineto + S1 cm exch cm exch lineto + xC cm yC cm lineto + S0 cm exch cm exch lineto + xD cm yD cm lineto + closepath + fill + } ifelse + } if +valuesVertice (0110) eq { + S0 S1 interpolate /yA exch def /xA exch def + S3 S2 interpolate /yB exch def /xB exch def + newpath +flag 1 eq { + S0 cm exch cm exch moveto + xA cm yA cm lineto + xB cm yB cm lineto + S3 cm exch cm exch lineto + }{ + xA cm yA cm moveto + S1 cm exch cm exch lineto + S2 cm exch cm exch lineto + xB cm yB cm lineto + } ifelse + closepath + fill + } if +valuesVertice (1110) eq { % OK + S3 S0 interpolate /yA exch def /xA exch def + S3 S2 interpolate /yB exch def /xB exch def + newpath +flag 1 eq { + xA cm yA cm moveto + xB cm yB cm lineto + S3 cm exch cm exch lineto + }{ + xA cm yA cm moveto + xB cm yB cm lineto + S2 cm exch cm exch lineto + S1 cm exch cm exch lineto + S0 cm exch cm exch lineto + } ifelse + closepath + fill + } if +valuesVertice (0011) eq { + S0 S3 interpolate /yA exch def /xA exch def + S1 S2 interpolate /yB exch def /xB exch def + newpath +flag 1 eq { + S0 cm exch cm exch moveto + S1 cm exch cm exch lineto + xB cm yB cm lineto + xA cm yA cm lineto + }{ + xA cm yA cm moveto + xB cm yB cm lineto + S2 cm exch cm exch lineto + S3 cm exch cm exch lineto + } ifelse + closepath + fill + } if +valuesVertice (1011) eq { + S1 S0 interpolate /yA exch def /xA exch def + S1 S2 interpolate /yB exch def /xB exch def + newpath +flag 1 eq { + xA cm yA cm moveto + S1 cm exch cm exch lineto + xB cm yB cm lineto + }{ + xA cm yA cm moveto + xB cm yB cm lineto + S2 cm exch cm exch lineto + S3 cm exch cm exch lineto + S0 cm exch cm exch lineto + } ifelse + closepath + fill + } if +valuesVertice (0111) eq { + S0 S1 interpolate /yA exch def /xA exch def + S0 S3 interpolate /yB exch def /xB exch def + newpath +flag 1 eq { + S0 cm exch cm exch moveto + xA cm yA cm lineto + xB cm yB cm lineto + }{ + xA cm yA cm moveto + S1 cm exch cm exch lineto + S2 cm exch cm exch lineto + S3 cm exch cm exch lineto + xB cm yB cm lineto + } ifelse + closepath + fill + } if + }for +grestore +\fi +% la grille +\ifpst@grid +gsave +0.25 setlinewidth +0.5 setgray +#1 a #3 {/x exch def + x cm #2 cm moveto + x cm #4 cm lineto + stroke + } for +#2 a #4 {/y exch def + #1 cm y cm moveto + #3 cm y cm lineto + stroke + } for +newpath +#1 cm #2 cm moveto +#3 cm #2 cm lineto +#3 cm #4 cm lineto +#1 cm #4 cm lineto +closepath +stroke +grestore +\fi +% collecter un tableau de valeurs +/LesPoints [ +0 1 tabCels length 1 sub {/i exch def +/valuesVertice tabIndex i get def +/cellule tabCels i get def +% les sommets +/S0 {cellule 0 2 getinterval aload pop } def +/S1 {cellule 2 2 getinterval aload pop } def +/S2 {cellule 4 2 getinterval aload pop } def +/S3 {cellule 6 2 getinterval aload pop } def +valuesVertice (0000) eq valuesVertice (1111) eq or {} if +valuesVertice (1000) eq { + [S0 S1 interpolate cm exch cm exch] + [S0 S3 interpolate cm exch cm exch] + } if +valuesVertice (0100) eq { + [S1 S0 interpolate cm exch cm exch] + [S1 S2 interpolate cm exch cm exch] + } if +valuesVertice (1100) eq { % OK + [S1 S2 interpolate cm exch cm exch] + [S0 S3 interpolate cm exch cm exch] + } if +valuesVertice (0001) eq { + [S3 S0 interpolate cm exch cm exch] + [S3 S2 interpolate cm exch cm exch] + } if +valuesVertice (1001) eq { + [S0 S1 interpolate cm exch cm exch] + [S3 S2 interpolate cm exch cm exch] + } if +valuesVertice (0101) eq { % ambigüité +% lever l'ambigüité +% calculer les coordonnées du centre de la cellule +S0 /y0 exch def /x0 exch def +S2 /y2 exch def /x2 exch def +/xI x0 x2 add 2 div def +/yI y0 y2 add 2 div def +xI yI function 0 ge { + [S0 S1 interpolate cm exch cm exch] + [S0 S3 interpolate cm exch cm exch] + [S2 S1 interpolate cm exch cm exch] + [S2 S3 interpolate cm exch cm exch] + }{ + [S1 S0 interpolate cm exch cm exch] + [S1 S2 interpolate cm exch cm exch] + [S3 S2 interpolate cm exch cm exch] + [S3 S0 interpolate cm exch cm exch] + } ifelse + } if +valuesVertice (1101) eq { % OK + [S2 S1 interpolate cm exch cm exch] + [S2 S3 interpolate cm exch cm exch] + } if +valuesVertice (0010) eq { %OK + [S2 S1 interpolate cm exch cm exch] + [S2 S3 interpolate cm exch cm exch] + } if +valuesVertice (1010) eq { % ambigüité +% lever l'ambigüité +% calculer les coordonnées du centre de la cellule +S0 /y0 exch def /x0 exch def +S2 /y2 exch def /x2 exch def +/xI x0 x2 add 2 div def +/yI y0 y2 add 2 div def +xI yI function 0 ge { + [S1 S0 interpolate cm exch cm exch] + [S1 S2 interpolate cm exch cm exch] + [S3 S2 interpolate cm exch cm exch] + [S3 S0 interpolate cm exch cm exch] + }{ +% or + [S0 S1 interpolate cm exch cm exch] + [S0 S3 interpolate cm exch cm exch] + [S2 S1 interpolate cm exch cm exch] + [S2 S3 interpolate cm exch cm exch] + } ifelse + } if +valuesVertice (0110) eq { + [S0 S1 interpolate cm exch cm exch] + [S3 S2 interpolate cm exch cm exch] + } if +valuesVertice (1110) eq { % OK + [S3 S0 interpolate cm exch cm exch] + [S3 S2 interpolate cm exch cm exch] + } if +valuesVertice (0011) eq { + [S0 S3 interpolate cm exch cm exch] + [S1 S2 interpolate cm exch cm exch] + } if +valuesVertice (1011) eq { + [S1 S0 interpolate cm exch cm exch] + [S1 S2 interpolate cm exch cm exch] + } if +valuesVertice (0111) eq { + [S0 S1 interpolate cm exch cm exch] + [S0 S3 interpolate cm exch cm exch] + } if +} for + ] def +\ifPst@WriteData +(\psk@contourplot@FileName.dat) (w) file /filePoints exch def +0 1 LesPoints length 1 sub {/i exch def + LesPoints i get aload pop /y exch def /x exch def + filePoints 91 write %% [ + filePoints x 15 string cvs writestring + filePoints 32 write %% espace + filePoints y 15 string cvs writestring + filePoints 93 write %% ] + filePoints 10 write %% CR + } for + filePoints closefile +\fi +% le dessin +\ifshowpoints +0 1 LesPoints length 1 sub {/i exch def + LesPoints i get aload pop \psk@@dotsize \psk@@@dotsize CLW mul add 2 div 0 360 arc fill + } for +\fi +\ifPst@Draw +0 2 LesPoints length 2 sub {/i exch def + LesPoints i get aload pop moveto LesPoints i 1 add get aload pop lineto + stroke + } for +\fi +% flécher +% dessin d'une flèche +/CLW /currentlinewidth load def +/fleche { + 4 dict begin + /y1 exch def /x1 exch def + /y2 exch def /x2 exch def + gsave + x1 y1 moveto + y2 y1 sub x2 x1 sub Atan rotate + 1 CLW mul 2 CLW mul rlineto + -5 CLW mul -2 CLW mul rlineto + 5 CLW mul -2 CLW mul rlineto + closepath + fill + grestore + end +} def +/ChoicePoints [\psk@contourplot@ChoicePoints] def +ChoicePoints length 0 ne { +0 1 ChoicePoints length 1 sub {/i exch def +/UnPoint ChoicePoints i get def + UnPoint abs 2 mod 1 eq {/UnPoint UnPoint 1 sub def} if +UnPoint LesPoints length ge {/UnPoint LesPoints length 5 sub def} if +UnPoint LesPoints length neg le {/UnPoint LesPoints length 4 sub neg def} if +UnPoint 0 ge { + LesPoints UnPoint get aload pop + LesPoints UnPoint 1 add get aload pop + fleche +} { + LesPoints UnPoint abs 1 add get aload pop + LesPoints UnPoint abs get aload pop + fleche +} ifelse +} for +} if +end + }% fin du code ps + \end@SpecialObj + }% % fin de la commande PSTricks +% +% read data +% +\def\psReadData{\def\pst@par{}\pst@object{psReadData}} +\def\psReadData@i{% +\begin@SpecialObj +\addto@pscode{% + /LesPoints [(\psk@contourplot@FileName.dat) run ] def +% le dessin +\ifshowpoints +0 1 LesPoints length 1 sub {/i exch def + LesPoints i get aload pop \psk@@dotsize \psk@@@dotsize CLW mul add 2 div 0 360 arc fill + } for +\fi +\ifPst@Draw +0 2 LesPoints length 2 sub {/i exch def + LesPoints i get aload pop moveto LesPoints i 1 add get aload pop lineto + stroke + } for +\fi +% flécher +% dessin d'une flèche +/CLW /currentlinewidth load def +/fleche { + 4 dict begin + /y1 exch def /x1 exch def + /y2 exch def /x2 exch def + gsave + x1 y1 moveto + y2 y1 sub x2 x1 sub Atan rotate + 1 CLW mul 2 CLW mul rlineto + -5 CLW mul -2 CLW mul rlineto + 5 CLW mul -2 CLW mul rlineto + closepath + fill + grestore + end +} def +/ChoicePoints [\psk@contourplot@ChoicePoints] def +ChoicePoints length 0 ne { +0 1 ChoicePoints length 1 sub {/i exch def +/UnPoint ChoicePoints i get def + UnPoint abs 2 mod 1 eq {/UnPoint UnPoint 1 sub def} if + UnPoint LesPoints length ge {/UnPoint LesPoints length 4 sub def} if + UnPoint LesPoints length neg le {/UnPoint LesPoints length 4 sub neg def} if +UnPoint 0 ge { + LesPoints UnPoint get aload pop + LesPoints UnPoint 1 add get aload pop + fleche +} { + LesPoints UnPoint abs 1 add get aload pop + LesPoints UnPoint abs get aload pop + fleche +} ifelse +} for +} if + }% fin du code ps + \end@SpecialObj + }% % fin de la commande PSTricks +\catcode`\@=\PstAtCode\relax +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/pst-contourplot/pst-contourplot.sty b/Master/texmf-dist/tex/latex/pst-contourplot/pst-contourplot.sty new file mode 100644 index 00000000000..4b8ac578bbf --- /dev/null +++ b/Master/texmf-dist/tex/latex/pst-contourplot/pst-contourplot.sty @@ -0,0 +1,7 @@ +\RequirePackage{pstricks} +\ProvidesPackage{pst-contourplot.tex}[2018/05/05 package wrapper for PSTricks pst-contourplot.tex] +\input pst-contourplot.tex +\ProvidesFile{pst-contourplot.tex} + [\filedate\space v\fileversion\space `PST-contourplot.tex'] +\endinput +%% End of file `pst-contourplot.sty'. |