Thoughts from the mind of Tim.Dylla@..., 12-07-2002:
> I think the benefit of these fractal composing programs is not to deliver
>whole and complete compositions. As you already figured out, there is a lack
>of structure. I feel fine with it, cause otherwise I would be put out of
>work ;o). But more than one time, these fractal compositions gave me a hint
>for unusual chord-lines...
Okay, that might indeed be a valid compositional application of this
stuff. Most algorithmic composition I've come across gets quite
boring after the initial moment of amusement, but indeed it can give
you some useful ideas.
>If you speak german, you can read something more about fractal composing
>(with audible results ;o) here:
>
>http://www.medienobservationen.uni-muenchen.de/FRAKTAL/fraktal.html
Thanks, I'll take a look. I had to read Kant and Hegel in German
when I did philospohy, so I think I'll manage with the language :-).
>In the end: thanks for your post, as it is a good overview about the
>mahtematical/philosophical basics of fractals. Nevertheless, I hoped to see
>something more special about Attractors, and examples for fractal
>formulas... Maybe you have time for a second lecture ;o)
Phew... not today or this weekend... Besides, this would get quite
technical, I guess. I'll see what I can do -- no promisses. In the
meantime you might want to surf the web a bit -- there's bound to be
tons of info out there. There are also quite a few good books on the
subject, although many tend to get rather technical as well (and no,
I wouldn't know any titles offhand -- the last time I bought a
fractal book must be 10 years ago, so all books I have are probably
already out of print (modern times...)).
To get you started, here's the alghorithm for _drawing_ the
Mandelbrot set (the most famous fractal of all), since I know that by
head by now. It's up to you to figure out a way to apply this to
sound -- maybe replace the colour index "n" (see step 4 below) by
midi note-numbers???
Let the screen run horizontally from x = -2.25 to x = 0.75, and
vertically from y = -1.5 to y = 1.5. So that's 3 wide and 3 high.
If you take 1 pixel = 0.01, then you'll have a 300 x 300 picture. If
1 pixel = 0.005, the pics will be 600 x 600. Etc. From now on we'll
call this 0.01 (or 0.005) 'delta'.
The top left of the picture will thus have coordinates (-2.25, 1.5)
and the bottom right corner is (0.75, -1.5).
For each point (x, y) do the following:
1. Set x_0 = 0, y_0 = 0. ( _0 means subscript-0)
Set p = x, q = y, n = 0
(note: don't get confused by the notation. (x,y) is the point on
screen, and x_something, y_something is the stuff used for
calculations)
2. Calculate the next x and y by means of these two:
x_(n+1) = x_n squared - y_n squared + p
y_(n+1) = 2 * x_n * y_n + q
3. Calculate r = x_(n+1) squared + y_(n+1) squared
Set n = n+1
4. * If r > 16 then assign the point (x,y) on screen color n (chosen
from an array of colours), and proceed with the next point (x, y) at
step 1.
* If k = 100 then colour (x, y) black, and proceed with the next
point (x, y) at step 1.
* If r <= 16 and k < 100, then repeat the above, continuing at step 2.
About step 4, which is the crucial "decision step":
- if r>16, it is decided that (x_n, y_n) is getting too large, and
will "escape to infinity". The threshold of 16 is there for a good
reason which I won't go into now. In that case the number of loops
executed (n) is used to determine the colour of the point. If it
took 15 iterations to "escape to infinity" you could colour the point
red, and if it took 75 iterations, you could colour it blue. Etc. A
good choice for the array of colours is what distinguishes a nice
picture from an ugly one :-).
- The "k=100" test is to make sure you don't loop indefinitely.
After 100 loops you decide to call it a day... Apparently the point
isn't escaping to infinity, or at least it takes too long to do so.
When zooming in on the boundary of the fractal, this "100" has to be
choosen sufficiently larger, to account for the increased resolution.
- The third one is the "repeat once more" decision: we've not yet
gotten values for x and y that are "too big", and we've not yet
looped a 100 times, so we fill in the 'old' values of x_n and y_n in
the formulas in 2, and calculate the next x/y, test, etc.
Note that since 100 is the upper limit on the amount of iterations,
the colour index 'n' also will never get larger than that. I.e. the
above will use 100 colours at most (or midi notes :). Of course you
can fiddle around with this and e.g. not use 'n', but 'n modulo 25',
so that n=1, n=26, n=51, ... will yield the same colour (or midi
note).
Ditto when zooming in: if the upper boundary is increased to 1000
instead of 100, you will _have_ to use some mapping of 'n' to midi
notes, since there are only 128 midi notes :-).
Still I'm quite sure that simply using 'n' as "midi note number" will
give quite horrible results... Oh well, you asked for it... :-)
For those with a decent mathematical background: the x/y plane is in
fact the plane of complex numbers z = x + iy. In terms of complex
numbers, the iteration function in 2 is nothing more than z_(n+1) =
z_n squared. And that's amazingly simple for such a highly
complicated result...
Uhm... does this all still qualify as "Logic off topic"??? :-))
have a nice weekend everyone,
HJ
--
Hendrik Jan Veenstra <h@...>
Omega Art: http://www.ision.nl/users/h/index.html