Difference between revisions of "File:Norimap40.jpg"
(Importing image file) |
|||
Line 1: | Line 1: | ||
+ | [[complex map]] of function [[nori]], |
||
− | Importing image file |
||
+ | in some range of the complex plane, |
||
+ | |||
+ | $\mathrm{nori}(z)=\,$[[mori]]$\big(\sqrt{z}\big)^2$ |
||
+ | |||
+ | $u\!+\!\mathrm i v=\mathrm{nori}(x\!+\!\mathrm i y)$ |
||
+ | |||
+ | ==[[C++]] generator of curves== |
||
+ | 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++) |
||
+ | //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 "besselj0.cin" |
||
+ | |||
+ | DB L1= 2.404825557695773; |
||
+ | DB L2= 5.5200781102863115; |
||
+ | DB L3= 8.653727912911013; |
||
+ | DB L4=11.791534439014281; |
||
+ | z_type morin(z_type x){ return BesselJ0(L1*x)/(1.-x*x);} // naive representation fails at x=1. |
||
+ | |||
+ | z_type mori0(z_type x){ int n,m; z_type s, xx=x*x; |
||
+ | DB c[16]={ 1., -0.4457964907366961303, 0.07678538241994023453, -0.0071642885058902232688, |
||
+ | 0.00042159522055140947688, -0.000017110542281627483109, 5.0832583976057607495e-7, -1.1537378620148452816e-8, |
||
+ | 2.0662789231930073316e-10, -2.9948657413756059965e-12, 3.5852738451127332173e-14,-3.6050239634659700777e-16, |
||
+ | 3.0877184831292878827e-18, -2.2798156440952688462e-20, 1.4660907878585489441e-22,-8.2852774398657968065e-25}; |
||
+ | // 16th term seems to fail; perhaps, due to the C++ rounding errors. |
||
+ | //with m=15, at |x|<2, the relative error is of order of 10^(-16) |
||
+ | //In this sense, the result is accurate while |x|<2. |
||
+ | m=15; s=c[m]*xx; for(n=m-1;n>0;n--){ s+=c[n]; s*=xx;} |
||
+ | return 1.+s;} |
||
+ | z_type mori(z_type x){if(abs(x)<2.) return mori0(x); |
||
+ | return morin(x);} |
||
+ | |||
+ | z_type no1(z_type x){ return BesselJ0(L1*sqrt(x))/(1.-x);} // naive representation fails at x=1. |
||
+ | |||
+ | z_type no0(z_type x){ int n,m; z_type s; //, xx=x*x; |
||
+ | DB c[16]={ 1., -0.4457964907366961303, 0.07678538241994023453, -0.0071642885058902232688, |
||
+ | 0.00042159522055140947688, -0.000017110542281627483109, 5.0832583976057607495e-7, -1.1537378620148452816e-8, |
||
+ | 2.0662789231930073316e-10, -2.9948657413756059965e-12, 3.5852738451127332173e-14,-3.6050239634659700777e-16, |
||
+ | 3.0877184831292878827e-18, -2.2798156440952688462e-20, 1.4660907878585489441e-22,-8.2852774398657968065e-25}; |
||
+ | // 16th term seems to fail; perhaps, due to the C++ rounding errors. |
||
+ | //with m=15, at |x|<2, the relative error is of order of 10^(-16) |
||
+ | //In this sense, the result is accurate while |x|<2. |
||
+ | m=15; s=c[m]*x; for(n=m-1;n>0;n--){ s+=c[n]; s*=x;} |
||
+ | return 1.+s;} |
||
+ | |||
+ | z_type no(z_type x){if(abs(x)<3.) return no0(x); |
||
+ | return no1(x);} |
||
+ | |||
+ | |||
+ | int main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d; |
||
+ | int M=501,M1=M+1; |
||
+ | int N=501,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("06.eps","w");ado(o,5020,5020); |
||
+ | FILE *o;o=fopen("norima.eps","w");ado(o,5020,5020); |
||
+ | fprintf(o,"1010 1010 translate\n 100 100 scale\n"); |
||
+ | DO(m,M1)X[m]=-10.+.1*(m-.5); |
||
+ | DO(n,N1)Y[n]=-10.+.1*(n-.5); |
||
+ | |||
+ | for(m=-10;m<11;m++){if(m==0){M(m,-10.1)L(m,10.1)} else{M(m,-10)L(m,10)}} |
||
+ | for(n=-10;n<11;n++){ M( -10,n)L(10,n)} |
||
+ | fprintf(o,".01 W 0 0 0 RGB S\n"); |
||
+ | DO(m,M1)DO(n,N1){g[m*N1+n]=99999; f[m*N1+n]=99999;} |
||
+ | DO(m,M1){x=X[m]; //printf("%5.2f\n",x); |
||
+ | DO(n,N1){y=Y[n]; z=z_type(x,y); |
||
+ | // c=BesselJ0(z); |
||
+ | // c=mori(z); |
||
+ | c=no(z); c*=c; |
||
+ | p=Re(c); q=Im(c); |
||
+ | if(p>-999. && p<999. && q>-999. && q<999 |
||
+ | ) |
||
+ | {g[m*N1+n]=p; |
||
+ | f[m*N1+n]=q; |
||
+ | } |
||
+ | }} |
||
+ | //#include "plodi.cin" |
||
+ | fprintf(o,"1 setlinejoin 1 setlinecap\n"); p=40;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,".01 W 0 .6 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,".01 W .9 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,".01 W 0 0 .9 RGB S\n"); |
||
+ | for(m=1;m<9;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p); fprintf(o,".04 W .9 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,".04 W 0 0 .9 RGB S\n"); |
||
+ | conto(o,f,w,v,X,Y,M,N, (0. ),-2*p,2*p); fprintf(o,".04 W .6 0 .6 RGB S\n"); |
||
+ | for(m=-8;m<0;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".04 W 0 0 0 RGB S\n"); |
||
+ | m=0; conto(o,g,w,v,X,Y,M,N, (0.+m),-2*p,2*p); fprintf(o,".04 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,".04 W 0 0 0 RGB S\n"); |
||
+ | //#include "plofu.cin" |
||
+ | fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); |
||
+ | system("epstopdf norima.eps"); |
||
+ | system( "open norima.pdf"); |
||
+ | } |
||
+ | |||
+ | </nowiki></nomathjax></poem> |
||
+ | |||
+ | ==[[Latex]] generator of labels== |
||
+ | |||
+ | <poem><nomathjax><nowiki> |
||
+ | \documentclass[12pt]{article} |
||
+ | \paperheight 5120px |
||
+ | \paperwidth 5100px |
||
+ | \textwidth 5094px |
||
+ | \textheight 5200px |
||
+ | \topmargin -80px |
||
+ | \oddsidemargin -72px |
||
+ | \usepackage{graphics} |
||
+ | \usepackage{rotating} |
||
+ | %\usepackage{color} |
||
+ | \newcommand \sx {\scalebox} |
||
+ | \newcommand \rot {\begin{rotate}} |
||
+ | \newcommand \ero {\end{rotate}} |
||
+ | \newcommand \ing {\includegraphics} |
||
+ | \newcommand \rmi {\mathrm{i}} |
||
+ | \begin{document}\parindent 0pt |
||
+ | \begin{picture}(5100,5100) |
||
+ | \put(80,80){\ing{norima}} |
||
+ | %\put(0,0){\sx{8}{-10}} |
||
+ | \put(32,2068){\sx{8}{$y$}} |
||
+ | \put(32,1868){\sx{8}{$8$}} |
||
+ | \put(32,1668){\sx{8}{$6$}} |
||
+ | \put(32,1468){\sx{8}{$4$}} |
||
+ | \put(32,1268){\sx{8}{$2$}} |
||
+ | \put(32,1068){\sx{8}{$0$}} |
||
+ | \put(-32,868){\sx{8}{$-2$}} |
||
+ | \put(-32,668){\sx{8}{$-4$}} |
||
+ | \put(-32,468){\sx{8}{$-6$}} |
||
+ | \put(-32,268){\sx{8}{$-8$}} |
||
+ | \put(230,8){\sx{8}{$-8$}} |
||
+ | \put(430,8){\sx{8}{$-6$}} |
||
+ | \put(630,8){\sx{8}{$-4$}} |
||
+ | \put(830,8){\sx{8}{$-2$}} |
||
+ | \put(1070,8){\sx{8}{$0$}} |
||
+ | \put(1270,8){\sx{8}{$2$}} |
||
+ | \put(1470,8){\sx{8}{$4$}} |
||
+ | \put(1670,8){\sx{8}{$6$}} |
||
+ | \put(1870,8){\sx{8}{$8$}} |
||
+ | \put(2070,8){\sx{8}{$x$}} |
||
+ | % |
||
+ | \put(120,1100){\rot{2}\sx{8}{$v\!=\!-8$}\ero} |
||
+ | \put(160,1032){\rot{-2}\sx{8}{$v\!=\!8$}\ero} |
||
+ | \put(120,800){\rot{8}\sx{8}{$u\!=\!8$}\ero} |
||
+ | \put(120,732){\rot{3}\sx{8}{$u\!=\!-8$}\ero} |
||
+ | % |
||
+ | \put(840,910){\rot{50}\sx{8}{$u\!=\!4$}\ero} |
||
+ | \put(890,862){\rot{6}\sx{8}{$u\!=\!0$}\ero} |
||
+ | \put(760,830){\rot{-32}\sx{8}{$u\!=\!-4$}\ero} |
||
+ | % |
||
+ | \put(1340,1070){\rot{0}\sx{8}{$v\!=\!0$}\ero} |
||
+ | \put(1906,1070){\rot{0}\sx{8}{$v\!=\!0$}\ero} |
||
+ | % |
||
+ | \put(1450,840){\rot{38}\sx{8}{$v\!=\!0$}\ero} |
||
+ | \put(1560,740){\rot{50}\sx{8}{$u\!=\!0$}\ero} |
||
+ | \put(1680,610){\rot{50}\sx{8}{$v\!=\!0$}\ero} |
||
+ | \put(1844,480){\rot{51}\sx{8}{$u\!=\!0$}\ero} |
||
+ | \put(1980,290){\rot{50}\sx{8}{$v\!=\!0$}\ero} |
||
+ | \end{picture} |
||
+ | \end{document} |
||
+ | </nowiki></nomathjax></poem> |
||
+ | |||
+ | ==References== |
||
+ | <references/> |
||
+ | |||
+ | [[Category:Bessel function]] |
||
+ | [[Category:C++]] |
||
+ | [[Category:Complex map]] |
||
+ | [[Category:Latex]] |
||
+ | [[Category:Makoto Morinaga]] |
||
+ | [[Category:Mori]] |
||
+ | [[Category:Mori function]] |
||
+ | [[Category:Nori]] |
||
+ | [[Category:Nori function]] |
Latest revision as of 08:44, 1 December 2018
complex map of function nori, in some range of the complex plane,
$\mathrm{nori}(z)=\,$mori$\big(\sqrt{z}\big)^2$
$u\!+\!\mathrm i v=\mathrm{nori}(x\!+\!\mathrm i y)$
C++ generator of curves
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++)
//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 "besselj0.cin"
DB L1= 2.404825557695773;
DB L2= 5.5200781102863115;
DB L3= 8.653727912911013;
DB L4=11.791534439014281;
z_type morin(z_type x){ return BesselJ0(L1*x)/(1.-x*x);} // naive representation fails at x=1.
z_type mori0(z_type x){ int n,m; z_type s, xx=x*x;
DB c[16]={ 1., -0.4457964907366961303, 0.07678538241994023453, -0.0071642885058902232688,
0.00042159522055140947688, -0.000017110542281627483109, 5.0832583976057607495e-7, -1.1537378620148452816e-8,
2.0662789231930073316e-10, -2.9948657413756059965e-12, 3.5852738451127332173e-14,-3.6050239634659700777e-16,
3.0877184831292878827e-18, -2.2798156440952688462e-20, 1.4660907878585489441e-22,-8.2852774398657968065e-25};
// 16th term seems to fail; perhaps, due to the C++ rounding errors.
//with m=15, at |x|<2, the relative error is of order of 10^(-16)
//In this sense, the result is accurate while |x|<2.
m=15; s=c[m]*xx; for(n=m-1;n>0;n--){ s+=c[n]; s*=xx;}
return 1.+s;}
z_type mori(z_type x){if(abs(x)<2.) return mori0(x);
return morin(x);}
z_type no1(z_type x){ return BesselJ0(L1*sqrt(x))/(1.-x);} // naive representation fails at x=1.
z_type no0(z_type x){ int n,m; z_type s; //, xx=x*x;
DB c[16]={ 1., -0.4457964907366961303, 0.07678538241994023453, -0.0071642885058902232688,
0.00042159522055140947688, -0.000017110542281627483109, 5.0832583976057607495e-7, -1.1537378620148452816e-8,
2.0662789231930073316e-10, -2.9948657413756059965e-12, 3.5852738451127332173e-14,-3.6050239634659700777e-16,
3.0877184831292878827e-18, -2.2798156440952688462e-20, 1.4660907878585489441e-22,-8.2852774398657968065e-25};
// 16th term seems to fail; perhaps, due to the C++ rounding errors.
//with m=15, at |x|<2, the relative error is of order of 10^(-16)
//In this sense, the result is accurate while |x|<2.
m=15; s=c[m]*x; for(n=m-1;n>0;n--){ s+=c[n]; s*=x;}
return 1.+s;}
z_type no(z_type x){if(abs(x)<3.) return no0(x);
return no1(x);}
int main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
int M=501,M1=M+1;
int N=501,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("06.eps","w");ado(o,5020,5020);
FILE *o;o=fopen("norima.eps","w");ado(o,5020,5020);
fprintf(o,"1010 1010 translate\n 100 100 scale\n");
DO(m,M1)X[m]=-10.+.1*(m-.5);
DO(n,N1)Y[n]=-10.+.1*(n-.5);
for(m=-10;m<11;m++){if(m==0){M(m,-10.1)L(m,10.1)} else{M(m,-10)L(m,10)}}
for(n=-10;n<11;n++){ M( -10,n)L(10,n)}
fprintf(o,".01 W 0 0 0 RGB S\n");
DO(m,M1)DO(n,N1){g[m*N1+n]=99999; f[m*N1+n]=99999;}
DO(m,M1){x=X[m]; //printf("%5.2f\n",x);
DO(n,N1){y=Y[n]; z=z_type(x,y);
// c=BesselJ0(z);
// c=mori(z);
c=no(z); c*=c;
p=Re(c); q=Im(c);
if(p>-999. && p<999. && q>-999. && q<999
)
{g[m*N1+n]=p;
f[m*N1+n]=q;
}
}}
//#include "plodi.cin"
fprintf(o,"1 setlinejoin 1 setlinecap\n"); p=40;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,".01 W 0 .6 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,".01 W .9 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,".01 W 0 0 .9 RGB S\n");
for(m=1;m<9;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p); fprintf(o,".04 W .9 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,".04 W 0 0 .9 RGB S\n");
conto(o,f,w,v,X,Y,M,N, (0. ),-2*p,2*p); fprintf(o,".04 W .6 0 .6 RGB S\n");
for(m=-8;m<0;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".04 W 0 0 0 RGB S\n");
m=0; conto(o,g,w,v,X,Y,M,N, (0.+m),-2*p,2*p); fprintf(o,".04 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,".04 W 0 0 0 RGB S\n");
//#include "plofu.cin"
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
system("epstopdf norima.eps");
system( "open norima.pdf");
}
Latex generator of labels
\documentclass[12pt]{article}
\paperheight 5120px
\paperwidth 5100px
\textwidth 5094px
\textheight 5200px
\topmargin -80px
\oddsidemargin -72px
\usepackage{graphics}
\usepackage{rotating}
%\usepackage{color}
\newcommand \sx {\scalebox}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\newcommand \ing {\includegraphics}
\newcommand \rmi {\mathrm{i}}
\begin{document}\parindent 0pt
\begin{picture}(5100,5100)
\put(80,80){\ing{norima}}
%\put(0,0){\sx{8}{-10}}
\put(32,2068){\sx{8}{$y$}}
\put(32,1868){\sx{8}{$8$}}
\put(32,1668){\sx{8}{$6$}}
\put(32,1468){\sx{8}{$4$}}
\put(32,1268){\sx{8}{$2$}}
\put(32,1068){\sx{8}{$0$}}
\put(-32,868){\sx{8}{$-2$}}
\put(-32,668){\sx{8}{$-4$}}
\put(-32,468){\sx{8}{$-6$}}
\put(-32,268){\sx{8}{$-8$}}
\put(230,8){\sx{8}{$-8$}}
\put(430,8){\sx{8}{$-6$}}
\put(630,8){\sx{8}{$-4$}}
\put(830,8){\sx{8}{$-2$}}
\put(1070,8){\sx{8}{$0$}}
\put(1270,8){\sx{8}{$2$}}
\put(1470,8){\sx{8}{$4$}}
\put(1670,8){\sx{8}{$6$}}
\put(1870,8){\sx{8}{$8$}}
\put(2070,8){\sx{8}{$x$}}
%
\put(120,1100){\rot{2}\sx{8}{$v\!=\!-8$}\ero}
\put(160,1032){\rot{-2}\sx{8}{$v\!=\!8$}\ero}
\put(120,800){\rot{8}\sx{8}{$u\!=\!8$}\ero}
\put(120,732){\rot{3}\sx{8}{$u\!=\!-8$}\ero}
%
\put(840,910){\rot{50}\sx{8}{$u\!=\!4$}\ero}
\put(890,862){\rot{6}\sx{8}{$u\!=\!0$}\ero}
\put(760,830){\rot{-32}\sx{8}{$u\!=\!-4$}\ero}
%
\put(1340,1070){\rot{0}\sx{8}{$v\!=\!0$}\ero}
\put(1906,1070){\rot{0}\sx{8}{$v\!=\!0$}\ero}
%
\put(1450,840){\rot{38}\sx{8}{$v\!=\!0$}\ero}
\put(1560,740){\rot{50}\sx{8}{$u\!=\!0$}\ero}
\put(1680,610){\rot{50}\sx{8}{$v\!=\!0$}\ero}
\put(1844,480){\rot{51}\sx{8}{$u\!=\!0$}\ero}
\put(1980,290){\rot{50}\sx{8}{$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,833 × 2,844 (1.34 MB) | Maintenance script (talk | contribs) | Importing image file |
You cannot overwrite this file.
File usage
The following page uses this file: