Monday, October 24, 2005

IFS Designer Project starts to take shape.


I've been putting in some work on my new and interesting project. It's a fun little app developed in common lisp with Ltk (a lisp interface into tcl/tk) in slime. It allow you to design 2D IFS fractals by graphically manipulating the transforms that comprise them.
I really like the IFS algorithm because it's just sooo simple:
  1. Take a number of transformations (scale, rotate, translate). Three is enough to produce a nice standard fern-like fractal.
  2. Starting at the origin, apply the transforms in a random order (weighted by the size (determinant) of the transformation matrix)
  3. After about 100-200 iterations, start to draw the points.
  4. Finish when you feel the image is dense enough.
Simple eh?
I'm no mathematician but the why goes like this:
  • The transforms represent a fractal attractor - the transforms are a very concise description of a set of points in space.
  • Each transform maps a part of the attractor onto itself - when you start on the attractor and apply one of the transforms the result will still be on the attractor.
  • Applying a transform to a random point will make it closer to the attractor - I suppose this is why it's called an 'attractor' :) . This is why you discard the first few points, to make sure you're at least near the attractor when you start to draw the points.
  • Weighting the picking of the transforms by determinant isn't actually necessary but it does improve the performance of the algorithm.
I'm not ready to show off any IFS fractals (yet) but I can give you the matrix library I developed for this project.

2 comments:

Anonymous said...

Nessus Code Forks: GNessUS, Sussen, and Porz-Wahn
Subject: News from the Tenable talks All, Yesterday evening I spoke with Jack Huffard from Tenable regarding the choise of GNessUs for the new project name.
Find out how to buy and sell anything, like things related to quality assurance highway construction on interest free credit and pay back whenever you want! Exchange FREE ads on any topic, like quality assurance highway construction!

Anonymous said...

nice. more screenshots! :)