File:Lofplot.jpg

From TORI
Revision as of 08:41, 1 December 2018 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Original file(1,270 × 1,100 pixels, file size: 153 KB, MIME type: image/jpeg)

$y\!=$Lof$(x)$, thick blue line;

$y\!=$Factorial$(x)$, thin red line.

For real $x > -1~$, the simple relation takes place:

$\mathrm{Lof}(x)=\ln\!\big(\mathrm{Factorial}(x)\big)$

C++ generator of curves

files ado.cin and fac.cin should be loaded in order to 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 "fac.cin"
//#include "facp.cin"
//#include "afacc.cin"
#include "ado.cin"
int main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
FILE *o;o=fopen("lofplo.eps","w");ado(o,618,528);
#define M(x,y) fprintf(o,"%6.4lf %6.5lf M\n",0.+x,0.+y);
#define L(x,y) fprintf(o,"%6.4lf %6.5lf L\n",0.+x,0.+y);
fprintf(o,"104 14 translate\n 100 100 scale 2 setlinecap 1 setlinejoin\n");
for(m=-1;m<6;m++){ M(m,0)L(m,5) }
for(n=0;n<6;n++){ M( -1,n)L(5,n)}
fprintf(o,".01 W 0 0 0 RGB S\n");
DO(n,101){ x=.025*n;x=-.82+x*x;y=Re(fac(x)); if(n==0) M(x,y) else L(x,y); if(x>0 && y>5.2) break;}
fprintf(o,".012 W .8 0 0 RGB S\n");
DO(n,101){ x=.025*n;x=-.994+x*x;y=Re(lof(x)); if(n==0) M(x,y) else L(x,y);}
fprintf(o,".022 W 0 0 .8 RGB S\n");
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
       system("epstopdf lofplo.eps");
       system( "open lofplo.pdf");
}
//

Latex generator of curves

%


\documentclass[12pt]{article}
\usepackage{geometry}
\paperwidth 612pt
\paperheight 530pt
\topmargin -96pt
\oddsidemargin -72pt
\pagestyle{empty}
\usepackage{graphicx}
\usepackage{rotating}
\parindent 0pt
\textwidth 1800px
\textheight 1900px
\newcommand \sx {\scalebox}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\begin{document}
\begin{picture}(608,516)
\put(-2,10){\includegraphics{lofplo}}
%\put(20,10){\includegraphics{lofma}}
\put(84,510){\sx{2.3}{$y$}}
\put(84,415){\sx{2.3}{$4$}}
\put(85,315){\sx{2.3}{$3$}}
\put(86,215){\sx{2.3}{$2$}}
\put(86,115){\sx{2.3}{$1$}}
\put(96,1){\sx{2.3}{$0$}}
\put(196,1){\sx{2.3}{$1$}}
\put(296,1){\sx{2.3}{$2$}}
\put(396,1){\sx{2.3}{$3$}}
\put(496,1){\sx{2.3}{$4$}}
\put(596,2){\sx{2.3}{$x$}}
%
\put(336,240){\sx{2.2}{\rot{72}$y\!=\!\mathrm{Factorial}(x)$\ero}}
\put(394,206){\sx{2.4}{\rot{53}$y\!=\!\mathrm{Lof}(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:13, 1 December 2018Thumbnail for version as of 06:13, 1 December 20181,270 × 1,100 (153 KB)Maintenance script (talk | contribs)Importing image file

The following page uses this file:

Metadata