19th May 2003 19:28 UTC
fractal, and julias?
:rolleyes:i'm wondering how to make a fractal and a julia, can anyone help me?:rolleyes: :rolleyes:
Archive: fractal, and julias?
unripeLemon
19th May 2003 19:28 UTC
fractal, and julias?
:rolleyes:i'm wondering how to make a fractal and a julia, can anyone help me?:rolleyes: :rolleyes:
mikm
19th May 2003 21:32 UTC
try looking at the code in TFF 2.0 or Whacko I
UnConeD
20th May 2003 00:06 UTC
The easiest way is to make a movement that follows one Julia iteration, and draw something near the middle. The repeated movement will end up similar to the fractal you get using escape-time iteration.
You can't make Mandelbrot sets with this technique though.
dirkdeftly
20th May 2003 00:33 UTC
or in degnic's or nic's or skupers's or avs-king's or anyone else's code...
and i stared at the code in wavs1 for a looong time and couldn't get it at all. before i get into anything else, you need to have a basic understanding of what fractals are and how to generate them point-by-point (e.g. the iteration of complex formulas). i'm not gonna waste my time writing out an explanation of it, so if you don't know already, google for mandelbrot/fractals/etc.
the standard form of a julia fractal is this:
z(n+1)=z(n)^2+c; where c(=cx+icy) is a constant complex number, and z(=x+iy) is any point <x,iy> in the image. multiplying this formula out we get:
x(n+1)+iy(n+1)=x(n)^2+2*x(n)*iy(n)+i^2y(n)^2+cx+icy
or:
x(n+1)+iy(n+1)=x(n)^2+2*x(n)*iy(n)-y(n)^2+cx+icy (since i=sqrt(-1), i^2=sqrt(-1)^2=-1)
what we need to do is seperate this into two formulas in terms of x(n+1) and y(n+1). now since our only y(n+1) term has an i coefficient, it is logical to seperate the terms with i coefficients into the y formula, so we can get rid of i entirely:
x(n+1)=x(n)^2-y(n)^2+cx
iy(n+1)=2*i*x(n)*y(n)+icy, or y(n+1)=2*x(n)*y(n)+cy.
and there you've got your dynamic movement:
x1=x; y1=y;
x=sqr(x1)-sqr(y1)+cx; y=2*x1*y1+cy;
unconed would be better at explaining this though :p
UnConeD
20th May 2003 02:15 UTC
Well Atero pretty much explained the basics... your standard Julia is calculated using an iterative formula z(n+1) = f[z(n)]
z(n) means the n'th iteration of z.
However the standard method of rendering a Julia or Mandelbrot was not explained. Basically you wish to determine which points will keep 'hanging around' the center area when you're iterating them, and which points will go to infinity. This gives you a black and white julia/mandelbrot image.
To check if a point goes to infinity is rather hard (how can you be sure?), but for the z=z^2+c formula it can be proven that any point with radius > 2 will eventually go to infinity. So you check that instead.
By counting the amount of iterations needed to reach that condition and coloring accordingly, you can get interesting colorpatterns around the edge.
Now why can we do the same with a dynamic movement? Well simple... a point that extends towards infinity will get its colorvalue a large distance away from the center. A point that keeps rotating around in the center gets its colorvalue from the center. By repeatedly applying this movement, the non-julia points will always go dark, while the julia points will scale and stretch the center colors and converge into a rough Julia fractal shape. Instead of determining the exact value for each point, we simply distort the image so that each distortion contributes to a julia-shape.
This works with a DM because for a julia, there is no difference in the constant c across the entire image and per iteration.
Basically you can create fractals in many ways like this. For example, a simple d=d*1.2 movement also results in a 'fractal', just not a very interesting one (if you zoom in by factor 120%, you will see the same image as before). The trick is to have a movement that scales down the image in a certain way, so that it converges into an interesting shape.
UnConeD
20th May 2003 02:27 UTC
Here's a simple demo fractal I just came up with. To view it, turn avs' speed all the way down with the "windowed performance slider". Then turn main's clear every frame on and back off again to see it evolve into the fractal.
It starts out with a simple horizontal line (no music). Then a polar transformation is applied that you can imagine like this:
Take the line and bend the two ends towards each other so that you a 180° arc. Take a duplicate and glue them together so that you get a full circle.
This is the movement y=d*4-2;x=cos(r);
However if you repeat this same transformation after another step, you will not just be bending the newly drawn line, but also the circle from the last frame. So each 180° arc will already have a smaller circle in its middle. The end shape will be a large circle with 2 small circles on it.
The next step, two smaller circles will appear next to each of the last 2 circles, and so on and so on, until you get the fractal here.
This is the literal definitial of a fractal: a shape that contains itself transformed, repeated with infinite detail.
You can change x=cos(r) to x=cos(r*1.5) to get a trefoil fractal too. Notice how now with each step, the extra amount of circles triples.
shreyas_potnis
20th May 2003 05:48 UTC
does anyone know why it was named 'julia'?
Nic01
20th May 2003 06:32 UTC
The "inventor", idiot (or founder, whichever word you prefer or is more appropriate)
Go google for it, you'll find the history.
unripeLemon
20th May 2003 18:26 UTC
Thanx for the help, but it would be easier to understand if i knew complicated geometric math:)
UnConeD
20th May 2003 20:27 UTC
unripeLemon: what exactly do you mean? The main thing you might need to learn for julias is complex-numbers. If you've never heard of them, they will sound amazingly weird, but once you know the basics it's not that hard.
unripeLemon
20th May 2003 20:28 UTC
oh, sorry
dirkdeftly
21st May 2003 01:07 UTC
hence my telling you to google for an explanation of fractals. fooling around with fractint for a few weeks and checking out the info files helps :)
sidd
24th May 2003 05:46 UTC
learning what a fractle is one thing, understanding how to write it in ordinary math is another.
AVS can make the simplest equations into a nightmare, or in the case of fractles, make a difficult concept into a couple of lines.
AVS iterates the same lines of code for every frame, which is basically how a fractle works. So it is really the perfect platform.
"This is the literal definitial of a fractal: a shape that contains itself transformed, repeated with infinite detail."
--- pretty much exactly what a dynamic movement does anyway!
uNDefineD
24th May 2003 11:24 UTC
Cone--
A complex number is something like this, right?
sqrt(-4) = 2i
Or something. I dunno, I didn't take Specialist Maths in high school.
BTW, funny story: I have a friend named Julia whose birthday another friend was DJing at last July. I suggested to him to show a Julia fractal using AVS (and take immense pride in knowing that we were the only two who understood :D). Too bad he couldn't find a projector though.
dirkdeftly
24th May 2003 20:24 UTC
sqrt(-4)=2i is an imaginary number; sqrt(4)=2 is a real number. a complex number is a number with real and imaginary components: z=a+bi, where a and b are two real numbers.
skupers
26th May 2003 16:34 UTC
Curlicue Fractal
I made a preset based around the curlicue fractal some time ago. Since this is a topic about fractals, I thought it might be of interest for some of you guys. I'm especially proud of the morphing between two seeds.
I was also wondering if anyone here knows how to do strange attractor and quaternion julia fractals (damn those 4d fractals :mad: )? I have been trying for some time, but without result.
Info about strange attractor
Info about quaternion julia set
dirkdeftly
27th May 2003 01:38 UTC
wow...that is just about the coolest superscope i've ever seen.
:claps: :D
what is the curlicue fractal anyhow...?
<edit> add sx=ax;sy=ayax=0;ay=0; to frame and ax=ax+x/n;ay=ay+y/n;x=x-sx;y=y-sy; to pixel </edit>
sidd
27th May 2003 03:12 UTC
i could never understand how strange attractor works in the first place, i remember reading about it one time when i was working at a library at uni.
never heard of the quantrionatronamajig julia set.
ill download you preset when i get home :)
skupers
27th May 2003 07:52 UTC
Info about the curlicue fractal . I didn't know of it either until I read that site.
The problem with Quaternion Julias isn't really the fractal code itself, that's just a more complicated version of normal julia code. In Quaternion Julia's you have q = r + ai + bj + ck instead of z = a + bi. What I have problems with the actual rendering of the fractal. Did you ever try applying the normal julia code to a ssc grid? It doesn't look like a julia fractal at all. This also seems to be the problem for the quaternion julia. My idea was to actually make a 3d block of points and color code accordingly, but that's very slow (a block of 100 x 100 x 100 points needs a N of 1000000). I think I shouldn't go over N=2000, so at best I can have of 2000^(1/3) points per side. That means only 12 points per side and that isn't a accurate as I want it to be.
I could solve this problem with a kind of 3d line scope, somewhat like the 2d-ones used in for example el-vis' fractals.
You still have the problem of the blending then, because replace would leave you with black points covering the screen and with maximum blend you can see the points on the other side of the fractal and that would make it look really weird.
sidd
27th May 2003 09:56 UTC
if you were able to create it at 10,000 points. it would be worth it just for the sake of seeing a strange attractor in AVS.
skupers
27th May 2003 13:12 UTC
No, i still don't know how to make a strange attractor. That explanation was for a quaternion julia, it's a 4d fractal that has to be shown in 3d. I guess I could try, but I can't give any promises it'll actually work.
sidd
27th May 2003 14:59 UTC
i used to have a link to a site full of nice raytraced 3d fractals.. but now i cant find it.. =(
dirkdeftly
27th May 2003 16:52 UTC
good fucking luck getting ANY kind of cross section to work in AVS, let alone 4D-3D. i don't think i need to mention how you can't do this with a DM, but i think i do need to mention that you simply *won't* be doing this with an ssc.
as for strange attractors, along with flame fractals, i'm sure it's perfectly possible, since they're just a density plot of points.
skupers
27th May 2003 19:19 UTC
Well, Atero, did try it with a 21x21x21 cube of points, where the points got their color depending on the amount of iterations it took to get to infinity. But that was really unaccurate and ugly. I also tried that 3d line idea, but that's even worse, because it takes over 10 minutes to render the fractal at 64fps and you can't really tell anything from the picture created. I'll try some more, but I think you're right; it seems almost impossible.
sidd
28th May 2003 06:41 UTC
such a shame....
oh well.. theres always something else to do..
nixa
28th May 2003 11:28 UTC
Skupers that circular fractal scope is just so cool. I made a 3D version and chainged it so its more random but it doesnt have so clean structure anymore.
Magic.X
28th May 2003 11:58 UTC
A friend of mine is doing frectals for posters and stuff.
Just go to http://www.psykick.de (its in english) to find some information or links to progs and stuff.
shreyas_potnis
28th May 2003 13:35 UTC
lol, Lemon, your sig is actually quite cool :) I noticed it now.
sidd
28th May 2003 14:02 UTC
that one fucking awesome remix nixa!
skupers
28th May 2003 15:55 UTC
Very nice remix. Am I correct in thinking that you're rendering the fractal three times, one time for every coördinate?
nixa
28th May 2003 17:57 UTC
Skupers: Yes thats what i did.
You can add this to bottom for some nice colors:
a=sqr(sqr(z1)*z1);
red=(sin((fx*m+fx2*(1-m))*0.001)*0.5+0.5)*a;
green=(sin((fy*m+fy2*(1-m))*0.001)*0.5+0.5)*a;
blue=(sin((fz*m+fz2*(1-m))*0.001)*0.5+0.5)*a;
ikbendirk
3rd November 2004 20:24 UTC
mandelbrot
I am a quite new to the AVS, and even newer to this forum...
I hope there isn't a newby-flaming-policy around here, because if so, i'm screwed.
The fact is, I have a request: I have tried to search threads for fractals, and one in specific; the mandelbrot set.
The only thing I read is 'Julia's are easy, mandelbrot's are harder but can be done'. Well supposing it CAN be done, I've searched for proof of this, but didn't find anything.
I tried to make one myself, and the download below is as far as I got. I simply converted the SuperScope's point sequence into a grid, and used basic fractal coding that can be found anywhere on the net... It is very slow and doesn't interact with the music yet. Are there any examples of better mandelbrot sets? <to download rename the .txt to .avs>
ikbendirk
3rd November 2004 20:45 UTC
mandelbrot
I am a quite new to the AVS, and even newer to this forum...
I hope there isn't a newby-flaming-policy around here, because if so, i'm screwed.
The fact is, I have a request: I have tried to search threads for fractals, and one in specific; the mandelbrot set.
The only thing I read is 'Julia's are easy, mandelbrot's are harder but can be done'. Well supposing it CAN be done, I've searched for proof of this, but didn't find anything.
I tried to make one myself, and the download below is as far as I got. I simply converted the SuperScope's point sequence into a grid, and used basic fractal coding that can be found anywhere on the net... It is very slow and doesn't interact with the music yet. Are there any examples of better mandelbrot sets? <to download rename the .txt to .avs>
PAK-9
4th November 2004 17:06 UTC
There are some mandelbrot presets out there, but the main problem is they're either very slow or very low detail... frankly AVS just isnt up to it.
sidd
4th November 2004 17:41 UTC
wow. totally prehistoric thread..
:)
[edit] OOH LOOK! there's me!! I can't spell fractal! w00tz0rz!
sidd
4th November 2004 18:21 UTC
after a bit more digging:
http://forums.winamp.com/showthread....hreadid=123053
guess which one is me
PAK-9
4th November 2004 22:55 UTC
That was back when your avatar wasn't a monocolour square and you harked from Ozshtrayleeuh.
ikbendirk
5th November 2004 16:24 UTC
I redid this and that, it actually is a pretty fancy visualisation now... at least the speed is accaptable :)
comments anyone...?
PAK-9
5th November 2004 17:33 UTC
nice, could do with a bit more music response to be a visualisation.
Fork me on GitHub