Bifurcation - Maple Help

IterativeMaps

 Bifurcation
 image generator for bifurcation diagrams

 Calling Sequence Bifurcation( vars, exprlist, init, rmin, rmax ) Bifurcation( vars, exprlistlist, init, rmin, rmax, probabilities ) Bifurcation( vars, exprlist, init, rmin, rmax, opts ) Bifurcation( vars, exprlistlist, init, rmin, rmax, probabilities, opts )

Parameters

 vars - list of names, with length greater than or equal to 1, specifying the variables of the iterative function. The first variable represents the vertical axis in the bifurcation diagram exprlist - list of algebraic expressions defining the iterative function on vars. exprlist must be of the same length as vars. exprlistlist - list of lists of algebraic expressions defining the iterative functions on vars, with probabilities defined by probabilities. Each list of expressions must be of the same length as vars. init - list of numeric real values, with the same length as vars, specifying the initial values of vars rmin - real value determining the minimum value of rvariable used in the diagram rmax - real value determining the maximum value of rvariable used in the diagram probabilities - (optional) list of positive real numbers, such that $\frac{{\mathrm{probabilities}}_{i}}{\sum _{i=1}^{N}{\mathrm{probabilities}}_{i}}$, where N is the length of probabilities, defines the probability that the ith expression list in exprlistlist will be used for ${F}_{j}$ on the jth iteration, as explained below. The length of probabilities must be of the same length as the number of lists in exprlistlist. The default value is [1]

Options

 • iterations : keyword option of the form iterations=val, where val is a posint specifying the number of times the function defined by exprs will be applied. The default value is 10000.
 • outputimage : keyword option of the form outputimage=img where img is a color image as used by the ImageTools package, with dimensions of height and width. Attractor will fill img with the generated image defined below.
 • height : keyword option of the form height=val, where val is a positive integer specifying the height of the image. If outputimage is defined the default value is the height of outputimage. Otherwise, the default value is 500.
 • width : keyword option of the form width=val, where val is a positive integer specifying the width of the image. If outputimage is defined the default value is the width of outputimage. Otherwise, the default value is 500.
 • xmin : keyword option of the form xmin=val, where val is a real number specifying the minimum value displayed on the vertical axis. The default value is ${\mathrm{init}}_{1}-1$
 • xmax : keyword option of the form xmax=val, where val is a real number specifying the maximum value displayed on the vertical axis. The default value is ${\mathrm{init}}_{1}+1$
 • rvariable : keyword option of the form rvariable=param, where param is a name specifying the parameter in exprs that will be varied along the horizontal axis. The default value is $r$
 • loopvariable : keyword option of the form loopvariable=var, where var is a name specifying the variable representing the current iteration index. The default value is $i$
 • redvariable : keyword option of the form redvariable=var, where var is a name specifying the red color variable at the current position in the image. The default value is $R$
 • greenvariable : keyword option of the form greenvariable=var, where var is a name specifying the green color variable at the current position in the image. The default value is $G$
 • bluevariable : keyword option of the form bluevariable=var, where var is a name specifying the blue color variable at the current position in the image. The default value is $B$
 • redexpression : keyword option of the form redexpression=expr, where expr is an expression defining the coloring procedure of the red color value at the current position the image. If redexpression=$\mathrm{null}$ then no procedure is applied to the red value at the current point. The default value is $R+1$
 • greenexpression : keyword option of the form greenexpression=expr, where expr is an expression defining the coloring procedure of the green color value at the current position the image. If greenexpression=$\mathrm{null}$ then no procedure is applied to the green value at the current point. The default value is $\mathrm{null}$
 • blueexpression : keyword option of the form blueexpression=expr, where expr is an expression defining the coloring procedure of the blue color value at the current position the image. If blueexpression=$\mathrm{null}$ then no procedure is applied to the blue value at the current point.The default value is $\mathrm{null}$

Description

 • The Bifurcation module generates an Array image for an iterative function (rvariable against the first variable in vars) being applied iter times, to a domain of equally spaced rvariable values.
 • Within the domain [rmin, rmax], rvariable values will be selected at equally spaced intervals.
 • For each r value, starting at the point ${X}_{0}$=init in ${ℝ}^{N}$, where N is the number of variables in vars, the sequence ${X}_{n}$=$F\left({X}_{n-1}\right)$, 0 $\le n\le$iterations, is generated.
 • The function $F:{ℝ}^{n}\to {ℝ}^{n}$, is defined by the following algorithm:
 Start at the point ${X}_{n}=\left({X}_{n,1},\mathrm{..},{X}_{n,N}\right)$, $j=1$
 Apply the function ${F}_{j}$ to the current point: $y={F}_{j}\left({X}_{n}\right)$
 Replace the jth component of ${X}_{n}$ with $y$: ${X}_{n}=\left({X}_{n,1},\mathrm{..},{X}_{n,j-1},y,\mathrm{..},{X}_{n,N}\right)$
 Increment j by 1, $j=j+1$ and repeat the process with the new ${X}_{n}$. Stop when $j=N+1$, where $N$ is the number of variables in vars.
 • Each ${F}_{j}$ is defined by evaluating ${\mathrm{exprlist}}_{j}$ at the current values of the variables in vars.
 • If given an exprlistlist, then one of the functions in exprlistlist will be randomly selected to be applied to ${X}_{n}$, for each 0 $\le n\le$iterations-1. The probability that the ith function defined in exprlistlist is applied to ${X}_{n}$ is equal to $\frac{{\mathrm{probabilities}}_{i}}{\sum _{i=1}^{N}{\mathrm{probabilities}}_{i}}$.
 • Whenever this process yields a point ${X}_{n}$, the values rvariable, ${X}_{n,1}$ are examined to find which pixel in the image they correspond to. Then, the expressions $\mathrm{redexpression}$, $\mathrm{greenexpression}$, $\mathrm{blueexpression}$ are evaluated, substituting the values ${X}_{n,1},\mathrm{...},{X}_{n,N}$ for the variables ${\mathrm{vars}}_{1},\mathrm{...},{\mathrm{vars}}_{N}$, and the current red, green, and blue values of that pixel for the variables $\mathrm{redvariable}$, $\mathrm{greenvariable}$, and $\mathrm{bluevariable}$, respectively.
 • The red, green, and blue values of the pixel are then updated to the newly evaluated values.
 • If a coloring expression is $\mathrm{null}$ then the color, corresponding to the expression, of the pixel will be unchanged
 • Note that redexpression, greenexpression, blueexpression are applied to an image as defined by ImageTools:-Image, thus the minimum and maximum color values are 0 and 1 respectively.
 • Bifurcation returns an image containing the diagram described above. Further coloring procedures, defined in ImageTools, can be applied to the image.
 • The default $\mathrm{redexpression}$, $\mathrm{greenexpression}$, $\mathrm{blueexpression}$ return an image that is designed to be used with ImageTools:-ColouringProcedures:-HueToRGB.

Examples

 > $\mathrm{with}\left(\mathrm{IterativeMaps}\right):$
 > $\mathrm{with}\left(\mathrm{ImageTools}\right):$
 > $\mathrm{Logistic}≔\mathrm{Bifurcation}\left(\left[x\right],\left[rx\left(1-x\right)\right],\left[0.5\right],2.5,4\right):$
 > $\mathrm{ArrayTools}:-\mathrm{Dimensions}\left(\mathrm{Logistic}\right)$
 $\left[{1}{..}{500}{,}{1}{..}{500}{,}{1}{..}{3}\right]$ (5.1)
 > $\mathrm{ColouringProcedures}:-\mathrm{HueToRGB}\left(\mathrm{Logistic}\right):$
 > $\mathrm{Embed}\left(\mathrm{Logistic}\right)$

 > $\mathrm{LogisticZoom}≔\mathrm{Bifurcation}\left(\left[x\right],\left[rx\left(1-x\right)\right],\left[0.5\right],3.7,3.8,\mathrm{xmin}=0.15,\mathrm{xmax}=0.95,\mathrm{width}=160,\mathrm{height}=500\right):$
 > $\mathrm{ArrayTools}:-\mathrm{Dimensions}\left(\mathrm{LogisticZoom}\right)$
 $\left[{1}{..}{500}{,}{1}{..}{160}{,}{1}{..}{3}\right]$ (5.2)
 > $\mathrm{ColouringProcedures}:-\mathrm{HueToRGB}\left(\mathrm{LogisticZoom}\right):$
 > $\mathrm{Embed}\left(\mathrm{LogisticZoom}\right)$

 > $\mathrm{LogisticTentMix}≔\mathrm{Bifurcation}\left(\left[x\right],\left[\left[rx\left(1-x\right)\right],\left[r\mathrm{min}\left(x,1-x\right)\right]\right],\left[0.5\right],1,2,\left[\frac{1}{2},\frac{1}{2}\right]\right):$
 > $\mathrm{ArrayTools}:-\mathrm{Dimensions}\left(\mathrm{LogisticTentMix}\right)$
 $\left[{1}{..}{500}{,}{1}{..}{500}{,}{1}{..}{3}\right]$ (5.3)
 > $\mathrm{ColouringProcedures}:-\mathrm{HueToRGB}\left(\mathrm{LogisticTentMix}\right):$
 > $\mathrm{Embed}\left(\mathrm{LogisticTentMix}\right)$

 > $\mathrm{xD}≔\mathrm{Step}\left(-y-z\right)$
 ${\mathrm{xD}}{≔}{\mathrm{Step}}{}\left({-}{y}{-}{z}\right)$ (5.4)
 > $\mathrm{xProc}≔x+\mathrm{xD}$
 ${\mathrm{xProc}}{≔}{x}{+}{\mathrm{Step}}{}\left({-}{y}{-}{z}\right)$ (5.5)
 > $\mathrm{yD}≔\mathrm{Step}\left(\mathrm{tx}+0.2y\right)$
 ${\mathrm{yD}}{≔}{\mathrm{Step}}{}\left({\mathrm{tx}}{+}{0.2}{}{y}\right)$ (5.6)
 > $\mathrm{yProc}≔y+\mathrm{yD}$
 ${\mathrm{yProc}}{≔}{y}{+}{\mathrm{Step}}{}\left({\mathrm{tx}}{+}{0.2}{}{y}\right)$ (5.7)
 > $\mathrm{zD}≔\mathrm{Step}\left(0.2+z\left(\mathrm{tx}-r\right)\right)$
 ${\mathrm{zD}}{≔}{\mathrm{Step}}{}\left({0.2}{+}{z}{}\left({\mathrm{tx}}{-}{r}\right)\right)$ (5.8)
 > $\mathrm{zProc}≔z+\mathrm{zD}$
 ${\mathrm{zProc}}{≔}{z}{+}{\mathrm{Step}}{}\left({0.2}{+}{z}{}\left({\mathrm{tx}}{-}{r}\right)\right)$ (5.9)
 > $\mathrm{Step}≔0.01$
 ${\mathrm{Step}}{≔}{0.01}$ (5.10)
 > $\mathrm{Rossler}≔\mathrm{Bifurcation}\left(\left['a',x,y,z,\mathrm{tx},\mathrm{ty}\right],\left[\left[{x}^{2}+{y}^{2},\mathrm{xProc},\mathrm{yProc},\mathrm{zProc},x,y\right]\right],\left[0.1,0.1,0.1,0.1,0.1,0.1\right],0,8,\mathrm{xmin}=0,\mathrm{xmax}=300,\mathrm{iterations}=30000\right):$
 > $\mathrm{ArrayTools}:-\mathrm{Dimensions}\left(\mathrm{Rossler}\right)$
 $\left[{1}{..}{500}{,}{1}{..}{500}{,}{1}{..}{3}\right]$ (5.11)
 > $\mathrm{ColouringProcedures}:-\mathrm{HueToRGB}\left(\mathrm{Rossler}\right):$
 > $\mathrm{Embed}\left(\mathrm{Rossler}\right)$

Compatibility

 • The IterativeMaps:-Bifurcation command was introduced in Maple 2015.