FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Chaos and Fractals

 


Bikerman
If anyone does not know what Chaos theory is and has never plotted out a fractal on their computer then here is a bit of science fun. You don't need to be a math wiz - that's the point really, producing fantastic complexity out of very simple looking equations.
Chaos is actually 'sensitive dependence on initial condition' sometimes called the 'Butterfly Effect' - if a butterfly flaps it's wings in Europe it causes a Hurricane in India.
It refers to simple looking equations that should produce simple output and normally do...but not always. It turns out that any equations with an x squared or higher (called Non Linear equations) can produce fantastically complex graphs when plotted. The scientist knows all the rules of the system and still he cannot predict what it will do beyond the start.

Here's a simple example. This is the logistic difference equation,,,very simple. Biologists would write it as Ynext=R*Y*(1-Y) and for them it is used to model animal populations. It reads as follows :- next years population (Ynext) is this years population (Y) multiplied by a constant rate of breeding (R) and then multiplied by 1-Y. (A mathematician would know it as the equation of a parabola and write it as y = ax(1 - x) - Same thing).

To use it you choose a value for R (say 2) and then feed in the starting population - say 0.2 (where 0 represents extinct and 1 is the maximum population conceivable).
Ynext=2*0.2*(1-0.2) = 0.32
Then simply feed the result (0.32) into the equation again
Ynext=2*0.32*(1-0.32) = 0.4352
Now keep running it. The idea is that it will settle down to a fixed value after a few repetitions (called 'iterations').
Ynext=2*0.4352*(1-0.4352) = 0.49160192
Ynext=2*0.49160192*(1-0.49160192) = 0.499858945
Ynext=2*0.499858945*(1-0.499858945) = 0.5
Ynext=2*0.5*(1-0.5) = 0.5
Done. Answer = 0.5

Try it for yourself. You can use a simple calculator or set it up in a spreadsheet (or download the skeleton for one I did earlier if you have Excel - HERE). Start with R at about 2 Then try again with R=3 and again with R=3.5. Below R=3 it behaves as expected. As R is chosen higher strange things happen. Instead of settling down it carries on oscillating ip and down...Past 3.5 the system becomes Chaotic....ie apparently random.
That's where Chaos theory started. A simple little equation producing apparently random results.

Now here is the same type of thing done as a plot rather than just figures. Take a triangle (any triangle). On each of the 3 sides draw another triangle which is 1/3 the size of the existing side.
Now carry on repeating.
Click HERE to use a little application to do this fast

This is a fractal and is a very disturbing shape. Although it looks harmless when considered it is weird. The length of the line drawing the shape is INFINITE....every time you add another 3 triangles you increase the line by 4/3...so we get 1*4/3*4/3*4/3*4/3*4/3....to infinity So you have an infinitely long line but in an enclosed area which never gets bigger.
It's called the Koch Curve and used to drive mathematicians into nervous breakdowns.

Here's some other fractals to finish.....
Sierpinski Triangle
Logistic Equation Interactive tutorial
Complete Tutorial on Fractals
Pictorial Tutorial - more advanced
The Mandelbrot Set (Daddy of all fractals)
More links to topics on Fractals

Regards
Chris
TerrorBite
Fractals are one of my hobbies.
I've written several mandelbrot programs for various platforms:
*Windows (.NET Framework) - I'm working on an improved version that allows calculation of other fractal types too.
*Linux (X11)
*Casio Graphing Calculator
*QBASIC - it runs on a 25MHz Windows 3.1 486!
I wanted to write one that would run under iPodLinux, but someone beat me to it.

I've calculated the logistic difference equation - it's nice to look at- but I've also played with attractors and my favourite would have to be the Attractor of Henon.
It looks like a banana.

Calculating it is easy - take a random point whose X- and Y-coordinates are anywhere in the range of -0.3 to 0.3. Now perform the following operations:
xnew = 1 + y - 1.4 * x^2
ynew = 0.3 * x
Plot the point (xnew, ynew). Then do the whole thing again, substituting the new x and y values. Repeat.
The first fifty or so points will appear random, but as more and more dots are plotted (it can be repeated indefinitely, so a computer is recommended. Don't try a calculator and pencil. Although feel free to feed the formula into your graphics calculator, that's what I did.) As more dots are plotted, you will begin to see a shape that looks like this.

Realy really really big version here.
(Images were found on the page at http://hans.liss.pp.se/henon.html where there's also an interactive Henon attractor.)
It does look somewhat like a banana, doesn't it?

Now try again, using slightly different starting coordinates. if you were watching the first few points appear in slow-motion, you will see that the points rapidly start landing farther and farther away from where they did the first time. Within 20 iterations (maybe more depending how little you changed the start position), the difference will be as great as the difference between raindrops in two subsequent rainfalls. Yet if you continue, the dots will once again trace out the banana, even though they're landing in a totally different order.

Bits of the shape show "self-similarity", if you zoom in on them then you will find that there are smaller bits that look identical to the bigger bits, complete with even smaller identical bits. You could keep zooming in foever and still see the same pattern.
This "self-similarity" is a critical feature of fractals. The Mandelbrot Set for example, has smaller copies of itself scattered throughout it. Those contain even smaller copies... etc.

I could go on... but I think I'll just sit back and wait for people to ask me questions. Bikerman, you can answer questions too. I don't want to leave people out or anything. Feel free to correct me if I'm wrong, or add bits I've left out. Have fun.

PS If anyone's looking for a great book on chaos theory, try "Chaos: Making a New Science" by James Gleick.
Bikerman
Excellent - I was hoping to draw a few fans of Chaos out into the open Smile

BTW - I don't know how I failed to mention the book - I meant to...I'll add my support to Gleick's 'Chaos' - well worth buying.

Everything you have posted seems correct to me and there's nothing I'd add at this stage because it can get complex in parts and I think it's better to just start with the beauty of the thing for the moment and appreciate what some apparently trivial little expressions actually contain within themselves.

PS - I used the logistics equation because it has the nice biological application which means it is not just abstract math. Also, I think it was actually the equation that Lorentz himself got started with all those years ago when he was still working in Meteorology...my own favourite is the Sierpinski Gasket, simply because it was the first fractal I ever programmed for myself on the old BBC and it 'blew me away'

Best wishes
Chris
TerrorBite
My favourite fractal is the Mandelbrot Set. I've got heaps of images I've generated, often at 1280x1024 and oversampled for better quality. Ill upload a few of my favourites to my website at some point soon.
http://terrorbite.frih.net/

Has anyone tried using Fractint?
Bikerman
For anyone using the LiveMath plugin on their browser, here is a Mandlebot generator in LiveMath format for you to enjoy.
http://camres.frih.net/resources/math/mandlebrot2.thp

(LiveMath is a browser plugin that allows you to view and interact with complex math formulae and graphs. It works with most browsers and is free (I don't represent them in any way, I just like the functionality it offers for free). Anyone who has used Mathematica will know what to expect...anyone else - give it a try, you might like it).
Test to see if you have the plug-in
Download the plug-in from the maker's site
(You will want the browser plugin and I would also get the viewer - both free).

If it crashes your browser then sorry - all I can say is that I use it on IE5,6 and 7, firefox2 and 2.001 and have used it on Netscape previously with no bother...uninstall if it causes problems...
TerrorBite
I have surpassed myself. I recently calculated the Mandelbrot Set on a printer.

Yes, I sent the printer a code file, and it sat there blinking for about 3 minutes and then printed the Mandelbrot set.
Note, I found the code on the 'net, I didn't write it myself. I don't know postscript; stack-based languages confuse me.

Code:
%!PS-Adobe-2.0

% This file will calculate the Mandelbrot Set.
% If you send this to a printer, the printer will calculate the set, and then
% print it out. This may take a while (printers don't have fast processors.)

51 1 551
{ /x exch def
  111 1 721
  { /y exch def
    y 521 sub
    201 div
    x 301 sub
    201 div
    1 index
    1 index
    31 -1 1
    { /n exch def
      1 index
      dup mul
      1 index
      dup mul
      1 index
      1 index
      add
      /d exch def
      sub
      4 index add
      3 1 roll
      2 mul mul
      2 index add
      d 4 gt
      {exit} if
    } for
    pop pop pop pop
    n 31 div
    setgray
    x y moveto
    1 0 rlineto
    0 1 rlineto
    -1 0 rlineto
    fill
  } for
} for
showpage
Related topics

London blasts cause chaos on Tube
Urban Chaos
Any Good Script like Kings Of Chaos
Kings of Chaos
Chaos Magick

Chaos
[var]Cuenta la historia de tu NICK... y que significa...?
Monotheism, bring peace or chaos?
Is mathematics biology's next microscope ?
ANYONE THINKS TIME TRAVEL IS POSSIBLE?

Science Books worth reading
Paper on Chaos
Last Chaos
Is philosophy a science?
[games]MMORPG
Reply to topic    Frihost Forum Index -> Science -> General Science

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.