File:Nem120map.jpg

From TORI
Jump to navigation Jump to search

Original file(1,784 × 1,768 pixels, file size: 478 KB, MIME type: image/jpeg)

Complex map of the Nemtsov function, $q\!=\!2$:

$u\!+\!\mathrm i v=\mathrm{Nem}_2(x\!+\!\mathrm i y)$

where

$\mathrm{nem}_2(z)=z+z^3+2z^4$

C++ generator of map


#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=1.e-6;
DB P=1 ; DB Q=2.;
nemsingu(P,Q);
nemtsovapq(P,Q); //Calculation of A; storing of valies of NEMTSOVp and NEMTSO$
aunemdpq(P,Q);
printf("NEMTSOVp, NEMTSOVq= %9.6lf %9.6lf\n", NEMTSOVp, NEMTSOVp);
printf("Xunity= %19.16lf\n", Xunity);

c=aun(1.); printf("aun(1) =%20.15lf %20.16lf\n", Re(c),Im(c));
c=sunem(0.); printf("sunem(0)=%20.15lf %20.16lf\n", Re(c),Im(c));
//getchar();

tr=NEMTSOVr;
ti=NEMTSOVi;
DO(n,18) printf("%9.5lf\n", DPQ[n]);

 int M=1001,M1=M+1;
 int N=1001,N1=N+1;
DB X[M1],Y[N1]; DB *g, *f, *w; // w is working array.
g=(DB *)malloc((size_t)((M1*N1)*sizeof(DB)));
f=(DB *)malloc((size_t)((M1*N1)*sizeof(DB)));
w=(DB *)malloc((size_t)((M1*N1)*sizeof(DB)));
char v[M1*N1]; // v is working array
//DB X[M1],Y[N1], g[M1*N1],f[M1*N1], w[M1*N1]; // w is working array.
//char v[M1*N1]; // v is working array
FILE *o;o=fopen("nem120ma.eps","w");ado(o,402,402);
fprintf(o,"201 201 translate\n 100 100 scale 2 setlinecap\n");
DO(m,M1) X[m]=-2.+.004*(m-.5);
DO(n,N1) Y[n]=-2.+.004*(n-.5);
for(m=-2;m<3;m++){ if(m==0){ M(m,-2.1)L(m,2.1)} else
                                { M(m,-2)L(m,2) }}
for(n=-2;n<3;n++){ M(-2,n)L(2,n)}
fprintf(o,".006 W 0 0 0 RGB 2 setlinecap S\n");

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

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

DO(m,M1)DO(n,N1){g[m*N1+n]=9999999; f[m*N1+n]=9999999;}
DO(m,M1){x=X[m]; if(m/10*10==m) printf("run at x=%6.3f\n",x);
DO(n,N1){y=Y[n]; z=z_type(x,y);

//c=sunem(z);
//c=aun(z);
//c=arqnem(z);
c=nem(z);

//p=abs(c-z)/abs(c+z); p=-log(p)/log(10.);
        p=Re(c); q=Im(c);
//if(p>-85 && p<85) g[m*N1+n]=p;
        if(p>-1001 && p<1001 &&
        q >-1001 && q<1001 ) { g[m*N1+n]=p; f[m*N1+n]=q; }
        }}

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

fprintf(o,"1 setlinejoin 1 setlinecap\n");
p=20.;q=.5;
//#include"plofu.cin"
//p=2;q=1;

for(m=-5;m<5;m++)for(n=1;n<10;n+=1)conto(o,f,w,v,X,Y,M,N, (m+.1*n),-q,q);
                                                fprintf(o,".0016 W 0 .6 0 RGB S\n");
for(m=0;m<5;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N,-(m+.1*n),-q,q);
                                                fprintf(o,".0016 W .9 0 0 RGB S\n");
for(m=0;m<5;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N, (m+.1*n),-q,q);
                                                fprintf(o,".0016 W 0 0 .9 RGB S\n");

for(m= 1;m<11;m++) conto(o,f,w,v,X,Y,M,N,(0.-m),-p,p);fprintf(o,".004 W .8 0 0 RGB S\n");
for(m= 1;m<11;m++) conto(o,f,w,v,X,Y,M,N,(0.+m),-p,p);fprintf(o,".004 W 0 0 .8 RGB S\n");
                   conto(o,f,w,v,X,Y,M,N,(0. ),-p,p);fprintf(o,".004 W .5 0 .5 RGB S\n");
for(m=-10;m<11;m++)conto(o,g,w,v,X,Y,M,N,(0.+m),-p,p);fprintf(o,".004 W 0 0 0 RGB S\n");

/*
// conto(o,g,w,v,X,Y,M,N,15.5,-p,p);fprintf(o,".02 W .3 0 .3 RGB S\n");
conto(o,g,w,v,X,Y,M,N,15.,-p,p);fprintf(o,".004 W 0 0 1 RGB S\n");
conto(o,g,w,v,X,Y,M,N,14.,-p,p);fprintf(o,".002 W 0 1 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,13.,-p,p);fprintf(o,".002 W 1 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,12.,-p,p);fprintf(o,".004 W 0 0 .7 RGB S\n");
conto(o,g,w,v,X,Y,M,N,11.,-p,p);fprintf(o,".002 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,10.,-p,p);fprintf(o,".002 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,9.,-p,p);fprintf(o,".004 W 0 .6 .8 RGB S\n");
conto(o,g,w,v,X,Y,M,N,8.,-p,p);fprintf(o,".002 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,7.,-p,p);fprintf(o,".002 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,6.,-p,p);fprintf(o,".004 W 0 .6 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,5.,-p,p);fprintf(o,".002 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,4.,-p,p);fprintf(o,".002 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,3.,-p,p);fprintf(o,".004 W 1 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,2.,-p,p);fprintf(o,".002 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,1.,-p,p);fprintf(o,".005 W .5 0 0 RGB S\n");
*/

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

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

//getchar(); system("killall Preview");// mac
return 0;
}

Latex generator of map


\documentclass[12pt]{article}
 \usepackage{graphics}
 \paperwidth 430pt
 \paperheight 426pt
 \usepackage{geometry}
 \usepackage{rotating}
 \textwidth 1260pt
 \textheight 1260pt
 \topmargin -108pt
 \oddsidemargin -72pt
 \parindent 0pt
 \pagestyle{empty}
\newcommand \ing {\includegraphics}
\newcommand \sx {\scalebox}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\begin{document}
\begin{picture}(424,424)
%\put(50,40){\ing{sunem10q10ma6s}}
\put(24,20){\ing{nem120ma}}
\put(11,415){\sx{1.8}{$y$}}
\put(10,314){\sx{1.8}{$1$}}
\put(10,214){\sx{1.8}{$0$}}
\put(-5,114){\sx{1.8}{$-1$}}
\put(-5, 14){\sx{1.8}{$-2$}}
\put( 5, 1){\sx{1.8}{$-2$}}
\put(105, 1){\sx{1.8}{$-1$}}
\put(221, 1){\sx{1.8}{$0$}}
\put(321, 1){\sx{1.8}{$1$}}
\put(418,1){\sx{1.8}{$x$}}
%
\put(46,398){\sx{1.8}{\rot{-35} $v\!=\!10$\ero}}
\put(24,380){\sx{1.8}{\rot{-61} $v\!=\!-10$\ero}}
%
\put(334,370){\sx{1.8}{\rot{35} $v\!=\!-10$\ero}}
\put(366,338){\sx{1.8}{\rot{48} $v\!=\!10$\ero}}
%
\put(261,310){\sx{1.8}{\rot{70} $u\!=\!0$\ero}}
\put(240,283){\sx{1.8}{\rot{11} $v\!=\!0$\ero}}
%
\put(164,200){\sx{1.8}{\rot{89} $v\!=\!0$\ero}}
\put(231,200){\sx{1.8}{\rot{89} $u\!=\!0$\ero}}
\put(291,200){\sx{1.8}{\rot{89} $u\!=\!1$\ero}}%
\put(313,200){\sx{1.8}{\rot{89} $u\!=\!2$\ero}}
\put(340,200){\sx{1.8}{\rot{89} $u\!=\!5$\ero}}
%\put(231, 50){\sx{1.8}{\rot{89} $u\!=\!0$\ero}}
%\put(100,125){\sx{1.8}{\rot{18} $u\!=\!0$\ero}}
%
\put(356,314){\sx{1.8}{\rot{7} $u\!=\!-10$\ero}}
\put(362,234){\sx{1.8}{\rot{-14} $v\!=\!5$\ero}}
\put(368,199){\sx{1.8}{\rot{11} $v\!=\!-5$\ero}}
\put(376,254){\sx{1.8}{\rot{34} $u\!=\!10$\ero}}
\put(376,174){\sx{1.8}{\rot{-34} $u\!=\!10$\ero}}
\put(256,174){\sx{1.8}{\rot{-4} $u\!=\!0$\ero}}
\put(168,216){\sx{1.8}{\rot{0} $v\!=\!0$\ero}}
%
\put(34,60){\sx{1.8}{\rot{55} $v\!=\!10$\ero}}
\put(52,38){\sx{1.8}{\rot{32} $v\!=\!-10$\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 2018Thumbnail for version as of 06:13, 1 December 20181,784 × 1,768 (478 KB)Maintenance script (talk | contribs)Importing image file

The following page uses this file:

Metadata