Difference between revisions of "File:Moriamap1.jpg"
(Importing image file) |
|||
Line 1: | Line 1: | ||
+ | [[Complex map]] of function [[mori]], prepared for comparison with the imilar map of its asymptotic approximation [[morias]]. |
||
− | Importing image file |
||
+ | |||
+ | ==[[C++]] generator of map== |
||
+ | |||
+ | // FIles [[ado.cin]], [[conto.cin]], [[besselj0.cin]] should be loaded in order to compile the code below. |
||
+ | //<poem><nomathjax><nowiki> |
||
+ | #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" |
||
+ | //#include "korias.cin" |
||
+ | #include "besselj0.cin" |
||
+ | //#include "korifit76.cin" |
||
+ | //#include "morias.cin" |
||
+ | |||
+ | DB L1=2.404825557695772768621631879326454643124; |
||
+ | int main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d; |
||
+ | int M=301,M1=M+1; |
||
+ | int N=176,N1=N+1; |
||
+ | 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("moriama.eps","w");ado(o,1220,720); |
||
+ | fprintf(o,"210 210 translate\n 100 100 scale\n"); |
||
+ | DO(m,M1)X[m]=-2.+.04*(m-.5); |
||
+ | DO(n,N1)Y[n]=-2.+.04*(n-.5);; |
||
+ | |||
+ | for(m=-2;m<11;m+=1){M(m,-2)L(m,5)} |
||
+ | for(n=-2;n<6;n+=1){ M(-2,n)L(10,n)} |
||
+ | fprintf(o,".01 W 0 0 0 RGB S\n"); |
||
+ | |||
+ | //DB po=.05; |
||
+ | DB po=.1; |
||
+ | //DB xo=4*L1/po; |
||
+ | //M(xo,po); DO(m,100){ x=xo+1.+m; y=x/xo-1.; L(x,y); if(y>100) break;} |
||
+ | //fprintf(o,".1 W 1 0 0 RGB S\n"); |
||
+ | |||
+ | // DB x0=L1/po; M(0,0)L(x0,0)L(40.,40.-x0); fprintf(o,".2 W 0 1 0 RGB S\n"); |
||
+ | |||
+ | DO(m,M1)DO(n,N1){g[m*N1+n]=99999999; f[m*N1+n]=999999999;} |
||
+ | DO(m,M1){x=X[m]; //printf("%5.2f\n",x); |
||
+ | DO(n,N1){y=Y[n]; z=z_type(x,y); |
||
+ | // c=BesselJ0(L1*sqrt(z))/(1.-z); |
||
+ | c=BesselJ0(L1*z)/(1.-z*z); |
||
+ | // c=korifit76(z); |
||
+ | // c=korias(z); |
||
+ | // c*=c*exp(po*I*z); |
||
+ | // c=log(c); |
||
+ | //c=exp(I*(-2.*L1+po*z)*z)/z ; |
||
+ | //c=(I*(-2.*L1+po*z)*z) ; |
||
+ | //c=(-2.*L1+po*z)*z ; |
||
+ | //c=morias(z); // c*=c*exp(I*po*z*z)*z; |
||
+ | p=Re(c); q=Im(c); |
||
+ | if(p>-999999. && p<999999. && q>-999999. && q<999999 ){g[m*N1+n]=p; f[m*N1+n]=q; |
||
+ | } |
||
+ | }} |
||
+ | //#include "plodi.cin" |
||
+ | /* |
||
+ | fprintf(o,"1 setlinejoin 1 setlinecap\n"); q=.05; |
||
+ | for(n=1;n<10;n+=1)conto(o,f,w,v,X,Y,M,N,( .01*n),-q, q); fprintf(o,".002 W 0 .7 0 RGB S\n"); |
||
+ | for(n=1;n<10;n+=1)conto(o,f,w,v,X,Y,M,N,(-.01*n),-q, q); fprintf(o,".002 W 0 .7 0 RGB S\n"); |
||
+ | for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N,( .01*n),-q, q); fprintf(o,".002 W 0 0 .8 RGB S\n"); |
||
+ | for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N,(-.01*n),-q, q); fprintf(o,".002 W .8 0 0 RGB S\n"); |
||
+ | */ |
||
+ | |||
+ | p=16;q=1; |
||
+ | for(m=-4;m<4;m++)for(n=1;n<10;n+=1)conto(o,f,w,v,X,Y,M,N,(m+.1*n),-q, q); fprintf(o,".004 W 0 .8 0 RGB S\n"); |
||
+ | for(m=0;m<4;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N,-(m+.1*n),-q, q); fprintf(o,".004 W 1 0 0 RGB S\n"); |
||
+ | for(m=0;m<4;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N, (m+.1*n),-q, q); fprintf(o,".004 W 0 0 1 RGB S\n"); |
||
+ | for(m=1;m<9;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p); fprintf(o,".03 W 1 0 0 RGB S\n"); |
||
+ | for(m=1;m<9;m++) conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".03 W 0 0 1 RGB S\n"); |
||
+ | conto(o,f,w,v,X,Y,M,N, (0. ),-4*p,4*p); fprintf(o,".03 W .9 0 .9 RGB S\n"); |
||
+ | for(m=-8;m<0;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".02 W 0 0 0 RGB S\n"); |
||
+ | m=0; conto(o,g,w,v,X,Y,M,N, (0.+m),-4*p,4*p); fprintf(o,".02 W 0 0 0 RGB S\n"); |
||
+ | for(m=1;m<9;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".02 W 0 0 0 RGB S\n"); |
||
+ | //#include "plofu.cin" |
||
+ | fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); |
||
+ | system("epstopdf moriama.eps"); |
||
+ | system( "open moriama.pdf"); |
||
+ | getchar(); system("killall Preview");//for mac |
||
+ | } |
||
+ | //</nowiki></nomathjax></poem> |
||
+ | |||
+ | ==[[Latex]] generator labels== |
||
+ | %<poem><nomathjax><nowiki> |
||
+ | \documentclass[12pt]{article} |
||
+ | \usepackage{graphicx} |
||
+ | \usepackage{geometry} |
||
+ | \usepackage{rotating} |
||
+ | \paperwidth 1034px |
||
+ | \paperheight 630px |
||
+ | \textwidth 2000pt |
||
+ | \textheight 900pt |
||
+ | \newcommand \sx \scalebox |
||
+ | \newcommand \ing \includegraphics |
||
+ | \newcommand \rot {\begin{rotate}} |
||
+ | \newcommand \ero {\end{rotate}} |
||
+ | \oddsidemargin -70pt |
||
+ | \topmargin -100pt |
||
+ | \parindent 0pt |
||
+ | \begin{document} |
||
+ | \begin{picture}(1020,616) |
||
+ | \put(20,10){\ing{moriama1}} |
||
+ | %\put(20,10){\ing{moriasma}} |
||
+ | \put( 8,610){\sx{2.8}{$y$}} |
||
+ | %\put( 8,610){\sx{2.8}{$4$}} |
||
+ | \put( 8,510){\sx{2.8}{$3$}} |
||
+ | \put( 8,410){\sx{2.6}{$2$}} |
||
+ | \put( 8,310){\sx{2.8}{$1$}} |
||
+ | \put( 8,210){\sx{2.8}{$0$}} |
||
+ | \put(-11,110){\sx{2.8}{$-1$}} |
||
+ | \put(0,-6){\sx{2.8}{$-2$}} |
||
+ | \put(100,-6){\sx{2.8}{$-1$}} |
||
+ | \put(223,-6){\sx{2.8}{$0$}} |
||
+ | \put(323,-6){\sx{2.8}{$1$}} |
||
+ | \put(424,-6){\sx{2.8}{$2$}} |
||
+ | \put(524,-6){\sx{2.8}{$3$}} |
||
+ | \put(625,-6){\sx{2.8}{$4$}} |
||
+ | \put(725,-6){\sx{2.8}{$5$}} |
||
+ | \put(825,-6){\sx{2.8}{$6$}} |
||
+ | \put(926,-6){\sx{2.8}{$7$}} |
||
+ | %\put(1027,-6){\sx{2.8}{$8$}} |
||
+ | %\put(1127,-6){\sx{2.8}{$9$}} |
||
+ | \put(1020,-6){\sx{2.8}{$x$}} |
||
+ | % |
||
+ | \put(116,534){\rot{76}\sx{2.5}{$u\!=\!-8$}\ero} |
||
+ | \put(170,544){\rot{90}\sx{2.5}{$u\!=\!8$}\ero} |
||
+ | % |
||
+ | \put(212,542){\rot{80}\sx{2.5}{$v\!=\!8$}\ero} |
||
+ | \put(262,538){\rot{92}\sx{2.5}{$v\!=\!-8$}\ero} |
||
+ | % |
||
+ | \put(250,230){\rot{47}\sx{2.5}{$u\!=\!1$}\ero} |
||
+ | % |
||
+ | \put(400,134){\rot{62}\sx{2.5}{$u\!=\!0.1$}\ero} |
||
+ | \put(402,114){\rot{27}\sx{2.5}{$u\!=\!-0.1$}\ero} |
||
+ | % |
||
+ | \put(480,431){\rot{0}\sx{2.6}{$v\!=\!2$}\ero} |
||
+ | \put(490,400){\rot{0}\sx{2.6}{$v\!=\!1$}\ero} |
||
+ | \put(498,329){\rot{0}\sx{2.6}{$v\!=\!0.2$}\ero} |
||
+ | \put(514,296){\rot{0}\sx{2.6}{$v\!=\!0.1$}\ero} |
||
+ | % |
||
+ | \put(564,419){\rot{0}\sx{2.6}{$u\!=\!1$}\ero} |
||
+ | % |
||
+ | \put(468,186){\rot{90}\sx{2.7}{$u\!=\!0$}\ero} |
||
+ | \put(518,213){\rot{0}\sx{2.6}{$v\!=\!0$}\ero} |
||
+ | \put(518,186){\rot{90}\sx{2.7}{$v\!=\!0$}\ero} |
||
+ | \put(600,186){\rot{90}\sx{2.7}{$u\!=\!0$}\ero} |
||
+ | \put(656,186){\rot{90}\sx{2.7}{$v\!=\!0$}\ero} |
||
+ | \put(730,186){\rot{90}\sx{2.7}{$u\!=\!0$}\ero} |
||
+ | \put(790,186){\rot{90}\sx{2.7}{$v\!=\!0$}\ero} |
||
+ | \put(862,186){\rot{90}\sx{2.7}{$u\!=\!0$}\ero} |
||
+ | \put(922,186){\rot{90}\sx{2.7}{$v\!=\!0$}\ero} |
||
+ | \put(992,186){\rot{90}\sx{2.7}{$u\!=\!0$}\ero} |
||
+ | %\put(1054,186){\rot{90}\sx{2.7}{$v\!=\!0$}\ero} |
||
+ | %\put(1124,186){\rot{90}\sx{2.7}{$u\!=\!0$}\ero} |
||
+ | %\put(1186,186){\rot{90}\sx{2.7}{$v\!=\!0$}\ero} |
||
+ | \end{picture} |
||
+ | \end{document} |
||
+ | %</nowiki></nomathjax></poem> |
||
+ | |||
+ | ==References== |
||
+ | <references/> |
||
+ | |||
+ | [[Category:Bessel function]] |
||
+ | [[Category:C++]] |
||
+ | [[Category:Complex map]] |
||
+ | [[Category:Latex]] |
||
+ | [[Category:Mori]] |
||
+ | [[Category:Morinaga function]] |
Latest revision as of 08:43, 1 December 2018
Complex map of function mori, prepared for comparison with the imilar map of its asymptotic approximation morias.
C++ generator of map
// FIles ado.cin, conto.cin, besselj0.cin should be loaded in order to compile the code below.
//
#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"
//#include "korias.cin"
#include "besselj0.cin"
//#include "korifit76.cin"
//#include "morias.cin"
DB L1=2.404825557695772768621631879326454643124;
int main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
int M=301,M1=M+1;
int N=176,N1=N+1;
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("moriama.eps","w");ado(o,1220,720);
fprintf(o,"210 210 translate\n 100 100 scale\n");
DO(m,M1)X[m]=-2.+.04*(m-.5);
DO(n,N1)Y[n]=-2.+.04*(n-.5);;
for(m=-2;m<11;m+=1){M(m,-2)L(m,5)}
for(n=-2;n<6;n+=1){ M(-2,n)L(10,n)}
fprintf(o,".01 W 0 0 0 RGB S\n");
//DB po=.05;
DB po=.1;
//DB xo=4*L1/po;
//M(xo,po); DO(m,100){ x=xo+1.+m; y=x/xo-1.; L(x,y); if(y>100) break;}
//fprintf(o,".1 W 1 0 0 RGB S\n");
// DB x0=L1/po; M(0,0)L(x0,0)L(40.,40.-x0); fprintf(o,".2 W 0 1 0 RGB S\n");
DO(m,M1)DO(n,N1){g[m*N1+n]=99999999; f[m*N1+n]=999999999;}
DO(m,M1){x=X[m]; //printf("%5.2f\n",x);
DO(n,N1){y=Y[n]; z=z_type(x,y);
// c=BesselJ0(L1*sqrt(z))/(1.-z);
c=BesselJ0(L1*z)/(1.-z*z);
// c=korifit76(z);
// c=korias(z);
// c*=c*exp(po*I*z);
// c=log(c);
//c=exp(I*(-2.*L1+po*z)*z)/z ;
//c=(I*(-2.*L1+po*z)*z) ;
//c=(-2.*L1+po*z)*z ;
//c=morias(z); // c*=c*exp(I*po*z*z)*z;
p=Re(c); q=Im(c);
if(p>-999999. && p<999999. && q>-999999. && q<999999 ){g[m*N1+n]=p; f[m*N1+n]=q;
}
}}
//#include "plodi.cin"
/*
fprintf(o,"1 setlinejoin 1 setlinecap\n"); q=.05;
for(n=1;n<10;n+=1)conto(o,f,w,v,X,Y,M,N,( .01*n),-q, q); fprintf(o,".002 W 0 .7 0 RGB S\n");
for(n=1;n<10;n+=1)conto(o,f,w,v,X,Y,M,N,(-.01*n),-q, q); fprintf(o,".002 W 0 .7 0 RGB S\n");
for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N,( .01*n),-q, q); fprintf(o,".002 W 0 0 .8 RGB S\n");
for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N,(-.01*n),-q, q); fprintf(o,".002 W .8 0 0 RGB S\n");
*/
p=16;q=1;
for(m=-4;m<4;m++)for(n=1;n<10;n+=1)conto(o,f,w,v,X,Y,M,N,(m+.1*n),-q, q); fprintf(o,".004 W 0 .8 0 RGB S\n");
for(m=0;m<4;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N,-(m+.1*n),-q, q); fprintf(o,".004 W 1 0 0 RGB S\n");
for(m=0;m<4;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N, (m+.1*n),-q, q); fprintf(o,".004 W 0 0 1 RGB S\n");
for(m=1;m<9;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p); fprintf(o,".03 W 1 0 0 RGB S\n");
for(m=1;m<9;m++) conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".03 W 0 0 1 RGB S\n");
conto(o,f,w,v,X,Y,M,N, (0. ),-4*p,4*p); fprintf(o,".03 W .9 0 .9 RGB S\n");
for(m=-8;m<0;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
m=0; conto(o,g,w,v,X,Y,M,N, (0.+m),-4*p,4*p); fprintf(o,".02 W 0 0 0 RGB S\n");
for(m=1;m<9;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
//#include "plofu.cin"
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
system("epstopdf moriama.eps");
system( "open moriama.pdf");
getchar(); system("killall Preview");//for mac
}
//
Latex generator labels
%
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{geometry}
\usepackage{rotating}
\paperwidth 1034px
\paperheight 630px
\textwidth 2000pt
\textheight 900pt
\newcommand \sx \scalebox
\newcommand \ing \includegraphics
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\oddsidemargin -70pt
\topmargin -100pt
\parindent 0pt
\begin{document}
\begin{picture}(1020,616)
\put(20,10){\ing{moriama1}}
%\put(20,10){\ing{moriasma}}
\put( 8,610){\sx{2.8}{$y$}}
%\put( 8,610){\sx{2.8}{$4$}}
\put( 8,510){\sx{2.8}{$3$}}
\put( 8,410){\sx{2.6}{$2$}}
\put( 8,310){\sx{2.8}{$1$}}
\put( 8,210){\sx{2.8}{$0$}}
\put(-11,110){\sx{2.8}{$-1$}}
\put(0,-6){\sx{2.8}{$-2$}}
\put(100,-6){\sx{2.8}{$-1$}}
\put(223,-6){\sx{2.8}{$0$}}
\put(323,-6){\sx{2.8}{$1$}}
\put(424,-6){\sx{2.8}{$2$}}
\put(524,-6){\sx{2.8}{$3$}}
\put(625,-6){\sx{2.8}{$4$}}
\put(725,-6){\sx{2.8}{$5$}}
\put(825,-6){\sx{2.8}{$6$}}
\put(926,-6){\sx{2.8}{$7$}}
%\put(1027,-6){\sx{2.8}{$8$}}
%\put(1127,-6){\sx{2.8}{$9$}}
\put(1020,-6){\sx{2.8}{$x$}}
%
\put(116,534){\rot{76}\sx{2.5}{$u\!=\!-8$}\ero}
\put(170,544){\rot{90}\sx{2.5}{$u\!=\!8$}\ero}
%
\put(212,542){\rot{80}\sx{2.5}{$v\!=\!8$}\ero}
\put(262,538){\rot{92}\sx{2.5}{$v\!=\!-8$}\ero}
%
\put(250,230){\rot{47}\sx{2.5}{$u\!=\!1$}\ero}
%
\put(400,134){\rot{62}\sx{2.5}{$u\!=\!0.1$}\ero}
\put(402,114){\rot{27}\sx{2.5}{$u\!=\!-0.1$}\ero}
%
\put(480,431){\rot{0}\sx{2.6}{$v\!=\!2$}\ero}
\put(490,400){\rot{0}\sx{2.6}{$v\!=\!1$}\ero}
\put(498,329){\rot{0}\sx{2.6}{$v\!=\!0.2$}\ero}
\put(514,296){\rot{0}\sx{2.6}{$v\!=\!0.1$}\ero}
%
\put(564,419){\rot{0}\sx{2.6}{$u\!=\!1$}\ero}
%
\put(468,186){\rot{90}\sx{2.7}{$u\!=\!0$}\ero}
\put(518,213){\rot{0}\sx{2.6}{$v\!=\!0$}\ero}
\put(518,186){\rot{90}\sx{2.7}{$v\!=\!0$}\ero}
\put(600,186){\rot{90}\sx{2.7}{$u\!=\!0$}\ero}
\put(656,186){\rot{90}\sx{2.7}{$v\!=\!0$}\ero}
\put(730,186){\rot{90}\sx{2.7}{$u\!=\!0$}\ero}
\put(790,186){\rot{90}\sx{2.7}{$v\!=\!0$}\ero}
\put(862,186){\rot{90}\sx{2.7}{$u\!=\!0$}\ero}
\put(922,186){\rot{90}\sx{2.7}{$v\!=\!0$}\ero}
\put(992,186){\rot{90}\sx{2.7}{$u\!=\!0$}\ero}
%\put(1054,186){\rot{90}\sx{2.7}{$v\!=\!0$}\ero}
%\put(1124,186){\rot{90}\sx{2.7}{$u\!=\!0$}\ero}
%\put(1186,186){\rot{90}\sx{2.7}{$v\!=\!0$}\ero}
\end{picture}
\end{document}
%
References
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 06:13, 1 December 2018 | 2,154 × 1,312 (1.44 MB) | Maintenance script (talk | contribs) | Importing image file |
You cannot overwrite this file.
File usage
The following page uses this file: