File:Arqnemplot.jpg

From TORI
Jump to: navigation, search
Original file(5,230 × 3,154 pixels, file size: 495 KB, MIME type: image/jpeg)

Explicit plot of function ArqNem for various values of parameter.

$y=\mathrm{ArqNem}_q(x)$

versus $x$ for $q\!=\!0$, $q\!=\!1$, $q\!=\!2$, $q\!=\!4$ and for $q\!=\!10$

References


C++ generator of curves



#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=1.e-6; // subject to change in main
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"nembran.cin"
z_type NemZo=nembra(Q);
z_type ANemZo=nem(NemZo);
DB tr=Re(ANemZo);
DB ti=Im(ANemZo);
#include "arqnem.cin"

/* The routine arnemR is sufficient to plot figures, but I test arqnem !
z_type arnemR(z_type z){ DB q=Q; DB q2=q*q; DB q3=q2*q;
z_type a=q-z; z_type b=1.+4.*q*z; z_type r=81.*(a*a)+12.*(b*b*b);
z_type R=sqrt(r); z_type s=27.*a + 3.*R;
z_type S=pow(s,1./3.);
z_type B=(0.26456684199469993*S)/q - (1.2599210498948732*b)/(q*S);
z_type h=0.25/q2 + B;
z_type H=sqrt(h);
z_type g=0.5/q2 - B + (.25+2.*q2)/(q3*H);
z_type G=sqrt(g);
return - 0.25/q - 0.5*H + 0.5*G ;}
*/

int main(){ int Max; int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
//FILE *o;o=fopen("03.eps","w");ado(o,2520,1520);
FILE *o;o=fopen("arqnemplo.eps","w");ado(o,2520,1520);
fprintf(o,"10 10 translate\n 1000 1000 scale 2 setlinecap\n");
for(m=0;m<26;m+=5){ M(.1*m,0)L(.1*m,1.5)}
for(n=0;n<16;n+=5){ M(0,.1*n)L(2.5,.1*n)}
fprintf(o,".003 W 0 0 0 RGB 2 setlinecap S\n");

//Q=10.; DO(m,351){x=-.24+.01*m; y=Re(arnemR(x)); if(m==0) M(x,y) else L(x,y); if(x>2.5) break;}
Q=10.; DO(m,351){x=1.e-6+.01*m; y=Re(arnemR(x)); if(m==0) M(x,y) else L(x,y); if(x>2.5) break;}
fprintf(o,".01 W .9 0 .9 RGB 1 setlinejoin S\n");

//Q=4.; DO(m,351){x=-.38+.01*m; y=Re(arnemR(x)); if(m==0) M(x,y) else L(x,y); if(x>2.5) break;}
Q=4.; DO(m,351){x=1.e-6+.01*m; y=Re(arnemR(x)); if(m==0) M(x,y) else L(x,y); if(x>2.5) break;}
fprintf(o,".01 W .1 .1 1 RGB 1 setlinejoin S\n");

//Q=2.; DO(m,351){x=-.57+.01*m; y=Re(arnemR(x)); if(m==0) M(x,y) else L(x,y); if(x>2.5) break;}
Q=2.; DO(m,351){x=1.e-6+.01*m; y=Re(arnemR(x)); if(m==0) M(x,y) else L(x,y); if(x>2.5) break;}
fprintf(o,".01 W 0 .8 .8 RGB 1 setlinejoin S\n");

//Q=1.; DO(m,351){x=-1.+.01*(m+.1); y=Re(arnemR(x)); if(m==0) M(x,y) else L(x,y); if(x>2.5) break;}
Q=1.; DO(m,351){x=1.e-6+.01*m; y=Re(arnemR(x)); if(m==0) M(x,y) else L(x,y); if(x>2.5) break;}
fprintf(o,".01 W 0 .8 0 RGB 1 setlinejoin S\n");

//Q=1.e-6;DO(m,351){x=-1.+.01*m; y=Re(arnemR(x)); if(m==0) M(x,y) else L(x,y);}
Q=1.e-6; DO(m,351){x=1.e-6+.01*m; y=Re(arnemR(x)); if(m==0) M(x,y) else L(x,y); if(x>2.5) break; }
fprintf(o,".01 W 1 0 0 RGB 1 setlinejoin S\n");

//Q=1; DO(m,251){x=-1.+.01*m; y=Re(nem(x)); if(m==0) M(y,x) else L(y,x); if(y>2.5) break; }
//Q=2; DO(m,251){x=-1.+.01*m; y=Re(nem(x)); if(m==0) M(y,x) else L(y,x); if(y>2.5) break; }
//Q=4; DO(m,251){x=-.8+.01*m; y=Re(nem(x)); if(m==0) M(y,x) else L(y,x); if(y>2.5) break; }
//Q=10; DO(m,251){x=-.5+.01*m; y=Re(nem(x)); if(m==0) M(y,x) else L(y,x); if(y>2.5) break; }

Q=0; DO(m,251){x=.01*m; y=Re(nem(x)); if(m==0) M(y,x) else L(y,x); if(y>2.5) break; }
Q=1; DO(m,251){x=.01*m; y=Re(nem(x)); if(m==0) M(y,x) else L(y,x); if(y>2.5) break; }
Q=2; DO(m,251){x=.01*m; y=Re(nem(x)); if(m==0) M(y,x) else L(y,x); if(y>2.5) break; }
Q=4; DO(m,251){x=.01*m; y=Re(nem(x)); if(m==0) M(y,x) else L(y,x); if(y>2.5) break; }
Q=10;DO(m,251){x=.01*m; y=Re(nem(x)); if(m==0) M(y,x) else L(y,x); if(y>2.5) break; }
fprintf(o,".002 W 0 0 0 RGB 1 setlinejoin S\n");

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

Latex generator of labels


 \documentclass[12pt]{article}
 \usepackage{graphics}
 \paperwidth 2520pt
 \paperheight 1520pt
 \usepackage{geometry}
 \usepackage{rotating}
 \textwidth 2560pt
 \textheight 2260pt
 \topmargin -97pt
 \oddsidemargin -84pt
 \parindent 0pt
 \pagestyle{empty}
\newcommand \ing {\includegraphics}
\newcommand \sx {\scalebox}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\begin{document}
\begin{picture}(2520,1520)
\put(10,10){\ing{arqnemplo}}
\put(30,1410){\sx{12}{$y\!=\!\mathrm{ArqNem}_q(x)$}}
\put(30,980){\sx{12}{$1$}}
\put(30,480){\sx{12}{$0.5$}}
\put(420,42){\sx{12}{$0.5$}}
\put(990,42){\sx{12}{$1$}}
\put(1428,42){\sx{12}{$1.5$}}
\put(1990,42){\sx{12}{$2$}}
\put(2448, 42){\sx{12}{$x$}}
\put(2100,1060){\rot{11}\sx{11}{$q\!=\!0$}\ero}
\put(2150,890){\rot{9}\sx{11}{$q\!=\!1$}\ero}
\put(2180,792){\rot{8}\sx{11}{$q\!=\!2$}\ero}
\put(2240,714){\rot{6}\sx{11}{$q\!=\!4$}\ero}
\put(2200,590){\rot{5}\sx{11}{$q\!=\!10$}\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:10, 1 December 2018Thumbnail for version as of 06:10, 1 December 20185,230 × 3,154 (495 KB)Maintenance script (talk | contribs)Importing image file
  • You cannot overwrite this file.

The following 3 pages link to this file:

Metadata