Difference between revisions of "File:Korifit76map.jpg"

From TORI
Jump to: navigation, search
(Importing image file)
 
 
Line 1: Line 1:
  +
[[Complex map]] of approximation [[korifit76]] of function [[kori]]
Importing image file
 
  +
  +
==[[C++]] generator of map==
  +
The following files should be loaded:
  +
[[ado.cin]],
  +
[[conto.cin]],
  +
[[korifit76.cin]]
  +
<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"
  +
#include "korifit76.cin"
  +
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=551,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("korifit76ma.eps","w");ado(o,1506,1104);
  +
fprintf(o,"102 102 translate\n 10 10 scale\n");
  +
DO(m,M1) X[m]=-10.+.2*(m-.5)*(1+.001*m);
  +
DO(n,N1)Y[n]=-10+.2*(n-.5);//*(1+.001*n);
  +
  +
for(m=-10;m<10;m++){if(m!=0){M(m,-10)L(m,10)}}
  +
for(n=-10;n<10;n++){ M( -10,n)L(10,n)}
  +
  +
for(m=-10;m<160;m+=10){if(m!=0){M(m,-10)L(m,100)}}
  +
for(n=-10;n<110;n+=10){ M( -10,n)L(140,n)}
  +
fprintf(o,".01 W 0 0 0 RGB S\n");
  +
M(0,-10)L(0,100) fprintf(o,".03 W 0 .5 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=korifit76(z);
  +
p=Re(c); q=Im(c);
  +
if(p>-9999. && p<9999.
  +
&& q>-9999. && q<9999
  +
)
  +
{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=20;q=2;
  +
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 .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,".01 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,".01 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,".05 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,".05 W 0 0 1 RGB S\n");
  +
conto(o,f,w,v,X,Y,M,N, (0. ),-2*p,2*p); fprintf(o,".05 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,".03 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,".03 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,".03 W 0 0 0 RGB S\n");
  +
//#include "plofu.cin"
  +
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
  +
system("epstopdf korifit76ma.eps");
  +
system( "open korifit76ma.pdf");
  +
getchar(); system("killall Preview");//for mac
  +
}
  +
</nowiki></nomathjax></poem>
  +
==[[Latex]] generator of labels==
  +
<poem><nomathjax><nowiki>
  +
\documentclass[12pt]{article}
  +
\paperwidth 1566px
  +
\paperheight 1152px
  +
\textwidth 1504px
  +
\textheight 1420px
  +
\topmargin -100px
  +
\oddsidemargin -76px
  +
\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}(1280,1144)
  +
%\put(40,30){\sx{10}{\ing{besselj0map1}}}
  +
%\put(10,10){\ing{02}}
  +
%\put(10,10){\ing{03}}
  +
%
  +
%\put(60,40){\ing{korima}}
  +
\put(60,40){\ing{korifit76ma}}
  +
%
  +
%\put(10,230){\sx{4}{$10$}}
  +
\put(30,1130){\sx{4}{$y$}}
  +
\put(10,1030){\sx{4}{$90$}}
  +
\put(10,930){\sx{4}{$80$}}
  +
\put(10,830){\sx{4}{$70$}}
  +
\put(10,730){\sx{4}{$60$}}
  +
\put(10,630){\sx{4}{$50$}}
  +
\put(10,530){\sx{4}{$40$}}
  +
\put(10,430){\sx{4}{$30$}}
  +
\put(10,330){\sx{4}{$20$}}
  +
\put(10,230){\sx{4}{$10$}}
  +
\put(30,180){\sx{4}{$5$}}
  +
\put(30,130){\sx{4}{$0$}}
  +
\put(-4, 78){\sx{4}{$-5$}}
  +
\put(0,0){\sx{4}{$-10$}}
  +
\put(160,0){\sx{4}{$0$}}
  +
\put(240,0){\sx{4}{$10$}}
  +
\put(340,0){\sx{4}{$20$}}
  +
\put(440,0){\sx{4}{$30$}}
  +
\put(540,0){\sx{4}{$40$}}
  +
\put(640,0){\sx{4}{$50$}}
  +
\put(740,0){\sx{4}{$60$}}
  +
\put(840,0){\sx{4}{$70$}}
  +
\put(940,0){\sx{4}{$80$}}
  +
\put(1040,0){\sx{4}{$90$}}
  +
\put(1134,0){\sx{4}{$100$}}
  +
\put(1234,0){\sx{4}{$110$}}
  +
\put(1334,0){\sx{4}{$120$}}
  +
\put(1434,0){\sx{4}{$130$}}
  +
\put(1546,0){\sx{4}{$x$}}
  +
%
  +
\put(696,622){\sx{4}{\rot{-16}$v\!=\!1$\ero}}
  +
\put(720,530){\sx{4}{\rot{-40}$v\!=\!0.1$\ero}}
  +
%
  +
\put(752,820){\sx{4}{\rot{0}$u\!=\!8$\ero}}
  +
\put(780,764){\sx{4}{\rot{0}$u\!=\!4$\ero}}
  +
\put(810,720){\sx{4}{\rot{0}$u\!=\!2$\ero}}
  +
\put(840,660){\sx{4}{\rot{0}$u\!=\!1$\ero}}
  +
\put(874,548){\sx{4}{\rot{0}$u\!=\!0.2$\ero}}
  +
\put(896,494){\sx{4}{\rot{0}$u\!=\!0.1$\ero}}
  +
\put(940,316){\sx{4}{\rot{0}$u\!=\!0.01$\ero}}
  +
%\put(810,300){\sx{4}{\rot{0}$v\!=\!0.01$\ero}}
  +
  +
\put(720,266){\sx{4}{\rot{0}$u\!=\!-0.01$\ero}}
  +
%
  +
\put(414,90){\sx{4}{\rot{90}$u\!=\!0$\ero}}
  +
\put(476,90){\sx{4}{\rot{90}$v\!=\!0$\ero}}
  +
\put(560,90){\sx{4}{\rot{90}$u\!=\!0$\ero}}
  +
\put(640,90){\sx{4}{\rot{90}$v\!=\!0$\ero}}
  +
\put(740,90){\sx{4}{\rot{90}$u\!=\!0$\ero}}
  +
\put(836,90){\sx{4}{\rot{90}$v\!=\!0$\ero}}
  +
\put(954,90){\sx{4}{\rot{90}$u\!=\!0$\ero}}
  +
\end{picture}
  +
\end{document}
  +
</nowiki></nomathjax></poem>
  +
  +
[[Category:C++]]
  +
[[Category:Complex map]]
  +
[[Category:Kori]]
  +
[[Category:Korifit76]]
  +
[[Category:Latex]]
  +
[[Category:Morinaga function]]

Latest revision as of 08:40, 1 December 2018

Complex map of approximation korifit76 of function kori

C++ generator of map

The following files should be loaded: ado.cin, conto.cin, korifit76.cin


#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"
#include "korifit76.cin"
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=551,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("korifit76ma.eps","w");ado(o,1506,1104);
fprintf(o,"102 102 translate\n 10 10 scale\n");
DO(m,M1) X[m]=-10.+.2*(m-.5)*(1+.001*m);
DO(n,N1)Y[n]=-10+.2*(n-.5);//*(1+.001*n);

for(m=-10;m<10;m++){if(m!=0){M(m,-10)L(m,10)}}
for(n=-10;n<10;n++){ M( -10,n)L(10,n)}

for(m=-10;m<160;m+=10){if(m!=0){M(m,-10)L(m,100)}}
for(n=-10;n<110;n+=10){ M( -10,n)L(140,n)}
fprintf(o,".01 W 0 0 0 RGB S\n");
M(0,-10)L(0,100) fprintf(o,".03 W 0 .5 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=korifit76(z);
     p=Re(c); q=Im(c);
     if(p>-9999. && p<9999.
      && q>-9999. && q<9999
     )
{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=20;q=2;
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 .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,".01 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,".01 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,".05 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,".05 W 0 0 1 RGB S\n");
                conto(o,f,w,v,X,Y,M,N, (0. ),-2*p,2*p); fprintf(o,".05 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,".03 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,".03 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,".03 W 0 0 0 RGB S\n");
//#include "plofu.cin"
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
     system("epstopdf korifit76ma.eps");
     system( "open korifit76ma.pdf");
     getchar(); system("killall Preview");//for mac
}

Latex generator of labels


\documentclass[12pt]{article}
\paperwidth 1566px
\paperheight 1152px
\textwidth 1504px
\textheight 1420px
\topmargin -100px
\oddsidemargin -76px
\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}(1280,1144)
%\put(40,30){\sx{10}{\ing{besselj0map1}}}
%\put(10,10){\ing{02}}
%\put(10,10){\ing{03}}
%
%\put(60,40){\ing{korima}}
\put(60,40){\ing{korifit76ma}}
%
%\put(10,230){\sx{4}{$10$}}
\put(30,1130){\sx{4}{$y$}}
\put(10,1030){\sx{4}{$90$}}
\put(10,930){\sx{4}{$80$}}
\put(10,830){\sx{4}{$70$}}
\put(10,730){\sx{4}{$60$}}
\put(10,630){\sx{4}{$50$}}
\put(10,530){\sx{4}{$40$}}
\put(10,430){\sx{4}{$30$}}
\put(10,330){\sx{4}{$20$}}
\put(10,230){\sx{4}{$10$}}
\put(30,180){\sx{4}{$5$}}
\put(30,130){\sx{4}{$0$}}
\put(-4, 78){\sx{4}{$-5$}}
\put(0,0){\sx{4}{$-10$}}
\put(160,0){\sx{4}{$0$}}
\put(240,0){\sx{4}{$10$}}
\put(340,0){\sx{4}{$20$}}
\put(440,0){\sx{4}{$30$}}
\put(540,0){\sx{4}{$40$}}
\put(640,0){\sx{4}{$50$}}
\put(740,0){\sx{4}{$60$}}
\put(840,0){\sx{4}{$70$}}
\put(940,0){\sx{4}{$80$}}
\put(1040,0){\sx{4}{$90$}}
\put(1134,0){\sx{4}{$100$}}
\put(1234,0){\sx{4}{$110$}}
\put(1334,0){\sx{4}{$120$}}
\put(1434,0){\sx{4}{$130$}}
\put(1546,0){\sx{4}{$x$}}
%
\put(696,622){\sx{4}{\rot{-16}$v\!=\!1$\ero}}
\put(720,530){\sx{4}{\rot{-40}$v\!=\!0.1$\ero}}
%
\put(752,820){\sx{4}{\rot{0}$u\!=\!8$\ero}}
\put(780,764){\sx{4}{\rot{0}$u\!=\!4$\ero}}
\put(810,720){\sx{4}{\rot{0}$u\!=\!2$\ero}}
\put(840,660){\sx{4}{\rot{0}$u\!=\!1$\ero}}
\put(874,548){\sx{4}{\rot{0}$u\!=\!0.2$\ero}}
\put(896,494){\sx{4}{\rot{0}$u\!=\!0.1$\ero}}
\put(940,316){\sx{4}{\rot{0}$u\!=\!0.01$\ero}}
%\put(810,300){\sx{4}{\rot{0}$v\!=\!0.01$\ero}}

\put(720,266){\sx{4}{\rot{0}$u\!=\!-0.01$\ero}}
%
\put(414,90){\sx{4}{\rot{90}$u\!=\!0$\ero}}
\put(476,90){\sx{4}{\rot{90}$v\!=\!0$\ero}}
\put(560,90){\sx{4}{\rot{90}$u\!=\!0$\ero}}
\put(640,90){\sx{4}{\rot{90}$v\!=\!0$\ero}}
\put(740,90){\sx{4}{\rot{90}$u\!=\!0$\ero}}
\put(836,90){\sx{4}{\rot{90}$v\!=\!0$\ero}}
\put(954,90){\sx{4}{\rot{90}$u\!=\!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:12, 1 December 2018Thumbnail for version as of 06:12, 1 December 20183,262 × 2,400 (1.17 MB)Maintenance script (talk | contribs)Importing image file
  • You cannot overwrite this file.

The following page links to this file:

Metadata