Difference between revisions of "File:CipmapT.jpg"

From TORI
Jump to: navigation, search
(Importing image file)
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
  +
[[Complex map]] of function $\mathrm{Cip}(z)=\cos(z)/z$.
Importing image file
 
  +
  +
==C++ geberator og lines==
  +
Plotting of isolines is described with few lines below, they ahould be saved as [[plofu.cin]] in the woring directory:
  +
  +
q=.7;
  +
for(m=-11;m<11;m++)for(n=2;n<10;n+=2)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<10;m++) for(n=2;n<10;n+=2)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<10;m++) for(n=2;n<10;n+=2)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<11;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p); fprintf(o,".03 W .9 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,".03 W 0 0 .9 RGB S\n");
  +
conto(o,f,w,v,X,Y,M,N, (0. ),-p,p); fprintf(o,".03 W .6 0 .6 RGB S\n");
  +
for(m=-9;m<10;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".03 W 0 0 0 RGB S\n");
  +
  +
Also, files [[ado.cin]] and [[conto.cin]] should be loaded in the working directory for the compilation of 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 complex<double> z_type;
  +
#define Re(x) x.real()
  +
#define Im(x) x.imag()
  +
#define I z_type(0.,1.)
  +
#include "conto.cin"
  +
  +
//#include "acip.cin"
  +
  +
main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
  +
int M=401,M1=M+1;
  +
int N=401,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("cipmap.eps","w");ado(o,82,82);
  +
fprintf(o,"41 41 translate\n 10 10 scale\n");
  +
//DO(m,M1) X[m]=-4.+.02*(m-.5);
  +
DO(n,200)Y[n]=-4.+.02*n;
  +
Y[200]=-.002;
  +
Y[201]= .002;
  +
for(n=202;n<N1;n++) Y[n]=-4.+.02*(n-1.);
  +
DO(m,M1)X[m]=Y[m];
  +
for(m=-4;m<5;m++){if(m==0){M(m,-4.1)L(m,4.1)} else{M(m,-4)L(m,4)}}
  +
for(n=-4;n<5;n++){ M( -4,n)L(4,n)}
  +
fprintf(o,".01 W 0 0 0 RGB S\n");
  +
DO(m,M1)DO(n,N1){g[m*N1+n]=9999; f[m*N1+n]=9999;}
  +
DO(m,M1){x=X[m]; //printf("%5.2f\n",x);
  +
DO(n,N1){y=Y[n]; z=z_type(x,y);
  +
c=cos(z)/z;
  +
// c=ACip5(z);
  +
// p=abs((c-d)/(c+d)); p=-log(p)/log(10.);
  +
p=Re(c);
  +
q=Im(c);
  +
if(p>-99. && p<99.
  +
&& q>-99. && q<99
  +
)
  +
{g[m*N1+n]=p;
  +
f[m*N1+n]=q;
  +
}
  +
}}
  +
  +
//#include "plodi.cin"
  +
#include "plofu.cin"
  +
  +
/*
  +
DB x1=-0.33650841691839534;
  +
DB y1= 1.55;
  +
M(-4.02,0)L(x1,0)
  +
M(0,-4.02)L(0,-y1) M(0,y1)L(0,4.02)
  +
fprintf(o,"0 setlinecap .028 W .9 1 .9 RGB S\n");
  +
DO(m,37){x=x1-.1*m; M(x,0) L(x-.05,0)}
  +
DO(n,25){y=-y1-.1*n; M(0,y) L(0,y-.05)}
  +
DO(n,25){y=y1+.1*n; M(0,y) L(0,y+.05)}
  +
fprintf(o,".032 W 0 0 0 RGB S\n");
  +
*/
  +
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
  +
system("epstopdf cipmap.eps");
  +
system( "open cipmap.pdf");
  +
getchar(); system("killall Preview");//for mac
  +
}
  +
  +
==Latex generator of labels==
  +
  +
For the compilation of the code below, file cipmap.pdf is supposed to be generated with the code above and stored in the working directory.
  +
  +
  +
%<nowiki>
  +
\documentclass[12pt]{article} %<br>
  +
\paperheight 838px %<br>
  +
\paperwidth 844px %<br>
  +
\textwidth 1294px %<br>
  +
\textheight 1200px %<br>
  +
\topmargin -80px %<br>
  +
\oddsidemargin -80px %<br>
  +
\usepackage{graphics} %<br>
  +
\usepackage{rotating} %<br>
  +
\newcommand \sx {\scalebox} %<br>
  +
\newcommand \rot {\begin{rotate}} %<br>
  +
\newcommand \ero {\end{rotate}} %<br>
  +
\newcommand \ing {\includegraphics} %<br>
  +
\newcommand \rmi {\mathrm{i}} %<br>
  +
\begin{document} %<br>
  +
\newcommand \zoomax { %<br>
  +
\put(16,820){\sx{4.4}{$y$}} %<br>
  +
\put(16,630){\sx{4}{$2$}} %<br>
  +
\put(16,430){\sx{4}{$0$}} %<br>
  +
\put(-4, 230){\sx{4}{$-\!2$}} %<br>
  +
\put(220, 5){\sx{4}{$-\!2$}} %<br>
  +
\put(443, 5){\sx{4}{$0$}} %<br>
  +
\put(643, 5){\sx{4}{$2$}} %<br>
  +
\put(831,6){\sx{4}{$x$}} %<br>
  +
} %<br>
  +
\parindent 0pt %<br>
  +
%\sx{8}{\begin{picture}(86,86) \put(0,0){\ing{b271t0}} %<br>
  +
\begin{picture}(816,816) %<br>
  +
\put(40,30){\sx{10}{\ing{cipmap}}} %<br>
  +
\zoomax %<br>
  +
%\put(80,402){\sx{2.6}{\rot{90}$u\!=\!0.2$\ero}} %<br>
  +
\put(400,650){\sx{3}{$v\!=\!-2$}} %<br>
  +
\put(450,533){\sx{3}{\rot{90}$u\!=\!0$\ero}} %<br>
  +
%
  +
\put(80,432){\sx{3}{\rot{0}$v\!=\!0$\ero}} %<br>
  +
\put(177,402){\sx{3}{\rot{90}$v\!=\!0$\ero}} %<br>
  +
%\put(250,400){\sx{2.6}{\rot{90}$u\!=\!0.2$\ero}} %<br>
  +
\put(300,400){\sx{3}{\rot{90}$u\!=\!0$\ero}} %<br>
  +
\put(626,406){\sx{3}{\rot{90}$u\!=\!0$\ero}} %<br>
  +
\put(730,406){\sx{3}{\rot{90}$v\!=\!0$\ero}} %<br>
  +
\put(760,431){\sx{3}{\rot{00}$v\!=\!0$\ero}} %<br>
  +
%
  +
\put(320,260){\sx{3}{\rot{60}$v\!=\!1$\ero}} %<br>
  +
\put(600,256){\sx{3}{\rot{5}$u\!=\!-1$\ero}} %<br>
  +
\put(210,270){\sx{3}{\rot{-5}$u\!=\!1$\ero}} %<br>
  +
\put(410,230){\sx{3}{$v\!=\!2$}} %<br>
  +
\put(410,160){\sx{3}{$v\!=\!3$}} %<br>
  +
\end{picture} %<br>
  +
\end{document} %<br>
  +
%</nowiki>
  +
  +
[[Category:Complex map]]
  +
[[Category:Cip]]

Latest revision as of 08:32, 1 December 2018

Complex map of function $\mathrm{Cip}(z)=\cos(z)/z$.

C++ geberator og lines

Plotting of isolines is described with few lines below, they ahould be saved as plofu.cin in the woring directory:

q=.7;
for(m=-11;m<11;m++)for(n=2;n<10;n+=2)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<10;m++) for(n=2;n<10;n+=2)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<10;m++) for(n=2;n<10;n+=2)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<11;m++)  conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p); fprintf(o,".03 W .9 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,".03 W 0 0 .9 RGB S\n");
                conto(o,f,w,v,X,Y,M,N, (0.  ),-p,p); fprintf(o,".03 W .6 0 .6 RGB S\n");
for(m=-9;m<10;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".03 W 0 0 0 RGB S\n");

Also, files ado.cin and conto.cin should be loaded in the working directory for the compilation of 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 complex<double> z_type;
#define Re(x) x.real()
#define Im(x) x.imag()
#define I z_type(0.,1.)
#include "conto.cin"
//#include "acip.cin"
main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
int M=401,M1=M+1;
int N=401,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("cipmap.eps","w");ado(o,82,82);
fprintf(o,"41 41 translate\n 10 10 scale\n");
//DO(m,M1) X[m]=-4.+.02*(m-.5);
DO(n,200)Y[n]=-4.+.02*n;
      Y[200]=-.002;
      Y[201]= .002;
for(n=202;n<N1;n++) Y[n]=-4.+.02*(n-1.);
DO(m,M1)X[m]=Y[m];
for(m=-4;m<5;m++){if(m==0){M(m,-4.1)L(m,4.1)} else{M(m,-4)L(m,4)}}
for(n=-4;n<5;n++){     M(  -4,n)L(4,n)}
fprintf(o,".01 W 0 0 0 RGB S\n");
DO(m,M1)DO(n,N1){g[m*N1+n]=9999; f[m*N1+n]=9999;}
DO(m,M1){x=X[m]; //printf("%5.2f\n",x);
DO(n,N1){y=Y[n]; z=z_type(x,y);
       c=cos(z)/z;
//     c=ACip5(z);
//     p=abs((c-d)/(c+d));  p=-log(p)/log(10.);
      p=Re(c);
      q=Im(c);        
      if(p>-99. && p<99.
       &&     q>-99. && q<99 
      )
 {g[m*N1+n]=p; 
  f[m*N1+n]=q;
 }
                      }}
//#include "plodi.cin"
#include "plofu.cin"
/*
DB x1=-0.33650841691839534;
DB y1= 1.55;
M(-4.02,0)L(x1,0)
M(0,-4.02)L(0,-y1) M(0,y1)L(0,4.02)
fprintf(o,"0 setlinecap .028 W .9 1 .9 RGB S\n");
DO(m,37){x=x1-.1*m; M(x,0) L(x-.05,0)}
DO(n,25){y=-y1-.1*n; M(0,y) L(0,y-.05)}
DO(n,25){y=y1+.1*n; M(0,y) L(0,y+.05)}
fprintf(o,".032 W 0 0 0 RGB S\n");
*/
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
      system("epstopdf cipmap.eps");
      system(    "open cipmap.pdf");            
      getchar(); system("killall Preview");//for mac
}

Latex generator of labels

For the compilation of the code below, file cipmap.pdf is supposed to be generated with the code above and stored in the working directory.


% \documentclass[12pt]{article} %<br> \paperheight 838px %<br> \paperwidth 844px %<br> \textwidth 1294px %<br> \textheight 1200px %<br> \topmargin -80px %<br> \oddsidemargin -80px %<br> \usepackage{graphics} %<br> \usepackage{rotating} %<br> \newcommand \sx {\scalebox} %<br> \newcommand \rot {\begin{rotate}} %<br> \newcommand \ero {\end{rotate}} %<br> \newcommand \ing {\includegraphics} %<br> \newcommand \rmi {\mathrm{i}} %<br> \begin{document} %<br> \newcommand \zoomax { %<br> \put(16,820){\sx{4.4}{$y$}} %<br> \put(16,630){\sx{4}{$2$}} %<br> \put(16,430){\sx{4}{$0$}} %<br> \put(-4, 230){\sx{4}{$-\!2$}} %<br> \put(220, 5){\sx{4}{$-\!2$}} %<br> \put(443, 5){\sx{4}{$0$}} %<br> \put(643, 5){\sx{4}{$2$}} %<br> \put(831,6){\sx{4}{$x$}} %<br> } %<br> \parindent 0pt %<br> %\sx{8}{\begin{picture}(86,86) \put(0,0){\ing{b271t0}} %<br> \begin{picture}(816,816) %<br> \put(40,30){\sx{10}{\ing{cipmap}}} %<br> \zoomax %<br> %\put(80,402){\sx{2.6}{\rot{90}$u\!=\!0.2$\ero}} %<br> \put(400,650){\sx{3}{$v\!=\!-2$}} %<br> \put(450,533){\sx{3}{\rot{90}$u\!=\!0$\ero}} %<br> % \put(80,432){\sx{3}{\rot{0}$v\!=\!0$\ero}} %<br> \put(177,402){\sx{3}{\rot{90}$v\!=\!0$\ero}} %<br> %\put(250,400){\sx{2.6}{\rot{90}$u\!=\!0.2$\ero}} %<br> \put(300,400){\sx{3}{\rot{90}$u\!=\!0$\ero}} %<br> \put(626,406){\sx{3}{\rot{90}$u\!=\!0$\ero}} %<br> \put(730,406){\sx{3}{\rot{90}$v\!=\!0$\ero}} %<br> \put(760,431){\sx{3}{\rot{00}$v\!=\!0$\ero}} %<br> % \put(320,260){\sx{3}{\rot{60}$v\!=\!1$\ero}} %<br> \put(600,256){\sx{3}{\rot{5}$u\!=\!-1$\ero}} %<br> \put(210,270){\sx{3}{\rot{-5}$u\!=\!1$\ero}} %<br> \put(410,230){\sx{3}{$v\!=\!2$}} %<br> \put(410,160){\sx{3}{$v\!=\!3$}} %<br> \end{picture} %<br> \end{document} %<br> %

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current17:50, 20 June 2013Thumbnail for version as of 17:50, 20 June 20131,759 × 1,746 (1.58 MB)Maintenance script (talk | contribs)Importing image file
  • You cannot overwrite this file.

There are no pages that link to this file.

Metadata