Difference between revisions of "File:FacitT.jpg"
(Iterates of Factorial: $y=\mathrm{Factorial}^n(x)$ versus $x$ for various $n$. ==C++ generator of curves== ==Latex generator of labels== Category:Factorial Category:Iterate Category:Superfactorial [[Category:AbelFactoria...) |
(C++) |
||
Line 4: | Line 4: | ||
==[[C++]] generator of curves== |
==[[C++]] generator of curves== |
||
+ | |||
+ | // Do not forget to load all the *.cin mentioned below in the end of the first paragraph of the code! |
||
+ | |||
+ | <poem><nomathjax><nowiki> |
||
+ | #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 "superfac.cin" |
||
+ | #include "abelfac.cin" |
||
+ | #include "ado.cin" |
||
+ | |||
+ | int main(){ int m,n; DB x,y, p,q, t; z_type z,c,d; |
||
+ | #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); |
||
+ | FILE *o;o=fopen("facit.eps","w");ado(o,1002,1002); |
||
+ | fprintf(o,"1 1 translate\n 100 100 scale\n"); |
||
+ | fprintf(o,"1 setlinejoin 2 setlinecap\n"); |
||
+ | |||
+ | DO(m,11){M(m,0)L(m,10)} |
||
+ | DO(n,11){M(0,n)L(10, n)} |
||
+ | fprintf(o,".01 W S\n"); |
||
+ | |||
+ | DO(n,2001){x=.004*n; z=x; c=fac(z); y=Re(c); if(y>10.06) break; if(n==0)M(x,y) else L(x,y);} fprintf(o,".05 W 0 .9 0 RGB S\n"); |
||
+ | DO(n,2001){x=.002*n; z=x; c=fac(fac(z)); y=Re(c); if(y>10.06) break; if(n==0)M(x,y) else L(x,y);} fprintf(o,".05 W 0 .9 0 RGB S\n"); |
||
+ | DO(n,2001){x=.002*n; z=x; c=fac(fac(fac(z))); y=Re(c); if(y>10.06) break; if(n==0)M(x,y) else L(x,y);} fprintf(o,".05 W 0 .9 0 RGB S\n"); |
||
+ | M(0,1)L(2,1)L(2,10)fprintf(o,".03 W 0 .8 0 RGB S\n"); |
||
+ | DO(n,1001){x=.88+.01*n;z=x; c=afacc(z); y=Re(c); if(x>10.02||y>10.06) break; if(n==0)M(x,y) else L(x,y);} fprintf(o,".05 W .9 0 .9 RGB S\n"); |
||
+ | DO(n,1001){x=.95+.01*n;z=x; c=afacc(afacc(z)); y=Re(c); if(x>10.02||y>10.06) break; if(n==0)M(x,y) else L(x,y);} fprintf(o,".05 W .9 0 .9 RGB S\n"); |
||
+ | DO(n,1001){x=.98+.01*n;z=x; c=afacc(afacc(afacc(z))); y=Re(c); if(x>10.02||y>10.06) break; if(n==0)M(x,y) else L(x,y);} fprintf(o,".05 W .9 0 .9 RGB S\n"); |
||
+ | M(1,.48)L(1,2)L(10,2) fprintf(o,".03 W .9 0 .9 RGB S\n"); |
||
+ | |||
+ | DO(m,41){ t=-2.+.1*m; |
||
+ | M(1,1);DO(n,1901){x=1.0005+.005*n; c=abelfac(x); c=superfac(t+c); y=Re(c);if(y>10.06) break; L(x,y);}fprintf(o,".012 W 0 0 0 RGB S\n");} |
||
+ | |||
+ | fprintf(o,"showpage\n\%c%cTrailer",'%','%'); fclose(o); |
||
+ | system("epstopdf facit.eps"); |
||
+ | system( "open facit.pdf"); // macintosh |
||
+ | getchar(); system("killall Preview"); // macintosh |
||
+ | } |
||
+ | |||
+ | </nowiki></nomathjax></poem> |
||
==[[Latex]] generator of labels== |
==[[Latex]] generator of labels== |
||
+ | <poem><nomathjax><nowiki> |
||
+ | </nowiki></nomathjax></poem> |
||
+ | |||
[[Category:Factorial]] |
[[Category:Factorial]] |
Revision as of 20:21, 26 September 2013
$y=\mathrm{Factorial}^n(x)$ versus $x$ for various $n$.
C++ generator of curves
// Do not forget to load all the *.cin mentioned below in the end of the first paragraph of the code!
#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 "superfac.cin"
#include "abelfac.cin"
#include "ado.cin"
int main(){ int m,n; DB x,y, p,q, t; z_type z,c,d;
#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);
FILE *o;o=fopen("facit.eps","w");ado(o,1002,1002);
fprintf(o,"1 1 translate\n 100 100 scale\n");
fprintf(o,"1 setlinejoin 2 setlinecap\n");
DO(m,11){M(m,0)L(m,10)}
DO(n,11){M(0,n)L(10, n)}
fprintf(o,".01 W S\n");
DO(n,2001){x=.004*n; z=x; c=fac(z); y=Re(c); if(y>10.06) break; if(n==0)M(x,y) else L(x,y);} fprintf(o,".05 W 0 .9 0 RGB S\n");
DO(n,2001){x=.002*n; z=x; c=fac(fac(z)); y=Re(c); if(y>10.06) break; if(n==0)M(x,y) else L(x,y);} fprintf(o,".05 W 0 .9 0 RGB S\n");
DO(n,2001){x=.002*n; z=x; c=fac(fac(fac(z))); y=Re(c); if(y>10.06) break; if(n==0)M(x,y) else L(x,y);} fprintf(o,".05 W 0 .9 0 RGB S\n");
M(0,1)L(2,1)L(2,10)fprintf(o,".03 W 0 .8 0 RGB S\n");
DO(n,1001){x=.88+.01*n;z=x; c=afacc(z); y=Re(c); if(x>10.02||y>10.06) break; if(n==0)M(x,y) else L(x,y);} fprintf(o,".05 W .9 0 .9 RGB S\n");
DO(n,1001){x=.95+.01*n;z=x; c=afacc(afacc(z)); y=Re(c); if(x>10.02||y>10.06) break; if(n==0)M(x,y) else L(x,y);} fprintf(o,".05 W .9 0 .9 RGB S\n");
DO(n,1001){x=.98+.01*n;z=x; c=afacc(afacc(afacc(z))); y=Re(c); if(x>10.02||y>10.06) break; if(n==0)M(x,y) else L(x,y);} fprintf(o,".05 W .9 0 .9 RGB S\n");
M(1,.48)L(1,2)L(10,2) fprintf(o,".03 W .9 0 .9 RGB S\n");
DO(m,41){ t=-2.+.1*m;
M(1,1);DO(n,1901){x=1.0005+.005*n; c=abelfac(x); c=superfac(t+c); y=Re(c);if(y>10.06) break; L(x,y);}fprintf(o,".012 W 0 0 0 RGB S\n");}
fprintf(o,"showpage\n\%c%cTrailer",'%','%'); fclose(o);
system("epstopdf facit.eps");
system( "open facit.pdf"); // macintosh
getchar(); system("killall Preview"); // macintosh
}
Latex generator of labels
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 20:14, 26 September 2013 | 2,092 × 2,092 (891 KB) | T (talk | contribs) | Iterates of Factorial: $y=\mathrm{Factorial}^n(x)$ versus $x$ for various $n$. ==C++ generator of curves== ==Latex generator of labels== Category:Factorial Category:Iterate Category:Superfactorial [[Category:AbelFactoria... |
You cannot overwrite this file.
File usage
The following page uses this file: