File:Logic5T.jpg

Iteration of the Logistic operator $T(z)=5\, z\, (1\!-\!z)$,

$y\!=\!T^n(x)$

versus $x$ for various values of $n$ by.

C++ generator of curves
// Need also ado.cin and efjh.cin

using namespace std; typedef complex z_type;
 * 1) include 
 * 2) include 
 * 3) define DB double
 * 4) define DO(x,y) for(x=0;x<y;x++)
 * 1) include
 * 1) define Re(x) x.real
 * 2) define Im(x) x.imag
 * 3) define I z_type(0.,1.)
 * 4) include "ado.cin"
 * 5) include "efjh.cin"

DB LO(DB x){ return 5.*x*(1.-x);}

int main{ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d; FILE *o;o=fopen("logic5.eps","w");ado(o,130,130); fprintf(o,"2 2 translate\n 100 100 scale\n"); M(0,0)L(1.25,0)L(1.25,1.25)L(0,1.25) fprintf(o,"C .003 W 0 0 0 RGB S\n"); M(0,.25)L(1.25,.25) M(.25,0)L(.25,1.25) M(0,.50)L(1.25,.50) M(.50,0)L(.50,1.25) M(0,.75)L(1.25,.75) M(.75,0)L(.75,1.25) M(0,1.0)L(1.25,1.0) M(1.0,0)L(1.0,1.25) fprintf(o,".001 W 0 0 0 RGB S\n"); fprintf(o,"1 setlinejoin 2 setlinecap\n"); maq(5.);
 * 1) define M(x,y) fprintf(o,"%6.4f %6.4f M\n",0.+x,0.+y);
 * 2) define L(x,y) fprintf(o,"%6.4f %6.4f L\n",0.+x,0.+y);

M(0,0) L(1.25,1.25)fprintf(o,".006 W 1 .3 1 RGB S\n"); M(0,0) DO(m,1521){x=.001*(m+.9); y=LO(x)    ; if(y>=-.1 && y<=1.5)L(x,y) else break;}fprintf(o,".006 W 0 1 1 RGB S\n"); M(0,0) DO(m,1521){x=.001*(m+.9); y=LO(LO(x)) ; if(y>=-.1 && y<=1.5)L(x,y) else break;}fprintf(o,".006 W 0 1 1 RGB S\n");

M(0,0) L(1.25,1.25) fprintf(o,".001 W 0 0 0 RGB S\n"); for(k=1;k<21;k+=1){ M(0,0) DO(m,1521){x=.001*(m+.9);c=F(.1*k+E(x)); y=Re(c);t=Im(c);if(y>=-.1 && y<1.5 && fabs(t)<1.e-9)L(x,y) else break;} } fprintf(o,".001 W 0 0 .5 RGB S\n");

M(0,0) DO(m,1521){x=.001*(m+.9);c=F(-1.+E(x)); y=Re(c);t=Im(c);if(y>=-.1 && y<1.5 && fabs(t)<1.e-9)L(x,y) else break;}fprintf(o,".006 W 1 .5 0 RGB S\n"); M(0,0) DO(m,1521){x=.001*(m+.9);c=F(-2.+E(x)); y=Re(c);t=Im(c);if(y>=-.1 && y<1.5 && fabs(t)<1.e-9)L(x,y) else break;}fprintf(o,".006 W 1 .5 0 RGB S\n");

for(k=1;k<21;k+=1){ M(0,0) DO(m,1521){x=.001*(m+.9);c=F(-.1*k+E(x)); y=Re(c);t=Im(c);if(y>0 && y<1.5 && fabs(t)<1.e-9)L(x,y) else break;} } fprintf(o,".001 W .5 0 0 RGB S\n");

fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); system("epstopdf logic5.eps"); system(   "open logic5.pdf"); getchar; system("killall Preview"); }

Latex generator of curves
\documentclass[12pt]{article} \usepackage{geometry} \paperwidth 1308pt \paperheight 1314pt \topmargin -100pt \oddsidemargin -74pt \textwidth 1540pt \textheight 1740pt \usepackage{graphicx} %\usepackage{overcite} %\usepackage{hyperref} %\usepackage{amssymb} %\usepackage{wrapfig} \usepackage{graphics} \usepackage{rotating} %\setlength{\parskip}{2mm} %\setlength{\parindent}{0mm} \newcommand \ds {\displaystyle} \newcommand \sx {\scalebox} \newcommand \rme {\mathrm{e}} \newcommand \rot {\begin{rotate}} \newcommand \ero {\end{rotate}} \newcommand \ing {\includegraphics} \newcommand \rmi {\mathrm{i}} \newcommand \eL[1] {\iL{#1} \end{eqnarray}} \newcommand \rf[1] {(\ref{#1})} \parindent 0pt \pagestyle{empty} \begin{document} \sx{10}{\begin{picture}(130,131) \put(3,4){\ing{logic5}} \put(0,128){\sx{.7}{$y$}} \put(0,103){\sx{.7}{$1$}} \put(0,54){\sx{.7}{$\frac{1}{2}$}} \put(0,3){\sx{.7}{$0$}} \put(25.2,1){\sx{.5}{$1/4$}} \put(50.4,1){\sx{.5}{$1/2$}} \put(75.6,1){\sx{.5}{$3/4$}} \put(104,.5){\sx{.6}{$1$}} \put(127,1){\sx{.6}{$x$}} \put( 9.9,62){\sx{.7}{\rot{86}$n\!=\!2$\ero}} \put( 19.5,62){\sx{.7}{\rot{73}$n\!=\!1$\ero}} \put( 53.3,93.5){\sx{.64}{\rot{50}$n\!=\!0.5$\ero}} \put( 60.3,92.5){\sx{.64}{\rot{49}$n\!=\!0.4$\ero}} \put( 67.6,92.5){\sx{.64}{\rot{47}$n\!=\!0.3$\ero}} \put( 73.9,90,4){\sx{.64}{\rot{46}$n\!=\!0.2$\ero}} \put( 81,88,4){\sx{.65}{\rot{45}$n\!=\!0.1$\ero}} \put( 88.6,87){\sx{.7}{\rot{44}$n\!=\!0$\ero}} \put( 92,81.5){\sx{.6}{\rot{43}$n\!=\!-0.1$\ero}} \put( 96,76.2){\sx{.6}{\rot{43}$n\!=\!-0.2$\ero}} \put(101,71.5){\sx{.6}{\rot{43}$n\!=\!-0.3$\ero}} \put(103.4,58){\sx{.6}{\rot{42}$n\!=\!-0.5$\ero}} \put(108,32.4){\sx{.7}{\rot{32}$n\!=\!-1$\ero}} \put(106.4,9.4){\sx{.7}{\rot{8}$n\!=\!-2$\ero}} \end{picture}} \end{document}