We help IT Professionals succeed at work.

# Decent colour sequences for Mandelbrot set.

on
256 Views
Hi,

I've created a program which creates a fractal based on mandelbrot set .... Currently, for those interested, you can find it here: http://s147645075.websitehome.co.uk/

The colours within the fractal are dependent on an image which I've created. The image is of 256 pixels in height, and just 1 pixel wide. From top to bottom, this image is loaded into a Color array, which is then used alongside the algorithm to produce the image ...

Now, this image (colour sequence) I'm creating is basically a load of linear-gradients of multiple colours - which I'm producing using PhotoShop.

However, while I can produce some reasonably snazzy sequences (i.e., ones which result in a snazzy fractal), I'm just guessing what should be where, etc, and quite often, the result is crap.

So, basically, I'm wondering if there's some algorithm to produce a decent colour sequence? Like the multi-coloured fractals that I see so many of in Google Images: has a known algorithm been used to produce those colours?

It all works too well to be random ...   :)

(I'm aware that the number of iterations also plays it's part in the final effect)

Thanks.
Comment
Watch Question

## View Solutions Only

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
Top Expert 2006

Commented:
Hey Paul,

I'll upload the source for it, if you'd like ... heck, if you can figure how to shove it into a screen-saver, then let me know (perhaps wrap it in a JFrame - set to fullscreen exclusive mode, then multi-thread to randomly select and zoom random regions?) ... (Btw, you can undo zooms using the 'u' key).

Cheers for the article, I'll give it a read.

Rob.
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
Top Expert 2006

Commented:
It requires at least Java 1.3 to run (as it uses the Swing API)..

>> and as you get close you can easily have tendrils narrower than a pixel, which can result in disjoint patches
That sounds pretty much spot on with what's happenning with my program at times ...  :)

>> I would therefore suggest that instead of a linear colour gradient, you might let the colours get closer as the
>> level sets get narrower
I shall keep this in mind, thanks.

:)
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
Unlock the solution to this question.

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.