Solver Functions 

Solver Functions SupportThe Fractal Science Kit fractal generator Solver functions allow you to produce Newton fractals and other rootfinding method based fractals. The Fractal Science Kit fractal generator Solver functions support the following rootfinding methods: Newton's method, Schroder's method, Halley's method, Whittaker's method, Cauchy's method, the SuperNewton method (also called Householder's method), the SuperHalley method, the ChebyshevHalley family of methods, and the CIterative family of methods. Developers can set up a program to examine the fractals associated with these methods with just a few lines of code. Solver.Apply(method, methodArg, z, f0, f1, f2) Solver.Apply applies the given method and methodArg to the value z and returns a value closer (hopefully) to a root of the associated function. The values of f0, f1, and f2, are the function evaluated at the value z and the 1^{st} and 2^{nd} derivative also evaluated at z. Solver.ApplyToPolynomial is more efficient and easier to set up but can only be used for polynomial based equations. This function computes the 1^{st} and 2^{nd} derivatives of the polynomial function defined by the coefficients in the coef[] array, and applies the given rootfinding method to the value z. The number of elements in the coef[] array defines the degree of the polynomial (e.g., a 5^{th} degree polynomial would have 6 values) and any terms missing in the equation must have a 0 coefficient. The coefficients are ordered from high to low in the array; i.e., the coefficient associated with the term with the highest degree is in the array at index 0. The degree of the polynomial must be greater than 0. Solver.ApplyToPolynomial is highly optimized. Example: comment: This Fractal Equation defines the coefficients of the base equation in an array called coef[] and simply calls Solver.ApplyToPolynomial to apply the rootfinding method SolverMethod to the value z. In this example, the degree of the polynomial is 5 since the number of elements in the array is 6, and the coefficient of the next to last term (i.e., the coefficient for the z term) is 0. Notice how we set coef[5]=c if we are processing a Mandelbrot fractal. This is required for Mandelbrot fractals since c is initialized to the pixel location just prior to calling the initialize section so the assignment in the global section is not correct with respect to coef[5]. This is not required for Julia fractals since c is set to the Julia Constant before the program runs and is never changed. We could move the initialization of the coef[] array out of the global section and into the initialize section to avoid this complexity and thereby simplify the code but this would be less efficient since the initialize section is executed at the beginning of every iteration while the global section is executed once during program compilation. In fact, since IsJulia is a constant, the compiler will evaluate the if statement during Program Optimization and remove the entire if block for Julia fractals, and at runtime, the initialize section is not even executed! SolverMethod is a value from the SolverMethods enum defined in the builtin macros: #define SolverMethods The SolverMethodArg is used to specify an argument to 2 of the rootfinding methods. For the ChebyshevHalley, the argument is the family parameter Theta and for the CIterative, the argument is the family parameter C. The ChebyshevHalley parameter Theta is related to several of the other methods as follows: Theta = 0 >
SuperNewton Method The SolverMethod and SolverMethodArg options are defined by including the SolverMethodOptions in the properties section using the statement: #include SolverMethodOptions SolverMethodOptions is defined in the builtin macros but is given here for reference: #define SolverMethodOptions Including the SolverMethodOptions in the properties section adds the following properties to the page:
The different rootfinding methods each look best with different settings for the Max Power property and you can use the function Solver.MaxPower to override the value in the global section using the statement: FSK.OverrideValue("MaxPower", Solver.MaxPower(SolverMethod)) Example: comment: This example uses Solver.Apply to implement the Fractal Equation. Like Solver.ApplyToPolynomial, the 1^{st} and 2^{nd} arguments are user specified options that define the method and argument for the fractal. However, Solver.Apply also requires you to evaluate the function and the function's 1^{st} and 2^{nd} derivative at the current point z and pass these 3 values as the last 3 arguments as illustrated above. For details on Newton's method see: From Wikipedia, the free encyclopedia.
Eric W. Weisstein. "Newton's Method." From MathWorldA Wolfram Web Resource. For details on many of the other algorithms, I refer you to the paper: "Review of some iterative rootfinding methods from a dynamical point of view" by Sergio Amat, Sonia Busquier, and Sergio Plaza. 
Copyright © 20042016 Hilbert, LLC 