File:Sufact.png

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, search
Original file(1,677 × 2,191 pixels, file size: 224 KB, MIME type: image/png)

Explicit plot of functions Factorial and SuFac:

$y=x! ~$ and $~y=\mathrm{SuFac}(x)$ versus $x$.

This is adaptation of Figure 8.4 from the Russian book "Superfunctions" (Суперфункции, in Russian) [1].

C++ generator of curves

Files ado.cin, fac.cin, sufac.cin should be loaded in ordert o 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 "ado.cin"
#include "fac.cin"
#include "sufac.cin"
// #include "superfactorial.cin"
 //#include "doya.cin"
 //DB Shoko(DB x) { return log(1.+exp(x)*(M_E-1.)); }

int main(){ int m,n; double x,y; FILE *o;
//o=fopen("SuperFacPlot.eps","w"); ado(o,802,1010);
o=fopen("superfacplo.eps","w"); ado(o,802,1010);
fprintf(o,"401 1 translate 100 100 scale\n");
#define M(x,y) fprintf(o,"%6.3f %6.3f M\n",0.+x,0.+y);
#define L(x,y) fprintf(o,"%6.3f %6.3f L\n",0.+x,0.+y);
for(m=-4;m<5;m++) {M(m,0)L(m,10)}
for(m=0;m<11;m++) {M(-4,m)L(4,m)}
fprintf(o,"2 setlinecap .01 W S\n 1 setlinecap 1 setlinejoin\n");
for(m=0;m<42;m++){x=-.5+.1*m; y=Re(fac(x)); if(m==0)M(x,y) else L(x,y);} fprintf(o,".04 W .7 0 0 RGB S\n");
for(m=0;m<54;m++){x=-4+.1*m; y=Re(superfac(x));if(m==0)M(x,y) else L(x,y);} fprintf(o,".04 W 0 0 .7 RGB S\n");
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
    system("epstopdf superfacplo.eps");
    system( "open superfacplo.pdf");
    getchar(); system("killall Preview");//for mac
}

Latex generator of labels


\documentclass[12pt]{article}
\paperwidth 808pt
\paperheight 1056pt
\textwidth 1800pt
\textheight 1800pt
\topmargin -108pt
\oddsidemargin -72pt
\parindent 0pt
\pagestyle{empty}
\usepackage {graphics}
\usepackage{rotating}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\newcommand \ing {\includegraphics}
\newcommand \sx {\scalebox}
\begin{document}
\begin{picture}(602,1010)
%\put(0,0){\includegraphics{SuperFacPlot}}
\put(0,0){\includegraphics{superfacplo}}
\put(372,978){\sx{4.5}{$y$}}
\put(372,890){\sx{4.5}{$9$}}
\put(372,790){\sx{4.5}{$8$}}
\put(372,690){\sx{4.5}{$7$}}
\put(372,590){\sx{4.5}{$6$}}
\put(372,490){\sx{4.5}{$5$}}
\put(372,390){\sx{4.5}{$4$}}
\put(372,290){\sx{4.5}{$3$}}
\put(372,190){\sx{4.5}{$2$}}
\put(372,90){\sx{4.5}{$1$}}
\put( 066,-42){\sx{4.5}{$-\!3$}}
\put(166,-42){\sx{4.5}{$-\!2$}}
\put(266,-42){\sx{4.5}{$-\!1$}}
\put(391,-42){\sx{4.5}{$0$}}
\put(491,-42){\sx{4.5}{$1$}}
\put(591,-42){\sx{4.5}{$2$}}
\put(691,-42){\sx{4.5}{$3$}}
\put(777,-42){\sx{4.5}{$x$}}
%\put(532,440){\sx{5}{\rot{83}$y\!=\!\mathrm{SuperFactorial}(x)$\ero}}
\put(532,440){\sx{5}{\rot{83}$y\!=\!\mathrm{SuFac}(x)$\ero}}
%\put(660,450){\sx{4}{\rot{83}$y\!=\!\mathrm{Factorial}(x)$\ero}} %
\put(740,500){\sx{5}{\rot{83}$y\!=\!\mathrm{Factorial}(x)$\ero}}
\end{picture}
\end{document}

References

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 20181,677 × 2,191 (224 KB)Maintenance script (talk | contribs)Importing image file
  • You cannot overwrite this file.

The following page links to this file:

Metadata