File:Sunem2mdp.jpg

From TORI
Revision as of 08:53, 1 December 2018 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Original file(2,158 × 2,141 pixels, file size: 648 KB, MIME type: image/jpeg)

Complex map of function SuNem with parameter $q\!=\!2$:

$u\!+\mathrm i v=\mathrm{SuNem}_2(x\!+\!\mathrm i y)$

References


C++ generator of map

ado.cin , conto.cin , sune.cin , sunemco.txt should be loaded in order 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 std::complex<double> z_type;
#define Re(x) x.real()
#define Im(x) x.imag()
#define I z_type(0.,1.)
#include "conto.cin"

DB Q=2.;
z_type nem(z_type z){ return z*(1.+z*z*(1.+z*Q)); }
z_type nem1(z_type z){ return 1.+z*z*(3.+z*(4.*Q)); } // WARNING: Q is global!

#include "sune.cin"

DB SUNo=0; // should be reassigned
z_type sunem(z_type z){ return sune(z + SUNo);}

int main(){ int Max; int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
// DB rr,ti;
co(); // Evaluate soefficients of the expansion

x=0; DO(n,60) { y=Re(sune(x)); x-= y-1.; printf("%19.16lf %19.16lf\n", x,y);}
SUNo=x;
printf("A[2][0]= %9.5lf , A[2][1]=%9.5lf\n",A[2][0],A[2][1]);
printf("A[3][0]= %9.5lf , A[3][1]=%9.5lf\n",A[3][0],A[3][1]);
 int M=501,M1=M+1;
 int N=501,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
//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("sunem2md.eps","w");ado(o,1008,1008);
fprintf(o,"504 504 translate\n 100 100 scale 2 setlinecap\n");
DO(m,M1) X[m]=-5.+.02*(m-.5);
DO(n,N1) Y[n]=-5.+.02*(n-.5);
for(m=-5;m<6;m+=1){ M(m,-5)L(m,5)}
for(n=-5;n<6;n+=1){ M(-5,n)L(5,n)}
fprintf(o,".003 W 0 0 0 RGB 2 setlinecap S\n");

DO(m,M1)DO(n,N1){g[m*N1+n]=9999999; f[m*N1+n]=9999999;}
DO(m,M1){x=X[m]; if(m/10*10==m) printf("run at x=%6.3f\n",x);
DO(n,N1){y=Y[n]; z=z_type(x,y);
c=sunem(z);
//d=sune(z);
//p=abs(c-d)/abs(c+d); p=-log(p)/log(10.);
        p=Re(c); q=Im(c);
//if(p>-85 && p<85) g[m*N1+n]=p;
        if(p>-1001 && p<1001 &&
        q >-1001 && q<1001 ) { g[m*N1+n]=p; f[m*N1+n]=q; }
        }}

//M(-2,0) L(0,0) M(tr,ti)L(0,0)L(tr,-ti)
//fprintf(o,".002 W 1 1 0 RGB 0 setlinecap S\n");

fprintf(o,"1 setlinejoin 1 setlinecap\n");
p=6.;q=.6;
//#include"plofu.cin"

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

/*
conto(o,g,w,v,X,Y,M,N,15.5,-1,1);fprintf(o,".02 W 1 0 1 RGB S\n");
conto(o,g,w,v,X,Y,M,N,15.,-p,p);fprintf(o,".04 W 0 0 1 RGB S\n");
conto(o,g,w,v,X,Y,M,N,14.,-p,p);fprintf(o,".02 W 0 1 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,13.,-p,p);fprintf(o,".02 W 1 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,12.,-p,p);fprintf(o,".04 W 0 0 .7 RGB S\n");
conto(o,g,w,v,X,Y,M,N,11.,-p,p);fprintf(o,".02 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,10.,-p,p);fprintf(o,".02 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,9.,-p,p);fprintf(o,".04 W 0 .6 .8 RGB S\n");
conto(o,g,w,v,X,Y,M,N,8.,-p,p);fprintf(o,".02 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,7.,-p,p);fprintf(o,".02 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,6.,-p,p);fprintf(o,".04 W 0 .6 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,5.,-p,p);fprintf(o,".02 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,4.,-p,p);fprintf(o,".02 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,3.,-p,p);fprintf(o,".04 W 1 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,2.,-p,p);fprintf(o,".02 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,1.,-p,p);fprintf(o,".05 W .5 0 0 RGB S\n");
*/

//M(-2,0) L(0,0) M(tr,ti)L(0,0)L(tr,-ti)
//fprintf(o,".004 W 1 1 0 RGB 0 setlinecap S\n");

fprintf(o,"showpage\n%cTrailer",'%'); fclose(o);
        system("epstopdf sunem2md.eps");
        system( "open sunem2md.pdf"); //mac

//for(m=-40;m<0;m++) {x=m; y=Re(sun(x)); t=Re(nem(sun(x-1.))); printf("%6.1lf %18.15lf %18.15lf %18.15lf\n", x,y,t,y-t);}
return 0;
}

Latex generator of map


%\documentclass[12pt]{article}
\documentclass{mcom-l}
 \usepackage{graphics}
 \paperwidth 1040pt
 \paperheight 1032pt
 \usepackage{geometry}
 \usepackage{rotating}
 \textwidth 1260pt
 \textheight 1260pt
 \topmargin -94pt
 \oddsidemargin -72pt
 \parindent 0pt
 \pagestyle{empty}
\newcommand \ing {\includegraphics}
\newcommand \sx {\scalebox}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\begin{document}
\begin{picture}(1038,1030)
%\put(50,40){\ing{sunem10q10ma6s}}
%\put(24,20){\ing{nem120ma}}
\put(30,20){\ing{sunem2md}}
\put(11,1015){\sx{3.2}{$y$}}
\put(11,917){\sx{3}{$4$}}
\put(11,817){\sx{3}{$3$}}
\put(11,717){\sx{3}{$2$}}
\put(11,617){\sx{3}{$1$}}
\put(11,517){\sx{3}{$0$}}
\put(-6,417){\sx{3}{$-1$}}
\put(-6,317){\sx{3}{$-2$}}
\put(-6,217){\sx{3}{$-3$}}
\put(-6,117){\sx{3}{$-4$}}
\put(-6, 17){\sx{3}{$-5$}}
\put( 9, 0){\sx{3}{$-5$}}
\put(109, 0){\sx{3}{$-4$}}
\put(209, 0){\sx{3}{$-3$}}
\put(309, 0){\sx{3}{$-2$}}
\put(409, 0){\sx{3}{$-1$}}
\put(530, 0){\sx{3}{$0$}}
\put(630, 0){\sx{3}{$1$}}
\put(730, 0){\sx{3}{$2$}}
\put(830, 0){\sx{3}{$3$}}
\put(930, 0){\sx{3}{$4$}}
\put(1022,0){\sx{3.2}{$x$}}
%
\put(820,828){\sx{3}{\rot{49} $u\!=\!0.1$\ero}}
\put(552,914){\sx{3}{\rot{-68} $u\!=\!0.2$\ero}}
\put(120,540){\sx{3}{\rot{79} $u\!=\!0.3$\ero}}
\put(306,538){\sx{3}{\rot{72} $u\!=\!0.4$\ero}}
\put(394,536){\sx{3}{\rot{62} $u\!=\!0.5$\ero}}
\put(446,534){\sx{3}{\rot{58} $u\!=\!0.6$\ero}}
\put(476,532){\sx{3}{\rot{54} $u\!=\!0.7$\ero}}
\put(499,530){\sx{3}{\rot{48} $u\!=\!0.8$\ero}}
\put(532,526){\sx{3}{\rot{50} $u\!=\!1$\ero}}
%
\put(566,134){\sx{3}{\rot{67} $u\!=\!0.2$\ero}}
\put(820,200){\sx{3}{\rot{-50} $u\!=\!0.1$\ero}}
%
\put(638,804){\sx{3}{\rot{-34} $v\!=\!0.3$\ero}}
\put(442,876){\sx{3}{\rot{57} $v\!=\!0.2$\ero}}
\put(142,900){\sx{3}{\rot{-65} $v\!=\!0.1$\ero}}
\put(146,518){\sx{3}{\rot{0} $v\!=\!0$\ero}}
\put(846,518){\sx{3}{\rot{0} \bf huge values\ero}}
\put(146,126){\sx{3}{\rot{64} $v\!=\!-0.1$\ero}}
\put(430, 170){\sx{3}{\rot{-56} $v\!=\!-0.2$\ero}}
%
\end{picture}

File history

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

Date/TimeThumbnailDimensionsUserComment
current06:14, 1 December 2018Thumbnail for version as of 06:14, 1 December 20182,158 × 2,141 (648 KB)Maintenance script (talk | contribs)Importing image file

The following page uses this file:

Metadata