# Difference between revisions of "File:Nemplot.jpg"

Explicit plot of the Nemtsov function $\mathrm{Nem}_q(z)=z+z^3+qz^4$:

$y=\mathrm{Nem}_q(z)$ versus $x$ for various $q$.

## C++ generator of the curves

File ado.cin, conto.cin should be loaded in order to compile the code below:

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#define DB double
#define DO(x,y) for(x=0;x<y;x++)
//using namespace std;
#include <complex>
typedef std::complex<double> z_type;
#define Re(x) x.real()
#define Im(x) x.imag()
#define I z_type(0.,1.)
#include "conto.cin"

//#include "aunem.cin"

int main(){ int Max; int j,k,m,n; DB x,y, p,q, t,tr,ti; z_type z,c,d;

DB P=1 ; DB Q=.5;
fprintf(o,"201 501 translate\n 100 100 scale 2 setlinecap\n");
for(m=-2;m<3;m++){M(m,-5)L(m,5)}
for(n=-5;n<6;n++){M(-2,n)L(2,n)}
fprintf(o,".006 W 0 0 0 RGB 2 setlinecap S 1 setlinejoin\n");

q=0.; DO(m,401){x=-2+.01*m; y=x*(1.+x*x*(1.+q*x)); if(m==0) M(x,y) else L(x,y) ; }
fprintf(o,".02 W 0 0 0 RGB S\n");
q=.5; DO(m,401){x=-2+.01*m; y=x*(1.+x*x*(1.+q*x)); if(m==0) M(x,y) else L(x,y); if(x>0 && y>6) break; }
fprintf(o,".02 W 1 0 0 RGB S\n");
q=1.; DO(m,401){x=-2+.01*m; y=x*(1.+x*x*(1.+q*x)); if(m==0) M(x,y) else L(x,y); if(x>0 && y>6) break; }
fprintf(o,".02 W 0 .8 0 RGB S\n");
q=2.; DO(m,401){x=-1.5+.01*m; y=x*(1.+x*x*(1.+q*x)); if(m==0) M(x,y) else L(x,y) ; if(x>0 && y>6) break;}
fprintf(o,".02 W 0 0 1 RGB S\n");

fprintf(o,"showpage\n%cTrailer",'%'); fclose(o);
system("epstopdf nemplo.eps");
system( "open nemplo.pdf"); //mac

//getchar(); system("killall Preview");// mac

return 0;
}

## Latex generator of labels

\documentclass[12pt]{article}
\usepackage{graphics}
\paperwidth 404pt
\paperheight 1006pt
\usepackage{geometry}
\usepackage{rotating}
\textwidth 1260pt
\textheight 1260pt
\topmargin -106pt
\oddsidemargin -74pt
\parindent 0pt
\pagestyle{empty}
\newcommand \ing {\includegraphics}
\newcommand \sx {\scalebox}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\begin{document}
\begin{picture}(404,1004)
%\put(24,20){\ing{arqne114}}
%\put(50,40){\ing{sunem10q10ma6a}}
%\put(50,40){\ing{sunem10q10ma6s}}
%\put(24,20){\ing{aunem11mb}}
\put(2,2){\ing{nemplo}}
\put(176,990){\sx{3}{$y$}}
\put(176,895){\sx{3}{$4$}}
\put(176,795){\sx{3}{$3$}}
\put(176,695){\sx{3}{$2$}}
\put(176,595){\sx{3}{$1$}}
\put(176,495){\sx{3}{$0$}}
\put(156,395){\sx{3}{$-1$}}
\put(156,295){\sx{3}{$-2$}}
\put(156,195){\sx{3}{$-3$}}
\put(156, 95){\sx{3}{$-4$}}
%\put(156,395){\sx{3}{$-5$}}
\put(82,476){\sx{3}{$-1$}}
\put(196,476){\sx{3}{$0$}}
\put(296,476){\sx{3}{$1$}}
\put(385,476){\sx{3}{$x$}}
\put(70,888){\sx{3}{\rot{-87} $q\!=\!2$\ero}}
%\put(70,688){\sx{3}{\rot{-87} $q\!=\!2$\ero}}
\put(40,490){\sx{3}{\rot{-79} $q\!=\!1$\ero}}
\put(54,280){\sx{3}{\rot{60} $q\!=\!0.5$\ero}}
%\put(90,108){\sx{3}{\rot{80} $q\!=\!0$\ero}}
%\put(60,18){\sx{3}{\rot{80} $q\!=\!0$\ero}}
\put(46,18){\sx{3}{\rot{80} $q\!=\!0$\ero}}
%
\put(294,916){\sx{3}{\rot{80} $q\!=\!2$\ero}}
\put(368,916){\sx{3}{\rot{80} $q\!=\!0$\ero}}
\end{picture}
\end{document}

## File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current06:13, 1 December 2018838 × 2,088 (129 KB)Maintenance script (talk | contribs)Importing image file
• You cannot overwrite this file.

The following page links to this file: