Difference between revisions of "File:Fracit10t150.jpg"

From TORI
Jump to: navigation, search
(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...)
 
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
[[Iterate of linear fraction]];
 
[[Iterate of linear fraction]];
   
$\displaystyle f(z)=\frac{x}{c+z}$ at $c\!=\!2$.
+
$\displaystyle f(z)=\frac{x}{c+z}$ at $c\!=\!1$.
   
 
In general the $n$th iterate of $f$ can be expressed as follows:
 
In general the $n$th iterate of $f$ can be expressed as follows:
Line 9: Line 9:
   
 
$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$.
  +
  +
For $c=1$, the limit should be considered.
   
 
==Generator of curves==
 
==Generator of curves==
 
// File [[ado.cin]] should be loaded to the working directory in order to compile the [[C++]] code below.
 
// File [[ado.cin]] should be loaded to the working directory in order to compile the [[C++]] code below.
   
//<poem><nomathjax><nowiki>
+
// <poem><nomathjax><nowiki>
  +
#include<math.h>
#inc
 
  +
#include<stdio.h>
  +
#include<stdlib.h>
  +
#define DO(x,y) for(x=0;x<y;x++)
  +
#define DB double
  +
#include"ado.cin"
  +
  +
DB c=1.;
  +
  +
//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("fracit10.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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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 fracit10.eps");
  +
system( "open fracit10.pdf");
  +
}
 
//</nowiki></nomathjax></poem>
 
//</nowiki></nomathjax></poem>
   
Line 22: Line 64:
   
 
% <poem><nomathjax><nowiki>
 
% <poem><nomathjax><nowiki>
  +
\documentclass[12pt]{article}
\do
 
  +
\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{fracit10}}
  +
  +
\put(20,200){\rot{70}\sx{3.2}{$n\!=\!2$}\ero}
  +
\put(40,154){\rot{69}\sx{3.2}{$n\!=\!3$}\ero}
  +
\put(6,122){\rot{22}\sx{3.2}{$n\!=\!4$}\ero}
  +
  +
\put(128, 0){\rot{49}\sx{2.9}{$n\!=\!-4$}\ero}
  +
\put(203, 43){\rot{4}\sx{2.9}{$n\!=\!-3$}\ero}
  +
\put(207,6){\rot{11}\sx{2.9}{$n\!=\!-2$}\ero}
  +
  +
%\put(139,560){\rot{89}\sx{3.2}{$n\!=\!-2$}\ero}
  +
\put(194,560){\rot{87}\sx{3.2}{$n\!=\!-1$}\ero}
  +
\put(252,558){\rot{85}\sx{3}{$n\!=\!-0.5$}\ero}
  +
\put(274,558){\rot{83}\sx{3}{$n\!=\!-0.4$}\ero}
  +
\put(304,558){\rot{79}\sx{3}{$n\!=\!-0.3$}\ero}
  +
\put(352,558){\rot{76}\sx{3}{$n\!=\!-0.2$}\ero}
  +
\put(424,558){\rot{64}\sx{3}{$n\!=\!-0.1$}\ero}
  +
  +
\put(580,567){\rot{45}\sx{3}{$n\!=\!0$}\ero}
  +
\put(610,429){\rot{23}\sx{3}{$n\!=\!0.1$}\ero}
  +
\put(608,343){\rot{14}\sx{3}{$n\!=\!0.2$}\ero}
  +
\put(607,294){\rot{8}\sx{3}{$n\!=\!0.3$}\ero}
  +
\put(606,260){\rot{6}\sx{3}{$n\!=\!0.4$}\ero}
  +
\put(605,236){\rot{4}\sx{3}{$n\!=\!0.5$}\ero}
  +
\put(620,178){\sx{3.2}{$n\!=\!1$}}
  +
\put(620,139){\sx{3.2}{$n\!=\!2$}}
  +
\end{picture}
  +
\end{document}
 
% </nowiki></nomathjax></poem>
 
% </nowiki></nomathjax></poem>
   
Line 28: Line 131:
 
<references/>
 
<references/>
   
  +
[[Category:Book]]
  +
[[Category:BookPlot]]
 
[[Category:C++]]
 
[[Category:C++]]
 
[[Category:Elementary function]]
 
[[Category:Elementary function]]

Latest revision as of 08:36, 1 December 2018

Iterate of linear fraction;

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

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$.

For $c=1$, the limit should be considered.

Generator of curves

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

//


#include<math.h>
#include<stdio.h>
#include<stdlib.h>
#define DO(x,y) for(x=0;x<y;x++)
#define DB double
#include"ado.cin"

DB c=1.;

//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("fracit10.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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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,3501){x=-1.+.002*(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 fracit10.eps");
system( "open fracit10.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{fracit10}}

\put(20,200){\rot{70}\sx{3.2}{$n\!=\!2$}\ero}
\put(40,154){\rot{69}\sx{3.2}{$n\!=\!3$}\ero}
\put(6,122){\rot{22}\sx{3.2}{$n\!=\!4$}\ero}

\put(128, 0){\rot{49}\sx{2.9}{$n\!=\!-4$}\ero}
\put(203, 43){\rot{4}\sx{2.9}{$n\!=\!-3$}\ero}
\put(207,6){\rot{11}\sx{2.9}{$n\!=\!-2$}\ero}

%\put(139,560){\rot{89}\sx{3.2}{$n\!=\!-2$}\ero}
\put(194,560){\rot{87}\sx{3.2}{$n\!=\!-1$}\ero}
\put(252,558){\rot{85}\sx{3}{$n\!=\!-0.5$}\ero}
\put(274,558){\rot{83}\sx{3}{$n\!=\!-0.4$}\ero}
\put(304,558){\rot{79}\sx{3}{$n\!=\!-0.3$}\ero}
\put(352,558){\rot{76}\sx{3}{$n\!=\!-0.2$}\ero}
\put(424,558){\rot{64}\sx{3}{$n\!=\!-0.1$}\ero}

\put(580,567){\rot{45}\sx{3}{$n\!=\!0$}\ero}
\put(610,429){\rot{23}\sx{3}{$n\!=\!0.1$}\ero}
\put(608,343){\rot{14}\sx{3}{$n\!=\!0.2$}\ero}
\put(607,294){\rot{8}\sx{3}{$n\!=\!0.3$}\ero}
\put(606,260){\rot{6}\sx{3}{$n\!=\!0.4$}\ero}
\put(605,236){\rot{4}\sx{3}{$n\!=\!0.5$}\ero}
\put(620,178){\sx{3.2}{$n\!=\!1$}}
\put(620,139){\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
current21:18, 4 August 2013Thumbnail for version as of 21:18, 4 August 20131,466 × 1,466 (564 KB)T (talk | contribs)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...
  • You cannot overwrite this file.

The following page links to this file:

Metadata