File:F1xmapT.jpg

From TORI
Revision as of 08:35, 1 December 2018 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Original file(4,175 × 4,175 pixels, file size: 1.63 MB, MIME type: image/jpeg)

complex map of function $f(z)=-1/z$;

$u+\mathrm i y=f(z+\mathrm i y)$

C++ generator of curves

Files ado.cin and conto.cin should be loaded to compile the code below.

//


#include <math.h>
#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"

int main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d, cu,cd;
int M=1001,M1=M+1;
int N=1001,N1=N+1;
DB X[M1],Y[N1]; DB *g, *f, *w; // w is working array.
g=(DB *)malloc((size_t)((M1*N1)*sizeof(DB)));
f=(DB *)malloc((size_t)((M1*N1)*sizeof(DB)));
w=(DB *)malloc((size_t)((M1*N1)*sizeof(DB)));
char v[M1*N1]; // v is working array
FILE *o;o=fopen("f1xmap.eps","w"); ado(o,2002,2002);
fprintf(o,"1001 1001 translate\n 100 100 scale\n");
fprintf(o,"1 setlinejoin 2 setlinecap\n");
DO(m,M1) X[m]=-10+.02*(m-.5);
DO(n,N1) Y[n]=-10+.02*(n-.5);
//for(n=0;n<N1;n++) { Y[n]=1.09*sinh((3./200.)*(n-200)); printf("%3d %9.6f\n",n,Y[n]); }
for(m=-10;m<11;m++){M(m,-10) L(m,10) }
for(n=-10;n<11;n++){M( -10,n) L(10,n)}
 fprintf(o,".006 W 0 0 0 RGB S\n");
DO(m,M1)DO(n,N1){ g[m*N1+n]=999;
                       f[m*N1+n]=999;}
DO(m,M1){x=X[m]; if(m/10*10==m) printf("x=%6.3f\n",x);
DO(n,N1){y=Y[n]; z=z_type(x,y); //if(abs(z+2.)>.019)
  c=-1./z;
// p=abs(c-z)/(abs(c)+abs(z)); p=-log(p)/log(10.); if(p>0 && p<17) g[m*N1+n]=p;
 p=Re(c); q=Im(c); if(p>-19 && p<19 ){ g[m*N1+n]=p;f[m*N1+n]=q;}
       }}
fprintf(o,"1 setlinejoin 1 setlinecap\n");
 p=1.2;q=.4;

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,".014 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,".014 W .8 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,".014 W 0 0 .8 RGB S\n");
for(m= 1;m<6;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p);fprintf(o,".05 W .8 0 0 RGB S\n");
for(m= 1;m<6;m++) conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p);fprintf(o,".05 W 0 0 .8 RGB S\n");
               conto(o,f,w,v,X,Y,M,N, (0. ),-2*p,2*p); fprintf(o,".05 W .5 0 .5 RGB S\n");
for(m=-6;m<7;m++)conto(o,g,w,v,X,Y,M,N,(0.+m),-p,p);fprintf(o,".05 W 0 0 0 RGB S\n");
// fprintf(o,"0 setlinejoin 0 setlinecap\n");
// M(-10,0)L(0,0) fprintf(o,"1 1 1 RGB .02 W S\n");
//#include "plofu.cin"
fprintf(o,"showpage\n");
fprintf(o,"%c%cTrailer\n",'%','%');
fclose(o); free(f); free(g); free(w);
      system("epstopdf f1xmap.eps");
      system( "open f1xmap.pdf"); //for macintosh
      getchar(); system("killall Preview"); // For macintosh
}
//

Latex generator of curves

%


\documentclass[12pt]{article}
\paperwidth 2004px
\paperheight 2004px
\textwidth 2394px
\textheight 2300px
\topmargin -101px
\oddsidemargin -70px
\usepackage{graphics}
\usepackage{rotating}
\newcommand \sx {\scalebox}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\newcommand \ing {\includegraphics}
\newcommand \rmi {\mathrm{i}}
\parindent 0pt
\pagestyle{empty}
\begin{document}
\parindent 0pt
\sx{1}{\begin{picture}(2002,2002)
\put(30,1950){\sx{8}{$y$}}
\put(30,1780){\sx{7}{$8$}}
\put(30,1580){\sx{7}{$6$}}
\put(30,1380){\sx{7}{$4$}}
\put(30,1180){\sx{7}{$2$}}
\put(30,0980){\sx{7}{$0$}}
\put(-22,780){\sx{7}{$-2$}}
\put(-22,580){\sx{7}{$-4$}}
\put(-22,380){\sx{7}{$-6$}}
\put(-22,180){\sx{7}{$-8$}}
\put(120, 6){\sx{7}{$-8$}}
\put(320, 6){\sx{7}{$-6$}}
\put(520, 6){\sx{7}{$-4$}}
\put(720, 6){\sx{7}{$-2$}}
\put(988, 6){\sx{7}{$0$}}
\put(1188, 6){\sx{7}{$2$}}
\put(1388, 6){\sx{7}{$4$}}
\put(1588, 6){\sx{7}{$6$}}
\put(1788, 6){\sx{7}{$8$}}
\put(1958, 6){\sx{8}{$x$}}
\put(0,0){\ing{f1xmap}}
\put(930,1666){\sx{8}{$u\!=\!0$}} \put(1430,1666){\sx{8}{$v\!=\!0.1$}}
\put(1030,1490){\sx{8}{$v\!=\!0.2$}}

\put(1660,1430){\sx{8}{$u\!=\!-0.1$}}
\put(120,1320){\sx{8}{$u\!=\!0.1$}}
\put(280,1120){\sx{8}{$u\!=\!0.2$}}
\put(1480,1120){\sx{8}{$u\!=\!-0.2$}}
\put(200,982){\sx{8}{$v\!=\!0$}}
\put(1610,982){\sx{8}{$v\!=\!0$}}

\put(640,438){\sx{8}{$v\!=\!-0.2$}}
\put(930,306){\sx{8}{$u\!=\!0$}}
\put(1410,176){\sx{8}{$v\!=\!-0.1$}}
\end{picture}}
\end{document}
%

File history

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

Date/TimeThumbnailDimensionsUserComment
current09:00, 24 September 2013Thumbnail for version as of 09:00, 24 September 20134,175 × 4,175 (1.63 MB)T (talk | contribs)complex map of function $f(z)=-1/z$; $u+\mathrm i=f(z+\mathrmi y) ==C++ generator of curves== <poem><nomathjax><nowiki> //C++ </nowiki></nomathjax></poem> ==Latex generator of curves== <poem><nomathjax><nowiki> % Latex </nowiki></nomath...
  • You cannot overwrite this file.

The following page links to this file:

Metadata