File:Yulyaplot100.png

From TORI
Revision as of 09:39, 21 June 2013 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Original file(762 × 748 pixels, file size: 128 KB, MIME type: image/png)

Plot of the Yulya function

$\mathrm{Yulya}_a(x)= \frac{a\!+\!x}{\sqrt{1-(a\!+\!x)^2}}-\frac{a\!-\!x}{\sqrt{1-(a\!-\!x)^2}}$

$f\!=\!\mathrm{Yulya}_a(x)~$ is shown in the $x,a$ plane with levels $f=\rm const.$

Generator of the curves

For the plotting of curves, the routines
conto.cin and
ado.cin
are necessary. These files should be stored in the working directory to compile 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;
 DB Yulya(DB a, DB x){ DB p=a+x; DB m=a-x; 
 return p/sqrt(1.-p*p)-m/sqrt(1.-m*m);}
DB Yulyap(DB a, DB x){ DB p,m; p=a+x; m=a-x; p=1.-p*p; m=1.-m*m; 
 return 1./(p*sqrt(p))+1./(m*sqrt(m));}
DB ArcYulya0(DB a, DB f){ DB m=1.-a; DB p=1.+a; 
return m*f / sqrt( 4./(m*p*p*p) + f*f );}
DB ArcYulya1(DB a, DB f){ DB y=ArcYulya0(a,f);
y+=(f-Yulya(a,y))/Yulyap(a,y);
return y;}
DB ArcYulya2(DB a, DB f){ int n; DB y=ArcYulya0(a,f);
 DO(n,4) y+=(f-Yulya(a,y))/Yulyap(a,y);        return y;}
//#include "yulya.cin"
#include "conto.cin"
main(){ int j,k,m,n; DB x,y, p,q, t;
int M=201,M1=M+1;
int N=201,N1=N+1;
DB X[M1],Y[N1], g[M1*N1], w[M1*N1]; // w is working array.
char v[M1*N1]; // v is working array
FILE *o;o=fopen("yulya.eps","w");ado(o,108,108);
fprintf(o,"4 4 translate\n 100 100 scale\n");
DO(m,M1) X[m]=0.+.005*(m-.1);
DO(n,N1) Y[n]=0.+.005*(n-.1);
M(1,0)L(0,1)L(1,1) fprintf(o,"C 1 .9 .9 RGB fill\n");
for(m=0;m<2;m+=1){     M(m,0)L(m,1)}
for(n=0;n<2;n+=1){     M(0,n)L(1,n)}
fprintf(o,".003 W 0 0 0 RGB S\n");
M(.5,0)L(.5,1)
M(0,.5)L(1,.5)
M(0,1)L(1,0) fprintf(o,".002 W 0 0 0 RGB S\n");
DO(m,M1)DO(n,N1){g[m*N1+n]=9999;}
DO(m,M1){x=X[m]; //printf("run at x=%6.3f\n",x);
DO(n,N1){y=Y[n];
 p=Yulya(y,x);
//     p=ArcYulya2(y,p);
//     p=-log(fabs(p-x)/fabs(p+x))/log(10.);
if(p>-85 && p<85)  g[m*N1+n]=p;
  }}
fprintf(o,"1 setlinejoin 1 setlinecap\n");
p=4.;
conto(o,g,w,v,X,Y,M,N,.2,-p,p);fprintf(o,".003 W 0 .5 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,.4,-p,p);fprintf(o,".003 W 0 .5 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,.6,-p,p);fprintf(o,".003 W 0 .5 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,.8,-p,p);fprintf(o,".003 W 0 .5 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,1.,-p,p);fprintf(o,".004 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,2.,-p,p);fprintf(o,".004 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,3.,-p,p);fprintf(o,".004 W 0 0 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,4.,-p,p);fprintf(o,".004 W 0 0 0 RGB S\n");
fprintf(o,"showpage\n%cTrailer",'%'); fclose(o);
       system("epstopdf yulya.eps");
       system(    "open yulya.pdf"); //these 2 commands may be specific for macintosh
getchar(); system("killall Preview");// if run at another operational sysetm, may need to modify
}
//End of generator of yulya.pdf

Generator of the labels

Once the curves are generated and stored as yulya.pdf the image can be generated with the latex file below:

% Gerenator of YulyaPlot100.png
% Save this paragraph as yulyaplot.tex
% After the latexing is and generation of yulyaplot.pdf
%>  convert yulyaplot.pdf YulyaPlot100.png
% Copyleft 2011 by Dmitrii Kouznetsov
\documentclass[12pt]{article}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{rotating}
\paperwidth 550pt
\paperheight 540pt
\topmargin -114pt
\oddsidemargin -100pt
\textwidth 600pt
\textheight 600pt
\pagestyle {empty}
\newcommand \sx {\scalebox} 

\newcommand \rot {\begin{rotate}}

\newcommand \ero {\end{rotate}}
\newcommand \ing {\includegraphics}

\begin{document}

\sx{5}{ 
%
\begin{picture}(108,108) 
 %
\put(3,2){\ing{yulya}}
\put(1,103){\sx{.6}{$a$}}
\put(-2,54){\sx{.6}{$0.5$}}
\put(0,4){\sx{.6}{$0$}}
\put(5,0){\sx{.6}{$0$}}
\put(53,0){\sx{.6}{$0.5$}}
\put(104,0){\sx{.6}{$x$}}
\put(8,40){\rot{-90} \sx{.5}{$f\!=\!0$} \ero}
\put(17,39){\rot{-87} \sx{.5}{$f\!=\!0.2$} \ero}
\put(25,37){\rot{-82} \sx{.5}{$f\!=\!0.4$} \ero}
\put(33,35){\rot{-78} \sx{.5}{$f\!=\!0.6$} \ero}
\put(41,31){\rot{-76} \sx{.5}{$f\!=\!0.8$} \ero}
\put(49,29){\rot{-76} \sx{.5}{$f\!=\!1$} \ero}
\put(64,28){\rot{-56} \sx{.5}{$f\!=\!2$} \ero}
\put(75,25){\rot{-53} \sx{.5}{$f\!=\!3$} \ero}
\put(92,22){\rot{-45} \sx{.5}{$f\!=\!\infty$} \ero}
\put(58,89){\sx{.74}{$f\!=\!\mathrm{Yulya}_a\!(x)$} has}
\put(67,79){\sx{.8}{has}}
\put(60,70){\sx{.8}{complex}}
\put(64,61){\sx{.8}{values}}
\end{picture}
}

\end{document}

References

The detailed description of use of this function will be supplied as soon as we publish it.

File history

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

Date/TimeThumbnailDimensionsUserComment
current17:50, 20 June 2013Thumbnail for version as of 17:50, 20 June 2013762 × 748 (128 KB)Maintenance script (talk | contribs)Importing image file

There are no pages that use this file.

Metadata