File:Itnem20plot.jpg

From TORI
Jump to: navigation, search
Original file(5,562 × 5,562 pixels, file size: 1.3 MB, MIME type: image/jpeg)

Iterates of the Nemtsov function with parameter $q\!=\!2$:

$y=\mathrm{Nem}_2^{\,n}(x)$

versus $x$ for various values of $n$.

References


C++ generator of curves



#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#define DB double
#define DO(x,y) for(x=0;x<y;x++)
#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"

DB Q=1.; // Reassigned in the program
z_type nem(z_type z){ return z*(1.+z*z*(1.+z*Q)); }
z_type nem1(z_type z){ return 1.+z*z*(3.+z*(4.*Q)); } // WARNING: Q is global!

DB K=Q*Q; // Reassigned in the program
DB A[37][19];
int co(){
#include "sunema.txt"
return 0;}

z_type sun(z_type z){ z_type p[37],s; int m,M,n,N;
z_type L=log(-z);
z_type t=1./sqrt(-2.*z);
M=36;
for(m=2;m<M+1;m++){ N=m/2; s=A[m][N]*L; for(n=N-1;n>0;n--) { s+=A[m][n]; s*=L; }
                p[m]=A[m][0]+s;
                }
s=p[M]*t; for(m=M-1; m>1;m--) { s+=p[m]; s*=t;}
        return t*( 1. + t* (-Q + s) );
}

z_type sune(z_type z){ int m,n; DB x,y; z_type s;
DB R=20.+20.*Q*Q;
x=Re(z); if(x<-R) return sun(z);
y=Im(z); if(fabs(y)>R) return sun(z);
n=int(x+R);
s=sun(z-(0.+n));
DO(m,n) s=nem(s);
return s;
}

DB AUNE1=0;

z_type sunem(z_type z){ int m,n; DB x,y; z_type s;
DB R=20.+20.*Q*Q;
x=Re(z); if(x<-R) return sun(z);
y=Im(z); if(fabs(y)>R) return sun(z);
n=int(x+R);
s=sun(z-(n-AUNE1));
DO(m,n) s=nem(s);
return s;
}

#include"nembran.cin"
z_type NemZo=nembra(Q);
z_type ANemZo=nem(NemZo);
DB tr=Re(ANemZo);
DB ti=Im(ANemZo);

#include "arqnem.cin"

DB C[41];
//DB K=Q*Q;
int coa(){ //C[1]=(0.5 - K)*Q; C[2]=-0.625 + (-0.25 + K/2.)*K; ..
#include "aunemco.txt"
return 40;
}

z_type aune0(z_type z){ z_type s; int n;
s=C[40]*z; for(n=39;n>0;n--){s+=C[n];s*=z;}
return (-.5/z+Q)/z + (1.5+K)*log(z) + (.5*K + (.75+.5*K)*log(2.)) + s ;
}

z_type aune1(z_type z){ int n, N=20; DO(n,N) z=arqnem(z);
return aune0(z)+(0.+n);}

z_type aunem(z_type z){ int n, N=20; DO(n,N) z=arqnem(z);
return aune0(z)+(n-AUNE1);}

z_type aune02(z_type z){ z_type s; int n; s=(C[2]*z+C[1])*z;
                return (-.5/z+Q)/z + (1.5+K)*log(z) + (.5*K + (.75+.5*K)*log(2.)) + s ; }
z_type aune01(z_type z){ z_type s; int n; s=C[1]*z;
                return (-.5/z+Q)/z + (1.5+K)*log(z) + (.5*K + (.75+.5*K)*log(2.)) +s ; }

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

//FILE *o;o=fopen("aunemplo.eps","w");ado(o,4008,4008);
//FILE *o;o=fopen("20.eps","w");ado(o,4008,4008);
FILE *o;o=fopen("itnem20plo.eps","w");ado(o,4008,4008);
fprintf(o,"4 4 translate\n 1000 1000 scale 2 setlinecap\n");
for(m=0;m<41;m+=10){ M(.1*m,0)L(.1*m,4)}
for(n=0;n<41;n+=10){ M(0,.1*n)L(4,.1*n)}
fprintf(o,".003 W 0 0 0 RGB 2 setlinecap S\n");

// M(-1,ti)L(1,ti) M(-1,-ti)L(1,-ti) M(tr,-1)L(tr,1) fprintf(o,".002 W 0 0 0 RGB 2 setlinecap S\n");
//M(-1,0) L(0,0) M(tr,ti)L(0,0)L(tr,-ti)
//fprintf(o,".006 W 1 1 0 RGB 0 setlinecap S\n");

// Q=1.e-5; K=Q*Q; NemZo=nembra(Q); ANemZo=nem(NemZo); tr=Re(ANemZo); ti=Im(ANemZo); co(); coa(); AUNE1=Re(aune1(1.));
        Q=2.; K=Q*Q; NemZo=nembra(Q); ANemZo=nem(NemZo); tr=Re(ANemZo); ti=Im(ANemZo); co(); coa(); AUNE1=Re(aune1(1.));

fprintf(o,"1 setlinejoin 1 setlinecap S\n");

DO(m,201){x=.01+.02*m;y=Re(nem(nem(nem(nem(x)))));if(m==0) M(x,y) else L(x,y); printf("%9.2lf %9.2lf\n",x,y); if(y>4) break; }
DO(m,201){x=.01+.02*m;y=Re(nem(nem(nem(x)))); if(m==0) M(x,y) else L(x,y); printf("%9.2lf %9.2lf\n",x,y); if(y>4) break; }
DO(m,201){x=.01+.02*m;y=Re(nem(nem(x))); if(m==0) M(x,y) else L(x,y); printf("%9.2lf %9.2lf\n",x,y); if(y>4) break; }
DO(m,201){x=.01+.02*m;y=Re(nem(x)); if(m==0) M(x,y) else L(x,y); printf("%9.2lf %9.2lf\n",x,y); if(y>4) break; }
fprintf(o,".02 W 0 .7 1 RGB S\n");

DO(m,201){ x=.01+.02*m; y=Re(arqnem(arqnem(arqnem(arqnem(x)))));if(m==0) M(x,y) else L(x,y); printf("%9.2lf %9.2lf\n",x,y); if(y>4) break; }
DO(m,201){ x=.01+.02*m; y=Re(arqnem(arqnem(arqnem(x)))); if(m==0) M(x,y) else L(x,y); printf("%9.2lf %9.2lf\n",x,y); if(y>4) break; }
DO(m,201){ x=.01+.02*m; y=Re(arqnem(arqnem(x))); if(m==0) M(x,y) else L(x,y); printf("%9.2lf %9.2lf\n",x,y); if(y>4) break; }
DO(m,201){ x=.01+.02*m; y=Re(arqnem(x)); if(m==0) M(x,y) else L(x,y); printf("%9.2lf %9.2lf\n",x,y); if(y>4) break; }
fprintf(o,".02 W 1 .5 0 RGB S\n");

M(0,0)L(4.1,4.1)
fprintf(o,".02 W .1 1 .1 RGB S\n");
for(n=-20;n<21;n++){
DO(m,200){ x=.02+.02*m; y=Re(sunem(.1*n+aunem(x))); if(m==0) M(x,y) else L(x,y); /* printf("%9.2lf %9.2lf\n",x,y);*/ if(y>4) break; }
}

fprintf(o,".004 W 0 0 0 RGB S\n");

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

Latex generator of labels


\documentclass[12pt]{article}
 \usepackage{graphics}
 \paperwidth 4020pt
 \paperheight 4020pt
 \usepackage{geometry}
 \usepackage{rotating}
 \textwidth 4400pt
 \textheight 4400pt
 \topmargin -97pt
 \oddsidemargin -74pt
 \parindent 0pt
 \pagestyle{empty}
\newcommand \ing {\includegraphics}
\newcommand \sx {\scalebox}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\begin{document}
\begin{picture}(4008,4008)
%\put(20,3840){\sx{20}{$y\!=\!\mathrm{AuNem}_q(x)$}}
%\put(20,3840){\sx{20}{$y\!=\!\mathrm{nem}_2^n(x)$}}
\put(20,3900){\sx{20}{$y$}}
\put(20,2944){\sx{20}{$3$}}
\put(20,1940){\sx{20}{$2$}}
\put(20, 940){\sx{20}{$1$}}
%\put(10, 936){\sx{20}{$-1$}}
\put( 946,30){\sx{20}{$1$}}
\put(1950,30){\sx{20}{$2$}}
\put(2954,30){\sx{20}{$3$}}
\put(3870,30){\sx{20}{$x$}}
%
%\put(0,0){\ing{aunemplo}}
\put(0,0){\ing{itnem20plo}}
%
\put( 340,3450){\sx{16}{\rot{89} $n\!=\!4$\ero}}
\put( 482,3450){\sx{16}{\rot{88} $n\!=\!3$\ero}}
\put( 620,3450){\sx{16}{\rot{87} $n\!=\!2$\ero}}
\put(1010,3480){\sx{16}{\rot{84} $n\!=\!1$\ero}}
\put(1578,3420){\sx{16}{\rot{76} $n\!=\!0.5$\ero}}
\put(1786,3420){\sx{16}{\rot{73} $n\!=\!0.4$\ero}}
\put(2040,3420){\sx{16}{\rot{66} $n\!=\!0.3$\ero}}
\put(2390,3420){\sx{16}{\rot{62} $n\!=\!0.2$\ero}}
\put(2730,3250){\sx{16}{\rot{54} $n\!=\!0.1$\ero}}
\put(3100,3020){\sx{18}{\rot{45} $n\!=\!0$\ero}}
\put(3190,2560){\sx{16}{\rot{35} $n\!=\!-0.1$\ero}}
\put(3280,2200){\sx{16}{\rot{28} $n\!=\!-0.2$\ero}}
\put(3336,1906){\sx{16}{\rot{21} $n\!=\!-0.3$\ero}}
\put(3350,1650){\sx{16}{\rot{17} $n\!=\!-0.4$\ero}}
\put(3360,1460){\sx{16}{\rot{13} $n\!=\!-0.5$\ero}}
\put(3480,908){\sx{16}{\rot{4} $n\!=\!-1$\ero}}
\put(3480,518){\sx{16}{\rot{1} $n\!=\!-2$\ero}}
\put(3480,382){\sx{16}{\rot{0} $n\!=\!-3$\ero}}
\put(3480,238){\sx{16}{\rot{0} $n\!=\!-4$\ero}}
%
\put( 840,2020){\sx{16}{\rot{83} $y\!=\!\mathrm{Nem}_2(x)$\ero}}
\put(1570,1500){\sx{16}{\rot{45} $y\!=\!x$\ero}}
\put(1800,720){\sx{16}{\rot{7} $y\!=\!\mathrm{ArqNem}_2(x)$\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:12, 1 December 2018Thumbnail for version as of 06:12, 1 December 20185,562 × 5,562 (1.3 MB)Maintenance script (talk | contribs)Importing image file
  • You cannot overwrite this file.

The following page links to this file:

Metadata