2007-02-18

Lyapunov Exponent Shader

The Lyapunov exponent is a measure of the stability of a dynamical system. It describes how much a small error of the input will affect the system. The calculation of the graph in the range -1 to 0 for a subset of the complex plane can produce very aesthetic pictuers. The implemantation as a pixel shader 3.0 code is very easy because its just an iteration for every point on the screen. The code for each pixel is as simpe as that:

// Compute single Lyapunov lambda value
float lyapunovExponent (const float2 ab)
{

double r;
double sum = 0;
double x = xStart;
int k;

for(k = 0; k < MaxIter+WarmUp; k++){

r = sequence(k) ? ab.x : ab.y;

x = r * x * ( 1-x );

if (k >= WarmUp) sum += log( r - 2*r*x );

}

return sum/
MaxIter;

}


Where ab is a 2D point in the complex plane, which is related to the pixel position on the screen and sequence(k) is a simple function, which chooses the x or y coordinate for each iteration.
Here is the download and here a picture:

2007-02-13

Fractal Shader

Joreg found a demo scene link with an easy to implement fractal shader for Mandelbrot and Julia fractals. Download here.

2007-02-12

HD Video Rendering With Realtime FFT Data

For this little project the FFT data of a 3 minute song was recorded with 60 fps into more than 10000 text files, where each text file got a timestamp in its file name. During the rendering the text file with closest timestamp to the current rendering time was read and processed into parameters of a 3D-object which is based on Johan Gielis superformula.
A small video is here, and here some frames in full 3840x2400 resolution (which obviously where resized by blogger on upload).