This implementation of Lyapunov Fractals is designed to run on any OpenCL compatible device. Once compiled it will be available as the binary "./DO-THE-ROAR" (I know, very creative).
General use will be like:
./DO-THE-ROAR [options]
Below are all the options. All options are optional.
-
-llists the available OpenCL devices on your system. Can then further specify exactly which device using-c. Example:-c 1,0will use device 1,0 from the output of-li.e. Platform 1, device 0. These values should be the same output from clinfo. -
-wand-hspecifies the width and height (respectively) of the image you want rendered. This value should be an integer. -
-sspecifies the sequence of As and Bs (given as 0s and 1s respectively). Values should be sperated by a comma. Example:-s 0,1 -
-aand-bspecifies the range to copute the$r$ values for A and B respectively. This should be given as a pair of float values separated by a comma. Example:-a 3.0,4will compute evenly separated$r$ values from$3$ to$4$ . -
-xspecifies the starting$x_0$ value for each point. This value should be a single float. Example:-x 0.500. -
-ospecifies the output name for the image. Example:-o "out.png". -
-ppower term to increase contrast. Since the exponents are in the infinite domain, the need to be converted to 0-1 to be output as an image. This is done by computing$l = \exp{-|\lambda|}$ . By default, most values are close to$1$ meaning there is little contrast. This parameter essentially computes$\hat{l} = l^p$ moving more points further closer to 0. If you'd like to increase contrast in processing step you can increase this value to a float. Example:-p 3or-p 1.5. -
-nnumber of iterations to calculate limit over. Since the actual lyupanov exponent needs to be calculated as the limit$n$ approaches infinity, we need to specify some stopping point. May actually perform a few extra iterations in order to complete sequence. Example:-n 10000. -
-rnumber of repeats. Will perform a full$n$ iterations$r$ times. This is to fix the driver crashing from too long kernel execution times. -
-1and-2specify the colours to use in the image creation process.-1specifies the color of stable attractors, while-2specifies the color of chaotic attractors. These values should be given as hex codes. Because of the way the exponents are calculated these will be the colors of the brightest pixels. Colors are RGB. Example:-1#FF0000 -2 #0000FF
Consider the logistic map:
And some binary sequence of As and Bs:
We can consider a new map:
With
We can generate a fractal by considering the grid/matrix of
Here's some things that need to be done to make this more usable. These can be split into tasks I actually plan to implement, and tasks which I probably won't.
Probable:
- Move colour compute to kernel
- Verbose mode - runtime analysis
- Find source of driver crash? I think this is a problem with spending too much time in kernel execution, however, I can never consistently recreate this issue. If this occurs, drop the value for
-nby somne multiple (e.g. 10, 100 etc.) and set-rto that multiple.-rwill re run the kernel after finishing-niterations so the kernel should respond faster.
Improbable
- Error checking - OCL or otherwise
- Rebase inputs - it's gross moving around so many parameters.