Menu

Tree [383f85] master /
 History

HTTPS access


File Date Author Commit
 COPYING 2011-10-17 Damian L Brasher Damian L Brasher [3e382d] Initial commit
 README 2011-10-18 Damian L Brasher Damian L Brasher [383f85] Update to README
 fractal 2011-10-17 Damian L Brasher Damian L Brasher [771fd9] Modified n
 fractal.c 2011-10-17 Damian L Brasher Damian L Brasher [771fd9] Modified n

Read Me

INTRODUCTION

Written by Damian Brasher. dlb@interlinux.org.uk for learning
purposes and fun. 

http://www.interlinux.org.uk

References include:

1)	FRACTALS - Images of chaos - Hans Lauwerier ISBN 0 14 01.4411 0
	"A really cool book all about fractals - highly recommended"
2)	www.libsdl.org - "SDL homepage lots of good info and downloads for SDL"

WELCOME...

to fractal-show-0.0.1 - Displays a selection of dust type fractals
one after the other in colour rather like a slide show.

This extremly simple fractal DEMO uses the SDL graphics library
and the dust type fractal algorithm. The program runs only in 800x600 16bit
but video mode at the moment, I will change this to run in more modes 
automatically soon as I work out how! 

You will need at least
		
		> SDL-1.1.4-7 
	      	> SDL-devel-1.1.4-7
	      	> SDL_image-1.0.9-2
		Xfree windows ( I use Xfree 4.01)
		as well gcc and relevant c libraries.

If you are using the source:

run

gcc fractal.c -L -lSDL_image -lSDL -o fractal

./fractal

If you are attempting to use the binary in bin directory. 
(probably best to compile your own), If you use Mandrake 7.2 with Xfree 4.01 and 
the above SDL versions it might! work.

To run
	tar -xvf /../fractal-show-src.0.0.1.tar
	cd /../fractal-show-src-0.0.1/bin
	./fractal

The program will create fractal image one after the other,
to quit close the window or type Ctrl + c at the console 
from where you launched the binary.

I have just been studying linear recurrence for as part of my degree
and am also learining to program in Linux using C and different API's.
circa (2001)

The Maths...

The fractal is based on the following iterated series X0, X1, X2, X3... 
Here for all values of n,

		Xn+1 = (1+b)F(xn)-bXn-1

where

		F(x) = ax + (1 - a)2x^2/1+x^2

The following iterative mappings from this are:

		Xn+1 = byn + F(xn)
		Yn+1 = -Xn + F(x+1)

The program uses these statements to draw the fractal:

		z=x; x=b*y*w; w=a*x+c*u/(1+u); y=w-z;

Where F(x) is 

		F(x) = ax +(1-a)2x^2/1+x^2

Taking different values of a, b and coordinates x and y
many different images can be produced.

Change line 244:
	
    n=-0.70;

For some fun changes.

The program only runs at the moment, no interaction yet although
I have a few features I want to add in time. ie slide control
of the a and b values as well as stop, pause and quit buttons using
the SDL library.

DISCLAIMER

Be warned, fractal-show-0.0.1 is highly experimental and is only intended
to be a demo and experiment at most. I cannot accept responsibility for any damage, 
to your system as a result of running fractal-show-0.0.1. I have distributed 
fractal-show under the GPL Licence, Please see copying in ths directory.