extending mandelbrot to generate julia

℡╲_俬逩灬. 提交于 2019-12-01 14:03:53

The Mandelbrot set is a special set in terms of Julia sets, some documentation writes that the Mandelbrot set is the index set of ALL Julia sets (there is one and only one index set - the Mandelbrot - and there are infinite number of Julia sets.)

When you calculate a point on the Mandelbrot set and iterate over z^2 + c, this c takes the same value as the point you try to decide if it is part of the map or not. This c will change if you go to the next point (that is how you did in your calculation).

In other words you have a value that is constant while you go through the iteration but will change for every different point.

When you calculate Julia sets, the calculation is 99.9% the same except you have to use a c value that is constant during the entire calculation not just for a single point. And that is why it is not named as c to avoid confusion, but usually k.

Now if I confused you enough, the solution is dead simple. You have to change this:

Z[ mask] = Z[mask]**2 + C[mask]

to this:

Z[ mask] = Z[mask]**2 + (-0.8+0.156j)

Check the same set here: http://en.wikipedia.org/wiki/File:Julia_set_camp4_hi_rez.png

In Mandelbrot fractal the z value is 0 in the start of the iteration and in the Julia fractal it uses a different value from the screen coordinate and a fixed complex number.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!