File:ZexPlot.png

From TORI
Jump to: navigation, search
ZexPlot.png(408 × 402 pixels, file size: 10 KB, MIME type: image/png)

Explicit plot of the ArcLambertW function,

$\mathrm{ArcLambertW}(x)=x\cdot \exp(x)$

Generators

C++ generator of the curve

File ado.cin

void ado(FILE *O, int X, int Y)
{       fprintf(O,"%c!PS-Adobe-2.0 EPSF-2.0\n",'%');
       fprintf(O,"%c%cBoundingBox: 0 0 %d %d\n",'%','%',X,Y);
       fprintf(O,"/M {moveto} bind def\n");
       fprintf(O,"/L {lineto} bind def\n");
       fprintf(O,"/S {stroke} bind def\n");
       fprintf(O,"/s {show newpath} bind def\n");
       fprintf(O,"/C {closepath} bind def\n");
       fprintf(O,"/F {fill} bind def\n");
       fprintf(O,"/o {.1 0 360 arc C S} bind def\n");
       fprintf(O,"/times-Roman findfont 20 scalefont setfont\n");
       fprintf(O,"/W {setlinewidth} bind def\n");
       fprintf(O,"/RGB {setrgbcolor} bind def\n");}

should be loaded (if not yet loaded) to the current directory in odrer 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"ado.cin"
#define M(x,y) fprintf(o,"%5.3f %5.3f M\n",0.+x,0.+y);
#define L(x,y) fprintf(o,"%5.3f %5.3f L\n",0.+x,0.+y);

main(){ int j,k,m,n; DB x,y, a;
FILE *o;o=fopen("arclambertw.eps","w");ado(o,410,408);
fprintf(o,"304 104 translate\n 100 100 scale\n");
for(m=-3;m<2;m++){ M(m,-1)L(m,3)}
for(n=-1;n<4;n++){ M(-3,n)L(1,n)}
fprintf(o,".01 W 0 0 0 RGB S\n");
for(n=0;n<410;n+=2){x=-3.02+.01*n; y=x*exp(x); if(n==0)M(x,y) else L(x,y) }
fprintf(o,".03 W 0 .8 0 RGB S\n");
M( 1,    M_E) L(0,    M_E)
M(-1,-1./M_E) L(0,-1./M_E)
fprintf(o,".005 W 0 0 0 RGB S\n");
fprintf(o,"showpage\n%cTrailer",'%'); fclose(o);
system("epstopdf arclambertw.eps");
system(    "open arclambertw.pdf"); //these 2 commands may be specific for macintosh
getchar(); system("killall Preview");// if run at another operational sysetm, may need to modify
}

Latex generator of the lables


% Copyleft 2011 by Dmitrii Kouznetsov%<br>
 \documentclass[12pt]{article} %<br>
 \usepackage{geometry} %<br>
 \usepackage{graphicx} %<br>
 \usepackage{rotating} %<br>
 \paperwidth 410pt %<br>
 \paperheight 404pt %<br>
 \topmargin -103pt %<br>
 \oddsidemargin -94pt %<br>
 \textwidth 1200pt %<br>
 \textheight 600pt %<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>
 { \begin{picture}(408,410) %<br>
 \put(1,9){\ing{arclambertw}} %<br>
 \put(288,398){\sx{2.9}{$y$}} %<br>
 \put(309,378){\sx{3.1}{$\mathrm e$}} %<br>
 \put(288,303){\sx{2.8}{$2$}} %<br>
 \put(288,203){\sx{2.8}{$1$}} %<br>
 \put(288,103){\sx{2.8}{$0$}} %<br>
 \put(309,70){\sx{2.6}{$-\!1/\mathrm e$}} %<br>
 \put( 86, 90){\sx{2.5}{$-\!2$}} %<br>
 \put(186,90){\sx{2.5}{$-\!1$}} %<br>
 % \put(300,-9){\sx{2.5}{$0$}} %<br>
 \put(398,90){\sx{2.6}{$x$}} %<br>
 \end{picture} %<br>
 } %<br>
 \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 2018408 × 402 (10 KB)Maintenance script (talk | contribs)Importing image file
  • You cannot overwrite this file.

The following file is a duplicate of this file (more details):

The following 3 pages link to this file: