Logo by kr0mat1k - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. July 19, 2018, 07:39:27 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1] 2   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Coloring points inside the Mandelbrot set  (Read 4766 times)
0 Members and 1 Guest are viewing this topic.
kronikel
Navigator
*****
Posts: 79



« on: October 03, 2013, 04:36:01 AM »

I'm sure this has been done, and there are probably other ways to do it also, but I've never found any info on how to do it.
Points that are inside the mandelbrot set are usually colored black. But that's boring! Here is an easy way to get a value for ALL points.
Just keep track of the distance that z moves while iterating z = z^2+c
Then use the total distance each point traveled to look up a color.


The minibrots that once all looked the same have a little more character


There are two other differences with using distance instead of iteration count.
With the usual iteration count, you will see bands of a certain value, so you end up with a solid color in that area. But with distance the values you get are a little more unique.
The other advantage is with points in the set that would escape to infinity but don't because your bail out value wasn't high enough.
Normally these would be solid colored like points that are a part of the set, but when using distance you get some pretty interesting detail.

This picture will demonstrate both. On the left is iteration based coloring and on the right is distance based. The bail out is 500 iterations for both.


The only problem I ran into is that the distances found for points inside the set vary greatly from the points outside the set. This would make it hard to do a straightforward lookup into a color table.
There are a few easy ways to fix this.
You can multiply the distances found of points in the set by one number and points outside the set by another number. Something like ~5 for outside points and 100+ for inside points.
Another thing you can do is to only apply the distance based coloring to points that reach the bail out, then color the rest of them like normal. This can actually be better for some images. Because the distance based method gives more unique values, you can sometimes have too much contrast and a chaotic look in areas where the distances change quickly.
Here is a hybrid using distance and iteration based coloring

This way shows less detail but has smoother transitions between different areas.

One last picture. Purely distance based coloring.


Feel free to post some pics if you have ever made fractals like this, or know other ways to give value to the points inside the set. I'd like to see how it looks with other types of color palettes.
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #1 on: October 03, 2013, 07:31:00 PM »

Cool!
I did something similar before I started exploring the pertubation method of rendering mandelbrot fractals.
But with pertubation it seemed that the distance get instable and chaotic, but I haven't investigated that much.

How do you calculate the distance?
Like sqrt(zr*zr+zi*zi) or sqrt((zr-c)*(zr-c)+(zi-c)*(zi-c)) ?
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
kronikel
Navigator
*****
Posts: 79



« Reply #2 on: October 03, 2013, 11:23:23 PM »

it's the distance between z and z^2+c on every iteration
so something like sqrt( (oldZR - zr)^2 + (oldZI - zi)^2 )
in other words, how much the complex point moves after each iteration is added up cumulatively to give a final distance that the point traveled
Logged
lkmitch
Fractal Lover
**
Posts: 238



« Reply #3 on: October 04, 2013, 07:58:46 PM »

Neat idea!  I generalized it a bit to color by total angle turned through (sum of angles between z and zold).  Here is a Mandelbrot zoom using that idea.


* 2013-10-04-b.jpg (219.76 KB, 800x640 - viewed 614 times.)
Logged
kronikel
Navigator
*****
Posts: 79



« Reply #4 on: October 17, 2013, 01:48:41 AM »

Nice! I imagine there are probably other ways to get an interesting value for each point also.

I've been trying to find a way to make it fade smoothly between colors.
The distance method gives non integer values so it seems like you could do it similar to the continuous smoothing method n - log(log(modulus)) / log(2) if I remember correctly... something like that.
The problem is that where two bands meet, the high values of one band are against the low values of the next. So it is basically the exact opposite of "continuous"
I haven't looked much into it but it seems like you could flip every other band and get a nice look.
Logged
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #5 on: October 17, 2013, 10:07:24 PM »

I wrote something about interior coordinates :

http://mathr.co.uk/blog/2013-04-01_interior_coordinates_in_the_mandelbrot_set.html

You only need to consider periods p where |z_p| reaches a minimum, dramatically reducing the effort required.

Not sure if it's possible to adapt it to perturbation technique (it probably is, but I haven't done the maths).


using b as hsv gradient



using b as image coordinates (plus exterior distance estimation)



using b as image coordinates, video

http://mathr.co.uk/misc/2013-04-02_mandelbrot_mandelbrot.ogv
Logged
Dinkydau
Fractal Senior
******
Posts: 1616



WWW
« Reply #6 on: October 17, 2013, 10:46:46 PM »

Nice image!
Logged

Nahee_Enterprises
World Renowned
Fractal Senior
******
Posts: 2250


use email to contact


nahee_enterprises Nahee.Enterprises NaheeEnterprise
WWW
« Reply #7 on: October 18, 2013, 03:13:44 AM »

    I wrote something about interior coordinates :
            http://mathr.co.uk/blog/2013-04-01_interior_coordinates_in_the_mandelbrot_set.html
    You only need to consider periods p where |z_p| reaches a minimum, dramatically reducing the effort required.
    Not sure if it's possible to adapt it to perturbation technique (it probably is, but I haven't done the maths).
    using b as hsv gradient
            http://mathr.co.uk/misc/2013-04-01_mandelbrot_interior.png
    using b as image coordinates (plus exterior distance estimation)
            http://mathr.co.uk/misc/2013-04-02_moondelbrot.jpg
    using b as image coordinates, video
            http://mathr.co.uk/misc/2013-04-02_mandelbrot_mandelbrot.ogv

I like the use of a photograph used to build the interior!!!    cheesy
 
Logged

xenodreambuie
Conqueror
*******
Posts: 124



WWW
« Reply #8 on: November 11, 2015, 05:03:58 AM »

I wrote something about interior coordinates :

http://mathr.co.uk/blog/2013-04-01_interior_coordinates_in_the_mandelbrot_set.html

You only need to consider periods p where |z_p| reaches a minimum, dramatically reducing the effort required.

Not sure if it's possible to adapt it to perturbation technique (it probably is, but I haven't done the maths).


This is the only reference I've found so far that gets the correct angle for all interior points. Without testing it directly, it appears to generalize to higher degrees of zn+c, but not so well to general rational formulas. Is that possible? In particular, I suspect the criteria for |b|<1 isn't right in the general case.

The method as is doesn't quite suit my purposes, which is to integrate into an existing method for finding the convergent cycle. That is, iterating the first critical point to z1, and if it doesn't escape to infinity, iterating the second critical point until it approaches z1, then iterating again to find the cycle length. The problem then is that we don't know which point in the cycle is the one to use for the angle. I tried calculating z' for each point in the cycle and choosing one with |z'|<1, which gives the right result for the largest cardioids but not the smaller ones. It even shows some improvements with the general rational case, but often spoiled by a discontinuous disc due to |z'|<1 not matching the actual regions.
Logged

Regards, Garth
http://xenodream.com
xenodreambuie
Conqueror
*******
Posts: 124



WWW
« Reply #9 on: November 14, 2015, 10:12:26 PM »

I have found a reasonable solution for a general convergent Mandelbrot method.

To recap the general method:
Iterate the first critical point until it either escapes to high bailout or reaches max iterations. If not escaped, call the point z1.
Iterate the second critical point (possibly same as the first) until it converges to z1.
Iterate z1 until it returns to z1, to find the cycle length.
That gives enough information to calculate the DE and potential.

To calculate the angle (for texture or field lines), the problem is that we don't know which point in the cycle corresponds to the "base region". I'm guessing that a good definition for the base region is the one with cycle length 1. This is true for zn+c but I don't know if one always exists in the general case or whether every cycle includes a region with cycle length 1. Even if not, it should be the region with the smallest cycle.

In the general case the only way to identify the attracting point of the base region would be some prior analysis, and I have no idea whether that is possible other than by brute force.

However, the simplest answer is to just find the point in the cycle with the smallest z and use that. It gives the correct result for zn+c, and pretty good results for a number of rational functions that I've tried, but not so good for some others.
Logged

Regards, Garth
http://xenodream.com
Adam Majewski
Fractal Lover
**
Posts: 221


WWW
« Reply #10 on: November 15, 2015, 08:17:43 AM »

Interesting
do you have any images ?
Logged
xenodreambuie
Conqueror
*******
Posts: 124



WWW
« Reply #11 on: November 15, 2015, 10:16:19 AM »

Here are examples using rainbow hues for angle. All the cardioids are correct for z4+c (up to a cycle length of 160 if I zoomed in that far.) The other example is (z3-1)/(z3+1)+c, which is all interior. Not all cardioids get their own center for the angle.


* Mandy-z4-rainbow.jpg (38.67 KB, 640x480 - viewed 415 times.)

* Mandy-100-11001-rainbow.jpg (49.24 KB, 640x480 - viewed 387 times.)
Logged

Regards, Garth
http://xenodream.com
therror
Explorer
****
Posts: 42


« Reply #12 on: October 11, 2016, 06:37:42 PM »

In this pictures (Multibrot set )exterior points are coloured with the escape time algorithm, colour of interior points is determined by period, brightness by distance estimation.


* name10949.jpg (78.95 KB, 640x480 - viewed 217 times.)

* name00001.jpg (49.96 KB, 640x480 - viewed 161 times.)
Logged
therror
Explorer
****
Posts: 42


« Reply #13 on: December 30, 2016, 06:16:00 AM »

I am trying to use angle. Code with minimum |z| gives not correct result at high resolution.
Code:
 
    x2y2=x*x+y*y;
    if (x2y2<modmin)
    {
      modmin=x2y2;
      dzpmin=dzp;
      dzqmin=dzq;
    }


* name00004.jpg (35.8 KB, 640x480 - viewed 168 times.)

* name1911900.jpg (94.4 KB, 640x480 - viewed 153 times.)

* name23211.jpg (67.93 KB, 640x480 - viewed 161 times.)
Logged
therror
Explorer
****
Posts: 42


« Reply #14 on: December 30, 2016, 06:20:00 AM »

Code wih mininum p is more correct
Code:
    if (!dzpmin)
    {
      if (dzp*dzp+dzq*dzq<1)
      {
        dzpmin=dzp;
        dzqmin=dzq;
      }
    }


* name23212.jpg (52.99 KB, 640x480 - viewed 149 times.)

* name19118.jpg (71.02 KB, 640x480 - viewed 163 times.)
Logged
Pages: [1] 2   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Mandelbrot fractal with punctured points (new) Theories & Research forth 6 397 Last post November 25, 2011, 10:11:23 AM
by forth
Multiwave coloring for Mandelbrot UltraFractal « 1 2 3 » Pauldelbrot 31 5513 Last post September 17, 2014, 08:07:10 PM
by quaz0r
Mandelbrot Smooth coloring Zoom!!! Movies Showcase (Rate My Movie) SeryZone 4 1241 Last post April 26, 2014, 10:43:33 PM
by SeryZone
Basic Mandelbrot question: out-coloring modes General Discussion tobiles 2 976 Last post October 30, 2014, 07:44:31 PM
by SeryZone
How to find random points of interest inside the Mandelbrot Set Help & Support kronikel 1 226 Last post March 10, 2016, 04:56:58 PM
by Adam Majewski

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.205 seconds with 27 queries. (Pretty URLs adds 0.017s, 2q)