Difference between revisions of "File:AfacplotT2px300.png"
(Importing image file) |
|||
| Line 1: | Line 1: | ||
| + | Explicit plot of [[ArcFactorial]] |
||
| − | Importing image file |
||
| + | : $y=\mathrm{ArcFctorial}(x)$ |
||
| + | (solid thick line) and plot of its asymptotic |
||
| + | : $ \displaystyle y= \mathrm{Bart}+\mathrm{Liza}_1\,(x\!-\!\mathrm{Homer})^{1/2}+\mathrm{Liza}_2\,(x\!-\!\mathrm{Homer})$ |
||
| + | (thin black line). |
||
| + | : $\mathrm{Bart} ~ ~\approx~ 0.4616321449683622$ |
||
| + | : $\mathrm{Homer}\! \approx\! 0.8856031944108887$ |
||
| + | : $\mathrm{Liza}_1 ~ \approx 1.5276760433847776$ |
||
| + | : $\mathrm{Liza}_2 ~ \approx 0.3559463008501492$ |
||
| + | ==C++ generator of curves== |
||
| + | |||
| + | // Files [[fac.cin]] and [[ado.cin]] should be loaded in the working directory in order 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; |
||
| + | #include <complex> |
||
| + | typedef complex<double> z_type; |
||
| + | #define Re(x) x.real() |
||
| + | #define Im(x) x.imag() |
||
| + | #define I z_type(0.,1.) |
||
| + | #include "fac.cin" |
||
| + | // #include "facp.cin" |
||
| + | // #include "afacc.cin" |
||
| + | #include "ado.cin" |
||
| + | |||
| + | main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d; |
||
| + | FILE *o;o=fopen("afacplot.eps","w");ado(o,620,310); |
||
| + | #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); |
||
| + | fprintf(o,"1 1 translate\n 100 100 scale\n"); |
||
| + | fprintf(o,"2 setlinejoin 2 setlinecap\n"); |
||
| + | DO(m,7){M(m,0)L(m,3)} |
||
| + | DO(n,4){M(0,n)L(6,n)} fprintf(o,".006 W 0 0 0 RGB S\n"); |
||
| + | DB Bart=0.4616321449683622; |
||
| + | DB Homer=0.8856031944108887; |
||
| + | DB Liza1=1.5276760433847776; |
||
| + | DB Liza2=0.3559463008501492; |
||
| + | DB Liza3=-0.4620189870305121; |
||
| + | M(0,Bart)L(Homer,Bart)L(Homer,0) fprintf(o,".004 W 0 0 0 RGB S\n"); |
||
| + | fprintf(o,"1 setlinejoin 1 setlinecap\n"); |
||
| + | M(Homer,Bart) |
||
| + | DO(m,73) { x=Homer+.001*(m*m+.5); y=Re(afacc(x)); L(x,y);} |
||
| + | fprintf(o,"0 0 1 RGB .03 W S\n"); |
||
| + | M(Homer,Bart) |
||
| + | DO(m,39) { x=Homer+.001*(m*m+.5); y=Bart+ |
||
| + | Liza1*sqrt(x-Homer)+ |
||
| + | Liza2*(x-Homer); |
||
| + | L(x,y);} |
||
| + | M(Homer,Bart) |
||
| + | DO(m,62) { x=Homer+.001*(m*m+.5); y=Bart+ |
||
| + | Liza1*sqrt(x-Homer)+ |
||
| + | Liza2*(x-Homer)+ |
||
| + | Liza3*(x-Homer)*sqrt(x-Homer) ; |
||
| + | L(x,y);} |
||
| + | fprintf(o,"0 0 0 RGB .006 W S\n"); |
||
| + | fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); |
||
| + | system("epstopdf afacplot.eps"); |
||
| + | system( "open afacplot.pdf"); //for LINUX |
||
| + | // getchar(); system("killall Preview");//for mac |
||
| + | } |
||
| + | |||
| + | ==Latex generator of labels== |
||
| + | % <nowiki> %<br> |
||
| + | \documentclass[12pt]{article} %<br> |
||
| + | \usepackage{geometry} %<br> |
||
| + | \usepackage{graphicx} %<br> |
||
| + | \usepackage{rotating} %<br> |
||
| + | \usepackage{hyperref} %<br> |
||
| + | \paperwidth 1216px %<br> |
||
| + | \paperheight 608px %<br> |
||
| + | \textwidth 1666mm %<br> |
||
| + | \textheight 1333mm %<br> |
||
| + | \topmargin -107pt %<br> |
||
| + | \oddsidemargin -72pt %<br> |
||
| + | \parindent 0pt %<br> |
||
| + | \begin {document} %<br> |
||
| + | \newcommand \sx {\scalebox} %<br> |
||
| + | \newcommand \rme {{e}} %<br> |
||
| + | \newcommand \rmi {{\rm i}} %imaginary unity is always roman font %<br> |
||
| + | \newcommand \ds {\displaystyle} %<br> |
||
| + | \newcommand \rot {\begin{rotate}} %<br> |
||
| + | \newcommand \ero {\end{rotate}} %<br> |
||
| + | \sx{2}{\begin{picture}(640,303) %<br> |
||
| + | \put(0,0){\includegraphics{afacplot}} %<br> |
||
| + | \put( 3,290){\sx{2}{$y$}} %<br> |
||
| + | \put( 3,194){\sx{2}{\bf 2}} %<br> |
||
| + | \put( 3, 94){\sx{2}{\bf 1}} %<br> |
||
| + | \put( 3, 43){\sx{1.2}{Bart}} %<br> |
||
| + | %\put( 93, 2){\sx{1.2}{\rot{90}Homer\ero}} %<br> |
||
| + | \put( 54, 4){\sx{1.2}{Homer}} %<br> |
||
| + | \put( 96, 3){\sx{2}{\bf 1}} %<br> |
||
| + | \put(196, 3){\sx{2}{\bf 2}} %<br> |
||
| + | \put(296, 3){\sx{2}{\bf 3}} %<br> |
||
| + | \put(396, 3){\sx{2}{\bf 4}} %<br> |
||
| + | \put(496, 3){\sx{2}{\bf 5}} %<br> |
||
| + | \put(588, 3){\sx{2.2}{$x$}} %<br> |
||
| + | \put(111,286){\sx{1.2}{$y\!=\! \mathrm{Bart}+\mathrm{Liza}_1 (x\!-\!\mathrm{Homer})^{1/2}+\mathrm{Liza}_2 (x\!-\!\mathrm{Homer})$}} |
||
| + | \put(276,226){\sx{1.3}{$y\!=\! \mathrm{ArcFactorial}(x)$}} |
||
| + | \put(188,133){\sx{1.1}{$y\!=\! \mathrm{Bart}+\mathrm{Liza}_1 (x\!-\!\mathrm{Homer})^{1/2}+\mathrm{Liza}_2 (x\!-\!\mathrm{Homer})+\mathrm{Liza}_3 (x\!-\!\mathrm{Homer})^{3/2}$}} |
||
| + | %\put(158,348){\rot{-73}\sx{1.5}{$v\!=\!1.2$}\ero} %<br> |
||
| + | \end{picture}} %<br> |
||
| + | \end{document} %<br> |
||
| + | % </nowiki> |
||
| + | |||
| + | [[Category:ArcFactorial]] |
||
| + | [[Category:Explicit plot]] |
||
| + | [[Category:C++]] |
||
| + | [[Category:Latex]] |
||
Latest revision as of 09:41, 21 June 2013
Explicit plot of ArcFactorial
- $y=\mathrm{ArcFctorial}(x)$
(solid thick line) and plot of its asymptotic
- $ \displaystyle y= \mathrm{Bart}+\mathrm{Liza}_1\,(x\!-\!\mathrm{Homer})^{1/2}+\mathrm{Liza}_2\,(x\!-\!\mathrm{Homer})$
(thin black line).
- $\mathrm{Bart} ~ ~\approx~ 0.4616321449683622$
- $\mathrm{Homer}\! \approx\! 0.8856031944108887$
- $\mathrm{Liza}_1 ~ \approx 1.5276760433847776$
- $\mathrm{Liza}_2 ~ \approx 0.3559463008501492$
C++ generator of curves
// Files fac.cin and ado.cin should be loaded in the working directory in order 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; #include <complex> typedef complex<double> z_type; #define Re(x) x.real() #define Im(x) x.imag() #define I z_type(0.,1.) #include "fac.cin" // #include "facp.cin" // #include "afacc.cin" #include "ado.cin"
main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
FILE *o;o=fopen("afacplot.eps","w");ado(o,620,310);
#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);
fprintf(o,"1 1 translate\n 100 100 scale\n");
fprintf(o,"2 setlinejoin 2 setlinecap\n");
DO(m,7){M(m,0)L(m,3)}
DO(n,4){M(0,n)L(6,n)} fprintf(o,".006 W 0 0 0 RGB S\n");
DB Bart=0.4616321449683622;
DB Homer=0.8856031944108887;
DB Liza1=1.5276760433847776;
DB Liza2=0.3559463008501492;
DB Liza3=-0.4620189870305121;
M(0,Bart)L(Homer,Bart)L(Homer,0) fprintf(o,".004 W 0 0 0 RGB S\n");
fprintf(o,"1 setlinejoin 1 setlinecap\n");
M(Homer,Bart)
DO(m,73) { x=Homer+.001*(m*m+.5); y=Re(afacc(x)); L(x,y);}
fprintf(o,"0 0 1 RGB .03 W S\n");
M(Homer,Bart)
DO(m,39) { x=Homer+.001*(m*m+.5); y=Bart+
Liza1*sqrt(x-Homer)+
Liza2*(x-Homer);
L(x,y);}
M(Homer,Bart)
DO(m,62) { x=Homer+.001*(m*m+.5); y=Bart+
Liza1*sqrt(x-Homer)+
Liza2*(x-Homer)+
Liza3*(x-Homer)*sqrt(x-Homer) ;
L(x,y);}
fprintf(o,"0 0 0 RGB .006 W S\n");
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
system("epstopdf afacplot.eps");
system( "open afacplot.pdf"); //for LINUX
// getchar(); system("killall Preview");//for mac
}
Latex generator of labels
% %<br> \documentclass[12pt]{article} %<br> \usepackage{geometry} %<br> \usepackage{graphicx} %<br> \usepackage{rotating} %<br> \usepackage{hyperref} %<br> \paperwidth 1216px %<br> \paperheight 608px %<br> \textwidth 1666mm %<br> \textheight 1333mm %<br> \topmargin -107pt %<br> \oddsidemargin -72pt %<br> \parindent 0pt %<br> \begin {document} %<br> \newcommand \sx {\scalebox} %<br> \newcommand \rme {{e}} %<br> \newcommand \rmi {{\rm i}} %imaginary unity is always roman font %<br> \newcommand \ds {\displaystyle} %<br> \newcommand \rot {\begin{rotate}} %<br> \newcommand \ero {\end{rotate}} %<br> \sx{2}{\begin{picture}(640,303) %<br> \put(0,0){\includegraphics{afacplot}} %<br> \put( 3,290){\sx{2}{$y$}} %<br> \put( 3,194){\sx{2}{\bf 2}} %<br> \put( 3, 94){\sx{2}{\bf 1}} %<br> \put( 3, 43){\sx{1.2}{Bart}} %<br> %\put( 93, 2){\sx{1.2}{\rot{90}Homer\ero}} %<br> \put( 54, 4){\sx{1.2}{Homer}} %<br> \put( 96, 3){\sx{2}{\bf 1}} %<br> \put(196, 3){\sx{2}{\bf 2}} %<br> \put(296, 3){\sx{2}{\bf 3}} %<br> \put(396, 3){\sx{2}{\bf 4}} %<br> \put(496, 3){\sx{2}{\bf 5}} %<br> \put(588, 3){\sx{2.2}{$x$}} %<br> \put(111,286){\sx{1.2}{$y\!=\! \mathrm{Bart}+\mathrm{Liza}_1 (x\!-\!\mathrm{Homer})^{1/2}+\mathrm{Liza}_2 (x\!-\!\mathrm{Homer})$}} \put(276,226){\sx{1.3}{$y\!=\! \mathrm{ArcFactorial}(x)$}} \put(188,133){\sx{1.1}{$y\!=\! \mathrm{Bart}+\mathrm{Liza}_1 (x\!-\!\mathrm{Homer})^{1/2}+\mathrm{Liza}_2 (x\!-\!\mathrm{Homer})+\mathrm{Liza}_3 (x\!-\!\mathrm{Homer})^{3/2}$}} %\put(158,348){\rot{-73}\sx{1.5}{$v\!=\!1.2$}\ero} %<br> \end{picture}} %<br> \end{document} %<br> %
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,534 × 1,267 (141 KB) | Maintenance script (talk | contribs) | Importing image file |
You cannot overwrite this file.
File usage
The following 2 pages use this file: