 Fractals[EscapeTime] - Maple Programming Help

Home : Support : Online Help : Mathematics : Fractals : Fractals/EscapeTime/Newton

Fractals[EscapeTime]

 Newton
 Newton fractal generator

 Calling Sequence Newton( n, zbl, zur, expr ) Newton( n, zbl, zur, expr, opts )

Parameters

 n - positive integer; specifies the dimensions of the square Array output zbl - complex(realcons); the bottom left corner of a box in the complex plane zur - complex(realcons); the upper right corner of a box in the complex plane expr - algebraic; the univariate expression to which the iterative Newton process will be applied opts - (optional) keyword options of the form opt=value where opt and value are described below

Options

 • output : keyword option of the form output=value where value is a name or list of names denoting the returned Array image(s). The accepted names are layer1, layer2, color, or raw. The default value is color.
 • iterationlimit : keyword option of the form iterationlimit=value where value is a positive integer specifying the number of iterations the formula is applied. The default value is 25.
 • tolerance : keyword option of the form tolerance=value where value is positive and of type realcons. The iterative process is stopped for each complex input point if convergence is ascertained. The default value is 0.001.
 • container : An n-by-n-by-2 Array with datatype=float and order=Fortran_order used in-place to store the raw data.

Description

 • The Newton command generates Array images which provide a visualization of the Newton fractal. The entries of the image are shaded according to the behavior of complex input points under the iterative Newton rootfinding process. For each complex input point z a sequence of points z[i] are computed until either a final point meets a convergence criterion (escapes) or the iteration limit is exceeded.
 • If the unknown variable in expr is, say, w and the derivative with respect to w is taken as dexpr then the iterates are computed by the formula,

$\mathrm{inc}=\frac{\genfrac{}{}{0}{}{\mathrm{expr}}{\phantom{w={z}_{i-1}}}|\genfrac{}{}{0}{}{\phantom{\mathrm{expr}}}{w={z}_{i-1}}}{\genfrac{}{}{0}{}{\mathrm{dexpr}}{\phantom{w={z}_{i-1}}}|\genfrac{}{}{0}{}{\phantom{\mathrm{dexpr}}}{w={z}_{i-1}}}$

${z}_{i}={z}_{i-1}-\mathrm{inc}$

 • Convergence is accepted if either abs(inc)/abs(z[i])
 • The 2-D grayscale Array image returned by supplying the option output=layer1 contains data denoting the number of iterations required for each entry to escape. The grayscale image returned by supplying the option output=layer2 contains the absolute values of the final values for entries which escape. For either layer the real data is scaled to 0.0 .. 1.0 before being returned as an image.
 • The 3-D color Array image returned by supplying the option output=color contains data where the three layers corresponding to red, green, and blue have been computed using the raw escape data.
 • The 3-D Array returned by supplying the option output=raw contains the unscaled data of layer1 and layer2. This Array can be used to generate a customized color image using the Colorize command.

Examples

 > $\mathrm{with}\left(\mathrm{Fractals}:-\mathrm{EscapeTime}\right)$
 $\left[{\mathrm{BurningShip}}{,}{\mathrm{Colorize}}{,}{\mathrm{HSVColorize}}{,}{\mathrm{Julia}}{,}{\mathrm{LColorize}}{,}{\mathrm{Lyapunov}}{,}{\mathrm{Mandelbrot}}{,}{\mathrm{Newton}}\right]$ (5.1)
 > $\mathrm{with}\left(\mathrm{ImageTools}\right):$
 > $\mathrm{bl},\mathrm{ur}≔-6-6I,6+6I$
 ${\mathrm{bl}}{,}{\mathrm{ur}}{≔}{-6}{-}{6}{}{I}{,}{6}{+}{6}{}{I}$ (5.2)
 > $f≔{t}^{3}-{t}^{2}-12$
 ${f}{≔}{{t}}^{{3}}{-}{{t}}^{{2}}{-}{12}$ (5.3)
 > $M≔\mathrm{Newton}\left(500,\mathrm{bl},\mathrm{ur},f\right)$
 ${{\mathrm{_rtable}}}_{{18446883779707828934}}$ (5.4)
 > $\mathrm{Embed}\left(M\right)$ > $\mathrm{Embed}\left(\mathrm{Newton}\left(500,\mathrm{bl},\mathrm{ur},f,\mathrm{output}=\mathrm{layer1}\right)\right)$ > $\mathrm{Embed}\left(\left[\left[\mathrm{Newton}\left(200,\mathrm{bl},\mathrm{ur},f,\mathrm{iterationlimit}=18,\mathrm{output}=\left[\mathrm{layer1},\mathrm{color}\right]\right)\right],\left[\mathrm{Newton}\left(200,\mathrm{bl},\mathrm{ur},f,\mathrm{iterationlimit}=30,\mathrm{output}=\left[\mathrm{layer1},\mathrm{color}\right]\right)\right],\left[\mathrm{Newton}\left(200,\mathrm{bl},\mathrm{ur},f,\mathrm{iterationlimit}=150,\mathrm{output}=\left[\mathrm{layer1},\mathrm{color}\right]\right)\right]\right]\right)$      > $\mathrm{bl},\mathrm{ur}≔-2-2I,2+2I$
 ${\mathrm{bl}}{,}{\mathrm{ur}}{≔}{-2}{-}{2}{}{I}{,}{2}{+}{2}{}{I}$ (5.5)
 > $f≔{z}^{4}+2{z}^{3}-100$
 ${f}{≔}{{z}}^{{4}}{+}{2}{}{{z}}^{{3}}{-}{100}$ (5.6)
 > $\mathrm{Embed}\left(\mathrm{Newton}\left(500,\mathrm{bl},\mathrm{ur},f\right)\right)$ > $\mathrm{Embed}\left(\left[\mathrm{Newton}\left(500,\mathrm{bl},\mathrm{ur},f,\mathrm{output}=\left[\mathrm{layer1},\mathrm{layer2},\mathrm{color}\right]\right)\right]\right)$   > $\mathrm{bl},\mathrm{ur}≔-2-2I,2+2I$
 ${\mathrm{bl}}{,}{\mathrm{ur}}{≔}{-2}{-}{2}{}{I}{,}{2}{+}{2}{}{I}$ (5.7)
 > $f≔\mathrm{cosh}\left(t\right)+3$
 ${f}{≔}{\mathrm{cosh}}{}\left({t}\right){+}{3}$ (5.8)
 > $\mathrm{Embed}\left(\mathrm{Newton}\left(500,\mathrm{bl},\mathrm{ur},f\right)\right)$ > 

Compatibility

 • The Fractals:-EscapeTime:-Newton command was introduced in Maple 18.