Difference between revisions of "File:Fracit20t150.jpg"

From TORI
Jump to navigation Jump to search
(Iterate of the linear fraction function $\displaystyle f(z)=\frac{x}{c+z}$ at $c\!=\!2$. In general the $n$th iterate of $f$ can be expressed as follows: $\displaystyle f^n(z)=\frac{z}{c^n+\frac{1-c^n}{1-c} z}$ $y=f^n(x)$ is plotted versus $x$...)
 
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Iterate]] of the linear fraction function
+
[[Iterate of linear fraction]];
  +
 
$\displaystyle f(z)=\frac{x}{c+z}$ at $c\!=\!2$.
 
$\displaystyle f(z)=\frac{x}{c+z}$ at $c\!=\!2$.
   
Line 9: Line 10:
 
$y=f^n(x)$ is plotted versus $x$ for various values of $n$.
 
$y=f^n(x)$ is plotted versus $x$ for various values of $n$.
   
  +
==Generator of curves==
[[Category:Linear fraction]]
 
  +
// File [[ado.cin]] should be loaded to the working directory in order to compile the [[C++]] code below.
[[Category:Iterate]]
 
  +
[[Category:Iterate of the linear fraction]]
 
  +
//<poem><nomathjax><nowiki>
  +
#include<stdio.h>
  +
#include<stdlib.h>
  +
#define DO(x,y) for(x=0;x<y;x++)
  +
#define DB double
  +
#include"ado.cin"
  +
DB c=2.;
  +
//DB F(DB n,DB x){ DB cn=pow(c,n); DB r=(1.-cn)/(1.-c); return x/( cn + r*x); }
  +
DB F(DB n,DB x){ if(c==1.) return x/(1.+n*x); DB cn=pow(c,n); DB r=(1.-cn)/(1.-c); return x/( cn + r*x); }
  +
  +
main(){ FILE *o; int m,n,k; DB x,y,t;
  +
o=fopen("fracit20.eps","w");
  +
ado(o,702,702);
  +
#define M(x,y) fprintf(o,"%7.4f %7.4f M\n",0.+x,0.+y);
  +
#define L(x,y) fprintf(o,"%7.4f %7.4f L\n",0.+x,0.+y);
  +
fprintf(o,"101 101 translate 100 100 scale 2 setlinecap\n");
  +
for(n=-1;n<7;n++) { M(-1,n)L(6,n)}
  +
for(m=-1;m<7;m++) { M(m,-1)L(m,6)}
  +
fprintf(o,".01 W S\n");
  +
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F(-4.,x);if(y>-10.4&&y<10.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 1 0 1 RGB S\n");
  +
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F(-3.,x);if(y>-8.4&&y<8.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 1 0 1 RGB S\n");
  +
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F(-2.,x);if(y>-7.4&&y<7.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 1 0 1 RGB S\n");
  +
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F(-1.,x);if(y>-7.4&&y<7.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 1 0 1 RGB S\n");
  +
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F( 1.,x);if(y>-7.4&&y<7.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 0 1 0 RGB S\n");
  +
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F( 2.,x);if(y>-7.4&&y<7.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 0 1 0 RGB S\n");
  +
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F( 3.,x);if(y>-8.4&&y<8.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 0 1 0 RGB S\n");
  +
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F( 4.,x);if(y>-10.4&&y<10.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 0 1 0 RGB S\n");
  +
DO(k,41){ t=-2.+.1*k;
  +
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F(t,x);if(y>-7.2&&y<7.2){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".01 W 0 0 0 RGB S\n");
  +
}
  +
fprintf(o,"showpage\n"); fprintf(o,"%c%cTrailer\n",'%','%');
  +
fclose(o);
  +
system("epstopdf fracit20.eps");
  +
system( "open fracit20.pdf");
  +
}
  +
//</nowiki></nomathjax></poem>
  +
  +
==Latex generator of labels==
  +
  +
%File [[Fracit20t.pdf]] should be generated with the code above in order to compile the [[Latex]] document below.
  +
  +
% <poem><nomathjax><nowiki>
  +
\documentclass[12pt]{article}
  +
\paperwidth 706pt
  +
\paperheight 706pt
  +
\textwidth 800pt
  +
\textheight 800pt
  +
\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}%H0H1H2HHHHHHHHHHHHHH
  +
\begin{picture}(704,704)
  +
\put(79,684){\sx{3}{$y$}}
  +
\put(79,592){\sx{3}{$5$}}
  +
\put(79,492){\sx{3}{$4$}}
  +
\put(79,392){\sx{3}{$3$}}
  +
\put(79,292){\sx{3}{$2$}}
  +
\put(79,192){\sx{3}{$1$}}
  +
\put(79,92){\sx{3}{$0$}}
  +
\put(94,74){\sx{3}{$0$}}
  +
\put(194,74){\sx{3}{$1$}}
  +
\put(294,74){\sx{3}{$2$}}
  +
\put(394,74){\sx{3}{$3$}}
  +
\put(494,74){\sx{3}{$4$}}
  +
\put(594,74){\sx{3}{$5$}}
  +
\put(686,75){\sx{3}{$x$}}
  +
%\put(0,0){\ing{fracit05}}
  +
%\put(0,0){\ing{fracit10}}
  +
\put(0,0){\ing{fracit20}}
  +
  +
%\put(139,560){\rot{89}\sx{3.2}{$n\!=\!-2$}\ero}
  +
\put(182,560){\rot{87}\sx{3.2}{$n\!=\!-1$}\ero}
  +
\put(250,558){\rot{83}\sx{3}{$n\!=\!-0.5$}\ero}
  +
\put(278,558){\rot{82}\sx{3}{$n\!=\!-0.4$}\ero}
  +
\put(313,558){\rot{78}\sx{3}{$n\!=\!-0.3$}\ero}
  +
\put(363,558){\rot{72}\sx{3}{$n\!=\!-0.2$}\ero}
  +
\put(440,558){\rot{62}\sx{3}{$n\!=\!-0.1$}\ero}
  +
  +
\put(580,567){\rot{45}\sx{3}{$n\!=\!0$}\ero}
  +
\put(610,444){\rot{29}\sx{3}{$n\!=\!0.1$}\ero}
  +
\put(608,358){\rot{17}\sx{3}{$n\!=\!0.2$}\ero}
  +
\put(607,303){\rot{11}\sx{3}{$n\!=\!0.3$}\ero}
  +
\put(606,265){\rot{8}\sx{3}{$n\!=\!0.4$}\ero}
  +
\put(605,238){\rot{5}\sx{3}{$n\!=\!0.5$}\ero}
  +
\put(620,166){\sx{3.2}{$n\!=\!1$}}
  +
\put(620,120){\sx{3.2}{$n\!=\!2$}}
  +
\end{picture}
  +
\end{document}
  +
% </nowiki></nomathjax></poem>
  +
  +
==References==
  +
<references/>
  +
  +
[[Category:Book]]
  +
[[Category:BookPlot]]
  +
[[Category:C++]]
 
[[Category:Elementary function]]
 
[[Category:Elementary function]]
 
[[Category:Explicit plot]]
 
[[Category:Explicit plot]]
  +
[[Category:Iterate]]
  +
[[Category:Iterate of linear fraction]]
  +
[[Category:Latex]]
  +
[[Category:Linear fraction]]

Latest revision as of 08:36, 1 December 2018

Iterate of linear fraction;

$\displaystyle f(z)=\frac{x}{c+z}$ at $c\!=\!2$.

In general the $n$th iterate of $f$ can be expressed as follows:

$\displaystyle f^n(z)=\frac{z}{c^n+\frac{1-c^n}{1-c} z}$

$y=f^n(x)$ is plotted versus $x$ for various values of $n$.

Generator of curves

// File ado.cin should be loaded to the working directory in order to compile the C++ code below.

//


#include<stdio.h>
#include<stdlib.h>
#define DO(x,y) for(x=0;x<y;x++)
#define DB double
#include"ado.cin"
DB c=2.;
//DB F(DB n,DB x){ DB cn=pow(c,n); DB r=(1.-cn)/(1.-c); return x/( cn + r*x); }
DB F(DB n,DB x){ if(c==1.) return x/(1.+n*x); DB cn=pow(c,n); DB r=(1.-cn)/(1.-c); return x/( cn + r*x); }

main(){ FILE *o; int m,n,k; DB x,y,t;
o=fopen("fracit20.eps","w");
ado(o,702,702);
#define M(x,y) fprintf(o,"%7.4f %7.4f M\n",0.+x,0.+y);
#define L(x,y) fprintf(o,"%7.4f %7.4f L\n",0.+x,0.+y);
fprintf(o,"101 101 translate 100 100 scale 2 setlinecap\n");
for(n=-1;n<7;n++) { M(-1,n)L(6,n)}
for(m=-1;m<7;m++) { M(m,-1)L(m,6)}
fprintf(o,".01 W S\n");
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F(-4.,x);if(y>-10.4&&y<10.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 1 0 1 RGB S\n");
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F(-3.,x);if(y>-8.4&&y<8.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 1 0 1 RGB S\n");
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F(-2.,x);if(y>-7.4&&y<7.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 1 0 1 RGB S\n");
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F(-1.,x);if(y>-7.4&&y<7.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 1 0 1 RGB S\n");
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F( 1.,x);if(y>-7.4&&y<7.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 0 1 0 RGB S\n");
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F( 2.,x);if(y>-7.4&&y<7.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 0 1 0 RGB S\n");
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F( 3.,x);if(y>-8.4&&y<8.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 0 1 0 RGB S\n");
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F( 4.,x);if(y>-10.4&&y<10.4){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".03 W 0 1 0 RGB S\n");
DO(k,41){ t=-2.+.1*k;
n=0;DO(m,1401){x=-1.+.005*(m-.5);y=F(t,x);if(y>-7.2&&y<7.2){ if(n==0){M(x,y) n=1;}else L(x,y)} else n=0;} fprintf(o,".01 W 0 0 0 RGB S\n");
}
fprintf(o,"showpage\n"); fprintf(o,"%c%cTrailer\n",'%','%');
fclose(o);
system("epstopdf fracit20.eps");
system( "open fracit20.pdf");
}
//

Latex generator of labels

%File Fracit20t.pdf should be generated with the code above in order to compile the Latex document below.

%


\documentclass[12pt]{article}
\paperwidth 706pt
\paperheight 706pt
\textwidth 800pt
\textheight 800pt
\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}%H0H1H2HHHHHHHHHHHHHH
\begin{picture}(704,704)
\put(79,684){\sx{3}{$y$}}
\put(79,592){\sx{3}{$5$}}
\put(79,492){\sx{3}{$4$}}
\put(79,392){\sx{3}{$3$}}
\put(79,292){\sx{3}{$2$}}
\put(79,192){\sx{3}{$1$}}
\put(79,92){\sx{3}{$0$}}
\put(94,74){\sx{3}{$0$}}
\put(194,74){\sx{3}{$1$}}
\put(294,74){\sx{3}{$2$}}
\put(394,74){\sx{3}{$3$}}
\put(494,74){\sx{3}{$4$}}
\put(594,74){\sx{3}{$5$}}
\put(686,75){\sx{3}{$x$}}
%\put(0,0){\ing{fracit05}}
%\put(0,0){\ing{fracit10}}
\put(0,0){\ing{fracit20}}

%\put(139,560){\rot{89}\sx{3.2}{$n\!=\!-2$}\ero}
\put(182,560){\rot{87}\sx{3.2}{$n\!=\!-1$}\ero}
\put(250,558){\rot{83}\sx{3}{$n\!=\!-0.5$}\ero}
\put(278,558){\rot{82}\sx{3}{$n\!=\!-0.4$}\ero}
\put(313,558){\rot{78}\sx{3}{$n\!=\!-0.3$}\ero}
\put(363,558){\rot{72}\sx{3}{$n\!=\!-0.2$}\ero}
\put(440,558){\rot{62}\sx{3}{$n\!=\!-0.1$}\ero}

\put(580,567){\rot{45}\sx{3}{$n\!=\!0$}\ero}
\put(610,444){\rot{29}\sx{3}{$n\!=\!0.1$}\ero}
\put(608,358){\rot{17}\sx{3}{$n\!=\!0.2$}\ero}
\put(607,303){\rot{11}\sx{3}{$n\!=\!0.3$}\ero}
\put(606,265){\rot{8}\sx{3}{$n\!=\!0.4$}\ero}
\put(605,238){\rot{5}\sx{3}{$n\!=\!0.5$}\ero}
\put(620,166){\sx{3.2}{$n\!=\!1$}}
\put(620,120){\sx{3.2}{$n\!=\!2$}}
\end{picture}
\end{document}
%

References

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current20:59, 4 August 2013Thumbnail for version as of 20:59, 4 August 20131,466 × 1,466 (463 KB)T (talk | contribs)Iterate of the linear fraction function $\displaystyle f(z)=\frac{x}{c+z}$ at $c\!=\!2$. In general the $n$th iterate of $f$ can be expressed as follows: $\displaystyle f^n(z)=\frac{z}{c^n+\frac{1-c^n}{1-c} z}$ $y=f^n(x)$ is plotted versus $x$...

The following page uses this file:

Metadata