You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

**bossk171****Member**- Registered: 2007-07-16
- Posts: 303

Does anyone know the difference?

I almost put this in the Help Me section, then I thought about the code section, but I thought that this might be appropriate here. I understand how they are created, this wiki was particularly helpful (specifically the code part) but I can't figure out the defferance between the Mandelbrot Sets and the Julia Sets. And because there's no code part on the Julia Stes page I can't even take a guess. The process looks the same in both cases for me.

Unfortunately the formal definitions are simply too technical for me.

There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.

Offline

**luca-deltodesco****Member**- Registered: 2006-05-05
- Posts: 1,470

both sets use the same equation:

in a manelbrot set, z[sub]0[/sub] = 0, and c is the point in the complex plane you are graphing

in a julia set z[sub]0[/sub] is the point in the complex plane you are graphing, and c is some constant chosen for the whole fractal which gives you the different julia sets.

code wise they are almost exactly the same aswell, for a mandelbrot you might have

(modsqr(z) = z.r^2 + z.i^2)

```
bool isInMandelbrot(Complex c) {
Complex z;
for(int i = 0; i<MAX_ITERATIONS; i++) {
z = z*z+c;
if(z.modsqr()>4.0) {
return false;
}
}
return true;
}
```

and for julia:

```
Complex c (0.125,-0.8); //random chosen constant
bool isInJulia(Complex z) {
for(int i = 0; i<MAX_ITERATIONS; i++) {
z = z*z+c;
if(z.modsqr()>4.0) {
return false;
}
}
return true;
}
```

*Last edited by luca-deltodesco (2007-10-17 19:11:56)*

The Beginning Of All Things To End.

The End Of All Things To Come.

Offline

**bossk171****Member**- Registered: 2007-07-16
- Posts: 303

So then there can be only one Mandelbrot Set, but there are an infinity of Julia sets, is that right?

Thanks for the code by the way, that really clears things up.

*Last edited by bossk171 (2007-10-24 07:34:48)*

There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.

Offline

Pages: **1**