Difference between revisions of "File:ArcSeregaMapT.png"
(Importing image file) |
|||
Line 1: | Line 1: | ||
+ | [[Complex map]] of the [[ArcSerega]] function, which is inverse of |
||
− | Importing image file |
||
+ | : $ \mathrm {Serega}(z)=z+\mathrm i \exp( \mathrm i ~ z^*)$ |
||
+ | |||
+ | Here, $x+\mathrm i y = \mathrm{ArcSerega}(X+\mathrm i Y)$; |
||
+ | |||
+ | Levles $x=\mathrm {const}$ and |
||
+ | levles $y=\mathrm {const}$ |
||
+ | are drawn in the $X$, $Y$ plane. |
||
+ | |||
+ | Neither [[Serega function]] nor [[ArcSerega]] are [[holomorphic]]; the asterisk in the definition above denotes the [[complex conjugation]]. |
||
+ | So the levels $x=\mathrm {const}$ are not orthogonal to levels $y=\mathrm {const}$; the only exception are lines $X=\pi n$ for integer $n$ and all the levels in the limit $Y \rightarrow -\infty$. |
||
+ | |||
+ | The image is generated in the [[eps]] format with [[C++]], converted to pdf, imported to the [[Latex]] document to add labels and, finaly, converted to [[png]] with default resolution. |
||
+ | |||
+ | ==Generation of curves== |
||
+ | FIles [[serega.cin]], [[conto.cin]] and [[ado.cin]] should be loaded to the working directory in order to compile the [[C++]] code below: |
||
+ | |||
+ | #include<math.h> |
||
+ | #include<stdio.h> |
||
+ | using namespace std; |
||
+ | #include <complex> |
||
+ | // #include"ado.cin" |
||
+ | #include "conto.cin" |
||
+ | |||
+ | #define DO(x,y) for(x=0;x<y;x++) |
||
+ | #define DB double |
||
+ | #define z_type complex<double> |
||
+ | #define Re(x) (x.real()) |
||
+ | #define Im(x) (x.imag()) |
||
+ | |||
+ | #include "serega.cin" |
||
+ | // z_type Serega(z_type z); |
||
+ | // z_type ArcSeregaUp(z_type z); |
||
+ | // WARNING: non-holomorphic functions included! |
||
+ | |||
+ | main(){ FILE *o; int m,n; DB x,y,t, p,q; z_type z,Z; |
||
+ | #define M(x,y) fprintf(o,"%6.4f %6.4f M\n",1.*(x),1.*(y)); |
||
+ | #define L(x,y) fprintf(o,"%6.4f %6.4f L\n",1.*(x),1.*(y)); |
||
+ | o=fopen("arcseregamap.eps","w"); ado(o,608,608); fprintf(o,"4 4 translate 100 100 scale \n"); |
||
+ | for(m=0;m<7;m++){M(m,0)L(m,6)} |
||
+ | for(n=0;n<7;n++){M(0,n)L(6,n)} |
||
+ | fprintf(o,"2 setlinecap .004 W S\n"); |
||
+ | M(1.+M_PI, 0.) L(1.+M_PI, 4.) |
||
+ | fprintf(o,"2 setlinecap .003 W S\n"); |
||
+ | fprintf(o,"1 setlinejoin 1 setlinecap .01 W\n"); |
||
+ | int M=600; int M1=M+1; DB *X; X= (DB*) malloc( M1*sizeof(DB)); DO(m,M1) X[m]=.01*(m); |
||
+ | int N=600; int N1=N+1; DB *Y; Y= (DB*) malloc( N1*sizeof(DB)); DO(n,N1) Y[n]=.01*(n); |
||
+ | DB *f; f= (DB*) malloc( M1*N1*sizeof(DB) ); |
||
+ | DB *g; g= (DB*) malloc( M1*N1*sizeof(DB) ); |
||
+ | DB *w; w= (DB*) malloc( M1*N1*sizeof(DB) ); |
||
+ | char *v; v= (char*) malloc( M1*N1*sizeof(char) ); |
||
+ | DO(m,M1){ p=X[m]-1.; |
||
+ | DO(n,N1){ q=Y[n]-5.; g[m*N1+n]= 0.; z=z_type(p,q); Z=ArcSerega(z); //Z=Serega(Z); |
||
+ | //t= - log(abs(Z-z)/abs(Z+z))/log(10.); |
||
+ | g[m*N1+n]=Re(Z); |
||
+ | f[m*N1+n]= Im(Z); |
||
+ | }} |
||
+ | p=2;q=1; |
||
+ | conto(o,f,w,v,X,Y,M,N, (0. ),-100,100); fprintf(o,".03 W .5 0 .5 RGB S\n"); |
||
+ | for(m= 1;m<5;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p);fprintf(o,".03 W .8 0 0 RGB S\n"); |
||
+ | //for(m= 1;m<20;m++) conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p);fprintf(o,".03 W 0 0 .8 RGB S\n"); |
||
+ | for(m=-5;m<6;m++)conto(o,g,w,v,X,Y,M,N,(0.+m),-p,p);fprintf(o,".03 W 0 0 0 RGB S\n"); |
||
+ | for(m=-5;m<0;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<9;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<9;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"); |
||
+ | fprintf(o,"showpage\n"); |
||
+ | fprintf(o,"%c%cTrailer\n",'%','%'); |
||
+ | fclose(o); |
||
+ | system("epstopdf arcseregamap.eps"); |
||
+ | system( "open arcseregamap.pdf"); |
||
+ | } |
||
+ | |||
+ | ==Writing labels== |
||
+ | % File [[arcseregamap.pdf]] should be generated with the program above in order to compile the [[Latex]] document below: |
||
+ | |||
+ | % <nowiki><br> |
||
+ | \documentclass[12pt]{article} %<br> |
||
+ | \usepackage{geometry} %<br> |
||
+ | \usepackage{graphicx} %<br> |
||
+ | \usepackage{rotating} %<br> |
||
+ | \paperwidth 632pt %<br> |
||
+ | \paperheight 632pt %<br> |
||
+ | \textwidth 640pt %<br> |
||
+ | \textheight 640pt %<br> |
||
+ | \topmargin -90pt %<br> |
||
+ | \oddsidemargin -70pt %<br> |
||
+ | \newcommand \sx {\scalebox} %<br> |
||
+ | \newcommand \rot {\begin{rotate}} %<br> |
||
+ | \newcommand \ero {\end{rotate}} %<br> |
||
+ | \pagestyle{empty} %<br> |
||
+ | \parindent 0pt %<br> |
||
+ | \begin{document} %<br> |
||
+ | \begin{picture}(600,600) %<br> |
||
+ | \put(20,10){\includegraphics{arcseregamap}} %<br> |
||
+ | \put(0,598){\sx{2.4}{$Y$}} %<br> |
||
+ | \put(8,507){\sx{2.5}{$0$}} %<br> |
||
+ | \put(-9,407){\sx{2.5}{$-\!1$}} %<br> |
||
+ | \put(-9,307){\sx{2.5}{$-\!2$}} %<br> |
||
+ | \put(-9,207){\sx{2.5}{$-\!3$}} %<br> |
||
+ | \put(-9,107){\sx{2.5}{$-\!4$}} %<br> |
||
+ | \put(-9, 7){\sx{2.5}{$-\!5$}} %<br> |
||
+ | \put(117, -9){\sx{2.5}{$0$}} %<br> |
||
+ | \put(217, -9){\sx{2.5}{$1$}} %<br> |
||
+ | \put(317, -9){\sx{2.5}{$2$}} %<br> |
||
+ | \put(417, -9){\sx{2.5}{$3$}} %<br> |
||
+ | \put(438, -3){\sx{2.5}{$\pi$}} %<br> |
||
+ | \put(517, -9){\sx{2.5}{$4$}} %<br> |
||
+ | \put(606, -9){\sx{2.5}{$X$}} %<br> |
||
+ | \put(122,126){\rot{90}\sx{2.8}{$x\!=\!0$}\ero} %<br> |
||
+ | \put(222,126){\rot{90}\sx{2.8}{$x\!=\!1$}\ero} %<br> |
||
+ | \put(322,126){\rot{90}\sx{2.8}{$x\!=\!2$}\ero} %<br> |
||
+ | \put(422,126){\rot{90}\sx{2.8}{$x\!=\!3$}\ero} %<br> |
||
+ | \put(448,126){\rot{90}\sx{2.8}{$x\!=\!\pi$}\ero} %<br> |
||
+ | \put(524,126){\rot{88}\sx{2.8}{$x\!=\!4$}\ero} %<br> |
||
+ | \put(318,430){\rot{-11}\sx{2.8}{$y\!=\!0$}\ero} %<br> |
||
+ | \put(318,383){\rot{-5}\sx{2.8}{$y\!=\!-1$}\ero} %<br> |
||
+ | \put(322,302){\rot{-3}\sx{2.8}{$y\!=\!-2$}\ero} %<br> |
||
+ | \put(324,203){\rot{-2}\sx{2.8}{$y\!=\!-3$}\ero} %<br> |
||
+ | \put(325,103){\rot{-1}\sx{2.8}{$y\!=\!-4$}\ero} %<br> |
||
+ | %<br> |
||
+ | \put(200,560){\sx{3}{$ x\!+\!\mathrm i y = \mathrm{ArcSerega}(X\!+\!\mathrm i Y)$}} %<br> |
||
+ | \end{picture} %<br> |
||
+ | \end{document} %<br> |
||
+ | % </nowiki> |
||
+ | |||
+ | [[Category:ArcSerega]] |
||
+ | [[Category:Serega function]] |
||
+ | [[Category:Navier–Stokes]] |
||
+ | [[Category:Fluid dynamics]] |
Latest revision as of 09:43, 21 June 2013
Complex map of the ArcSerega function, which is inverse of
- $ \mathrm {Serega}(z)=z+\mathrm i \exp( \mathrm i ~ z^*)$
Here, $x+\mathrm i y = \mathrm{ArcSerega}(X+\mathrm i Y)$;
Levles $x=\mathrm {const}$ and levles $y=\mathrm {const}$ are drawn in the $X$, $Y$ plane.
Neither Serega function nor ArcSerega are holomorphic; the asterisk in the definition above denotes the complex conjugation. So the levels $x=\mathrm {const}$ are not orthogonal to levels $y=\mathrm {const}$; the only exception are lines $X=\pi n$ for integer $n$ and all the levels in the limit $Y \rightarrow -\infty$.
The image is generated in the eps format with C++, converted to pdf, imported to the Latex document to add labels and, finaly, converted to png with default resolution.
Generation of curves
FIles serega.cin, conto.cin and ado.cin should be loaded to the working directory in order to compile the C++ code below:
#include<math.h> #include<stdio.h> using namespace std; #include <complex> // #include"ado.cin" #include "conto.cin"
#define DO(x,y) for(x=0;x<y;x++) #define DB double #define z_type complex<double> #define Re(x) (x.real()) #define Im(x) (x.imag())
#include "serega.cin" // z_type Serega(z_type z); // z_type ArcSeregaUp(z_type z); // WARNING: non-holomorphic functions included! main(){ FILE *o; int m,n; DB x,y,t, p,q; z_type z,Z; #define M(x,y) fprintf(o,"%6.4f %6.4f M\n",1.*(x),1.*(y)); #define L(x,y) fprintf(o,"%6.4f %6.4f L\n",1.*(x),1.*(y)); o=fopen("arcseregamap.eps","w"); ado(o,608,608); fprintf(o,"4 4 translate 100 100 scale \n"); for(m=0;m<7;m++){M(m,0)L(m,6)} for(n=0;n<7;n++){M(0,n)L(6,n)} fprintf(o,"2 setlinecap .004 W S\n"); M(1.+M_PI, 0.) L(1.+M_PI, 4.) fprintf(o,"2 setlinecap .003 W S\n"); fprintf(o,"1 setlinejoin 1 setlinecap .01 W\n"); int M=600; int M1=M+1; DB *X; X= (DB*) malloc( M1*sizeof(DB)); DO(m,M1) X[m]=.01*(m); int N=600; int N1=N+1; DB *Y; Y= (DB*) malloc( N1*sizeof(DB)); DO(n,N1) Y[n]=.01*(n); DB *f; f= (DB*) malloc( M1*N1*sizeof(DB) ); DB *g; g= (DB*) malloc( M1*N1*sizeof(DB) ); DB *w; w= (DB*) malloc( M1*N1*sizeof(DB) ); char *v; v= (char*) malloc( M1*N1*sizeof(char) ); DO(m,M1){ p=X[m]-1.; DO(n,N1){ q=Y[n]-5.; g[m*N1+n]= 0.; z=z_type(p,q); Z=ArcSerega(z); //Z=Serega(Z); //t= - log(abs(Z-z)/abs(Z+z))/log(10.); g[m*N1+n]=Re(Z); f[m*N1+n]= Im(Z); }} p=2;q=1; conto(o,f,w,v,X,Y,M,N, (0. ),-100,100); fprintf(o,".03 W .5 0 .5 RGB S\n"); for(m= 1;m<5;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p);fprintf(o,".03 W .8 0 0 RGB S\n"); //for(m= 1;m<20;m++) conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p);fprintf(o,".03 W 0 0 .8 RGB S\n"); for(m=-5;m<6;m++)conto(o,g,w,v,X,Y,M,N,(0.+m),-p,p);fprintf(o,".03 W 0 0 0 RGB S\n"); for(m=-5;m<0;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<9;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<9;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"); fprintf(o,"showpage\n"); fprintf(o,"%c%cTrailer\n",'%','%'); fclose(o); system("epstopdf arcseregamap.eps"); system( "open arcseregamap.pdf"); }
Writing labels
% File arcseregamap.pdf should be generated with the program above in order to compile the Latex document below:
% <br> \documentclass[12pt]{article} %<br> \usepackage{geometry} %<br> \usepackage{graphicx} %<br> \usepackage{rotating} %<br> \paperwidth 632pt %<br> \paperheight 632pt %<br> \textwidth 640pt %<br> \textheight 640pt %<br> \topmargin -90pt %<br> \oddsidemargin -70pt %<br> \newcommand \sx {\scalebox} %<br> \newcommand \rot {\begin{rotate}} %<br> \newcommand \ero {\end{rotate}} %<br> \pagestyle{empty} %<br> \parindent 0pt %<br> \begin{document} %<br> \begin{picture}(600,600) %<br> \put(20,10){\includegraphics{arcseregamap}} %<br> \put(0,598){\sx{2.4}{$Y$}} %<br> \put(8,507){\sx{2.5}{$0$}} %<br> \put(-9,407){\sx{2.5}{$-\!1$}} %<br> \put(-9,307){\sx{2.5}{$-\!2$}} %<br> \put(-9,207){\sx{2.5}{$-\!3$}} %<br> \put(-9,107){\sx{2.5}{$-\!4$}} %<br> \put(-9, 7){\sx{2.5}{$-\!5$}} %<br> \put(117, -9){\sx{2.5}{$0$}} %<br> \put(217, -9){\sx{2.5}{$1$}} %<br> \put(317, -9){\sx{2.5}{$2$}} %<br> \put(417, -9){\sx{2.5}{$3$}} %<br> \put(438, -3){\sx{2.5}{$\pi$}} %<br> \put(517, -9){\sx{2.5}{$4$}} %<br> \put(606, -9){\sx{2.5}{$X$}} %<br> \put(122,126){\rot{90}\sx{2.8}{$x\!=\!0$}\ero} %<br> \put(222,126){\rot{90}\sx{2.8}{$x\!=\!1$}\ero} %<br> \put(322,126){\rot{90}\sx{2.8}{$x\!=\!2$}\ero} %<br> \put(422,126){\rot{90}\sx{2.8}{$x\!=\!3$}\ero} %<br> \put(448,126){\rot{90}\sx{2.8}{$x\!=\!\pi$}\ero} %<br> \put(524,126){\rot{88}\sx{2.8}{$x\!=\!4$}\ero} %<br> \put(318,430){\rot{-11}\sx{2.8}{$y\!=\!0$}\ero} %<br> \put(318,383){\rot{-5}\sx{2.8}{$y\!=\!-1$}\ero} %<br> \put(322,302){\rot{-3}\sx{2.8}{$y\!=\!-2$}\ero} %<br> \put(324,203){\rot{-2}\sx{2.8}{$y\!=\!-3$}\ero} %<br> \put(325,103){\rot{-1}\sx{2.8}{$y\!=\!-4$}\ero} %<br> %<br> \put(200,560){\sx{3}{$ x\!+\!\mathrm i y = \mathrm{ArcSerega}(X\!+\!\mathrm i Y)$}} %<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/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 17:50, 20 June 2013 | 1,312 × 1,312 (483 KB) | Maintenance script (talk | contribs) | Importing image file |
You cannot overwrite this file.
File usage
The following 2 pages use this file: