Difference between revisions of "File:AcosqplotT100.png"
(Importing image file) |
|||
Line 1: | Line 1: | ||
+ | Graphic of function [[Acosq]], defined through [[ArcCosc]] with |
||
− | Importing image file |
||
+ | :$ \mathrm{acosq}(z)=\mathrm{acosc}\left( \mathrm e^{\mathrm i \pi/4}\, z\right)$ |
||
+ | for real values of $z$. |
||
+ | |||
+ | $y=\Re(\mathrm{acosq}(x))$ is shown with blue line. |
||
+ | |||
+ | $y=\Im(\mathrm{acosq}(x))$ is shown with red line. |
||
+ | |||
+ | ==C++ implementation of [[ArcCosc]]== |
||
+ | |||
+ | The code belot should be loaded in the working directory for complation of the [[C++]] generator of curves. |
||
+ | |||
+ | z_type cosc(z_type z) {return cos(z)/z;} |
||
+ | z_type cosp(z_type z) {return (-sin(z) - cos(z)/z)/z ;} |
||
+ | z_type cohc(z_type z) {return cosh(z)/z ;} |
||
+ | z_type cohp(z_type z) {return (sinh(z)-cosh(z)/z)/z ;} |
||
+ | |||
+ | z_type acoscL(z_type z){ int n; z_type s,q; z*=-I; q=I*sqrt(1.50887956153832-z); |
||
+ | s=q*1.1512978931181814 + 1.199678640257734; DO(n,6) s+= (z-cohc(s))/cohp(s); |
||
+ | return -I*s; } |
||
+ | |||
+ | z_type acoscR(z_type z) {int n; z_type s= (1.-0.5/(z*z))/z; |
||
+ | DO(n,5) s+=(z-cosc(s))/cosp(s); return s;} |
||
+ | |||
+ | z_type acoscB(z_type z){ z_type t=0.33650841691839534+z, u=sqrt(t), s; int n; |
||
+ | s= 2.798386045783887 |
||
+ | +u*(-2.437906425896532 |
||
+ | +u*( 0.7079542331649882 |
||
+ | +u*(-0.5009330133042798 |
||
+ | +u*( 0.5714459932734446 )))); |
||
+ | DO(n,6) s+=(z-cosc(s))/cosp(s); return s; } |
||
+ | |||
+ | z_type acosc(z_type z){ DB x1=-0.33650841691839534, x=Re(z), y=Im(z), yy=y*y, |
||
+ | r=x-x1;r*=r;r+=yy; if(r < 1.8 ) return acoscB(z); |
||
+ | r=x+2.;r*=r;r+=yy; if(r>8. && x>=0) return acoscR(z); |
||
+ | if(y >= 0) return acoscL(z); |
||
+ | return conj(acoscL(conj(z))); } |
||
+ | |||
+ | ==C++ generator of curves== |
||
+ | |||
+ | Files [[ado.cin]] and [[acosc.cin]] should be loaded in the working directory in order to complie the [[C++]] 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 "ado.cin" |
||
+ | |||
+ | #include "acosc.cin" |
||
+ | |||
+ | #define M(x,y) fprintf(o,"%6.4f %6.4f M\n",0.+x,0.+y); |
||
+ | #define L(x,y) fprintf(o,"%6.4f %6.4f L\n",0.+x,0.+y); |
||
+ | #define S(x,y) fprintf(o,"S\n",); |
||
+ | main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d; |
||
+ | DB Sazae= 2.798386045783887; // H |
||
+ | DB Tarao= -0.33650841691839534; // J |
||
+ | FILE *o;o=fopen("acosqplot.eps","w");ado(o,820,460); |
||
+ | fprintf(o,"410 110 translate\n 100 100 scale\n"); |
||
+ | for(m=-4;m<5;m++){M(m,-1)L(m,3)} |
||
+ | for(n=-1;n<4;n++){M(-4,n)L(4,n)} |
||
+ | fprintf(o,"2 setlinecap .005 W 0 0 0 RGB S\n"); |
||
+ | /* |
||
+ | for(m=-4;m<3;m++){M(.5+m,-1)L(.5+m,3)} |
||
+ | for(n=-1;n<3;n++){M(-4,n+.5)L(4,n+.5)} |
||
+ | fprintf(o,"2 setlinecap .003 W 0 0 0 RGB S\n"); |
||
+ | */ |
||
+ | DO(m,802){x=-4.01+.01*m; z=x*exp(.25*M_PI*I); y=Re(acosc(z)); if(m==0)M(x,y)else L(x,y) } |
||
+ | fprintf(o,"1 setlinejoin 1 setlinecap .01 W 0 0 .8 RGB S\n"); |
||
+ | DO(m,802){x=-4.01+.01*m; z=x*exp(.25*M_PI*I); y=Im(acosc(z)); if(m==0)M(x,y)else L(x,y) } |
||
+ | fprintf(o,"1 setlinejoin 1 setlinecap .01 W .8 0 0 RGB S\n"); |
||
+ | M(-.1,M_PI/2) |
||
+ | L( .1,M_PI/2) |
||
+ | fprintf(o,".004 W 0 0 0 RGB S\n"); |
||
+ | fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); |
||
+ | system("epstopdf acosqplot.eps"); |
||
+ | system( "open acosqplot.pdf"); |
||
+ | getchar(); system("killall Preview");//for mac |
||
+ | } |
||
+ | |||
+ | ==Latex generator of labels== |
||
+ | |||
+ | %File [[acosq.pdf]] should be generated with the code above in order to compile the [[Latex]] document below. |
||
+ | |||
+ | %<nowiki><br> |
||
+ | % Copyleft 2012 by Dmitrii Kouznetsov %<br> |
||
+ | \documentclass[12pt]{article} %<br> |
||
+ | \usepackage{geometry} %<br> |
||
+ | \usepackage{graphicx} %<br> |
||
+ | \usepackage{rotating} %<br> |
||
+ | \paperwidth 1612pt %<br> |
||
+ | \paperheight 878pt %<br> |
||
+ | \topmargin -90pt %<br> |
||
+ | \oddsidemargin -106pt %<br> |
||
+ | \textwidth 900pt %<br> |
||
+ | \textheight 900pt %<br> |
||
+ | \pagestyle {empty} %<br> |
||
+ | \newcommand \sx {\scalebox} %<br> |
||
+ | \newcommand \rot {\begin{rotate}} %<br> |
||
+ | \newcommand \ero {\end{rotate}} %<br> |
||
+ | \newcommand \ing {\includegraphics} %<br> |
||
+ | \begin{document} %<br> |
||
+ | \parindent 0pt |
||
+ | \sx{2}{ \begin{picture}(840,444) %<br> |
||
+ | \put(4,6){\ing{acosqplot}} %<br> |
||
+ | %\put(4,6){\ing{sazaecon}} %<br> |
||
+ | \put(416,402){\sx{2.5}{$y$}} %<br> |
||
+ | \put(416,308){\sx{2.4}{\bf 2}} %<br> |
||
+ | \put(422,269){\sx{2.4}{$\pi/2$}} %<br> |
||
+ | \put(416,208){\sx{2.4}{\bf 1}} %<br> |
||
+ | %\put(16,160){\sx{1.8}{\bf 2.5}} %<br> |
||
+ | %\put(16, 262){\sx{2.2}{Wakame}} %<br> |
||
+ | \put(416,108){\sx{2.4}{\bf 0}} %<br> |
||
+ | %\put(16, 75){\sx{2.4}{Tarao}} %<br> |
||
+ | \put(100, 118){\sx{2.4}{\bf -3}} %<br> |
||
+ | \put(200, 118){\sx{2.4}{\bf -2}} %<br> |
||
+ | \put(300, 118){\sx{2.4}{\bf -1}} %<br> |
||
+ | \put(508, 118){\sx{2.4}{\bf 1}} %<br> |
||
+ | %\put(142,120){\sx{2.4}{\rot{90}Fune\ero}} %<br> |
||
+ | \put(608, 118){\sx{2.4}{\bf 2}} %<br> |
||
+ | %\put(302,118){\sx{2.5}{\rot{90}Sazae\ero}} %<br> |
||
+ | \put(708, 118){\sx{2.4}{\bf 3}} %<br> |
||
+ | %\put(807, 120){\sx{2.2}{\bf 4}} %<br> |
||
+ | %\put(161, 132){\sx{2.8}{$\frac{\pi}{2}$}} %<br> |
||
+ | %\put(471, 130){\sx{2.6}{$\frac{3\pi}{2}$}} %<br> |
||
+ | \put(780, 118){\sx{2.4}{$x$}} %<br> |
||
+ | \put(618,160){\sx{2.52}{\rot{-4}$y\!=\!\Re(\mathrm{acosq}(x))$\ero}} %<br> |
||
+ | \put(618, 65){\sx{2.52}{\rot{4}$y\!=\!\Im(\mathrm{acosq}(x))$\ero}} %<br> |
||
+ | \end{picture} %<br> |
||
+ | } %<br> |
||
+ | \end{document} |
||
+ | %</nowiki> |
||
+ | |||
+ | ==Keywords== |
||
+ | [[ArcCosc]], [[ArcCosq]], [[Sazae-san functions]], |
||
+ | [[Explicit plot]] |
||
+ | |||
+ | [[Category:ArcCosc]] |
||
+ | [[Category:Explicit plot]] |
||
+ | [[Category:Holomorphic function]] |
||
+ | [[Category:Inverse function]] |
||
+ | [[Category:Sazae-san functions]] |
||
+ | [[Category:Guiding of waves between absorbing walls]] |
Latest revision as of 09:41, 21 June 2013
Graphic of function Acosq, defined through ArcCosc with
- $ \mathrm{acosq}(z)=\mathrm{acosc}\left( \mathrm e^{\mathrm i \pi/4}\, z\right)$
for real values of $z$.
$y=\Re(\mathrm{acosq}(x))$ is shown with blue line.
$y=\Im(\mathrm{acosq}(x))$ is shown with red line.
C++ implementation of ArcCosc
The code belot should be loaded in the working directory for complation of the C++ generator of curves.
z_type cosc(z_type z) {return cos(z)/z;} z_type cosp(z_type z) {return (-sin(z) - cos(z)/z)/z ;} z_type cohc(z_type z) {return cosh(z)/z ;} z_type cohp(z_type z) {return (sinh(z)-cosh(z)/z)/z ;}
z_type acoscL(z_type z){ int n; z_type s,q; z*=-I; q=I*sqrt(1.50887956153832-z); s=q*1.1512978931181814 + 1.199678640257734; DO(n,6) s+= (z-cohc(s))/cohp(s); return -I*s; }
z_type acoscR(z_type z) {int n; z_type s= (1.-0.5/(z*z))/z; DO(n,5) s+=(z-cosc(s))/cosp(s); return s;}
z_type acoscB(z_type z){ z_type t=0.33650841691839534+z, u=sqrt(t), s; int n; s= 2.798386045783887 +u*(-2.437906425896532 +u*( 0.7079542331649882 +u*(-0.5009330133042798 +u*( 0.5714459932734446 )))); DO(n,6) s+=(z-cosc(s))/cosp(s); return s; }
z_type acosc(z_type z){ DB x1=-0.33650841691839534, x=Re(z), y=Im(z), yy=y*y, r=x-x1;r*=r;r+=yy; if(r < 1.8 ) return acoscB(z); r=x+2.;r*=r;r+=yy; if(r>8. && x>=0) return acoscR(z); if(y >= 0) return acoscL(z); return conj(acoscL(conj(z))); }
C++ generator of curves
Files ado.cin and acosc.cin should be loaded in the working directory in order to complie the C++ 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 "ado.cin"
#include "acosc.cin"
#define M(x,y) fprintf(o,"%6.4f %6.4f M\n",0.+x,0.+y); #define L(x,y) fprintf(o,"%6.4f %6.4f L\n",0.+x,0.+y); #define S(x,y) fprintf(o,"S\n",); main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d; DB Sazae= 2.798386045783887; // H DB Tarao= -0.33650841691839534; // J FILE *o;o=fopen("acosqplot.eps","w");ado(o,820,460); fprintf(o,"410 110 translate\n 100 100 scale\n"); for(m=-4;m<5;m++){M(m,-1)L(m,3)} for(n=-1;n<4;n++){M(-4,n)L(4,n)} fprintf(o,"2 setlinecap .005 W 0 0 0 RGB S\n"); /* for(m=-4;m<3;m++){M(.5+m,-1)L(.5+m,3)} for(n=-1;n<3;n++){M(-4,n+.5)L(4,n+.5)} fprintf(o,"2 setlinecap .003 W 0 0 0 RGB S\n"); */ DO(m,802){x=-4.01+.01*m; z=x*exp(.25*M_PI*I); y=Re(acosc(z)); if(m==0)M(x,y)else L(x,y) } fprintf(o,"1 setlinejoin 1 setlinecap .01 W 0 0 .8 RGB S\n"); DO(m,802){x=-4.01+.01*m; z=x*exp(.25*M_PI*I); y=Im(acosc(z)); if(m==0)M(x,y)else L(x,y) } fprintf(o,"1 setlinejoin 1 setlinecap .01 W .8 0 0 RGB S\n"); M(-.1,M_PI/2) L( .1,M_PI/2) fprintf(o,".004 W 0 0 0 RGB S\n"); fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); system("epstopdf acosqplot.eps"); system( "open acosqplot.pdf"); getchar(); system("killall Preview");//for mac }
Latex generator of labels
%File acosq.pdf should be generated with the code above in order to compile the Latex document below.
%<br> % Copyleft 2012 by Dmitrii Kouznetsov %<br> \documentclass[12pt]{article} %<br> \usepackage{geometry} %<br> \usepackage{graphicx} %<br> \usepackage{rotating} %<br> \paperwidth 1612pt %<br> \paperheight 878pt %<br> \topmargin -90pt %<br> \oddsidemargin -106pt %<br> \textwidth 900pt %<br> \textheight 900pt %<br> \pagestyle {empty} %<br> \newcommand \sx {\scalebox} %<br> \newcommand \rot {\begin{rotate}} %<br> \newcommand \ero {\end{rotate}} %<br> \newcommand \ing {\includegraphics} %<br> \begin{document} %<br> \parindent 0pt \sx{2}{ \begin{picture}(840,444) %<br> \put(4,6){\ing{acosqplot}} %<br> %\put(4,6){\ing{sazaecon}} %<br> \put(416,402){\sx{2.5}{$y$}} %<br> \put(416,308){\sx{2.4}{\bf 2}} %<br> \put(422,269){\sx{2.4}{$\pi/2$}} %<br> \put(416,208){\sx{2.4}{\bf 1}} %<br> %\put(16,160){\sx{1.8}{\bf 2.5}} %<br> %\put(16, 262){\sx{2.2}{Wakame}} %<br> \put(416,108){\sx{2.4}{\bf 0}} %<br> %\put(16, 75){\sx{2.4}{Tarao}} %<br> \put(100, 118){\sx{2.4}{\bf -3}} %<br> \put(200, 118){\sx{2.4}{\bf -2}} %<br> \put(300, 118){\sx{2.4}{\bf -1}} %<br> \put(508, 118){\sx{2.4}{\bf 1}} %<br> %\put(142,120){\sx{2.4}{\rot{90}Fune\ero}} %<br> \put(608, 118){\sx{2.4}{\bf 2}} %<br> %\put(302,118){\sx{2.5}{\rot{90}Sazae\ero}} %<br> \put(708, 118){\sx{2.4}{\bf 3}} %<br> %\put(807, 120){\sx{2.2}{\bf 4}} %<br> %\put(161, 132){\sx{2.8}{$\frac{\pi}{2}$}} %<br> %\put(471, 130){\sx{2.6}{$\frac{3\pi}{2}$}} %<br> \put(780, 118){\sx{2.4}{$x$}} %<br> \put(618,160){\sx{2.52}{\rot{-4}$y\!=\!\Re(\mathrm{acosq}(x))$\ero}} %<br> \put(618, 65){\sx{2.52}{\rot{4}$y\!=\!\Im(\mathrm{acosq}(x))$\ero}} %<br> \end{picture} %<br> } %<br> \end{document} %
Keywords
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 | 2,231 × 1,215 (152 KB) | Maintenance script (talk | contribs) | Importing image file |
You cannot overwrite this file.
File usage
The following page uses this file: