Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => Mandelbrot & Julia Set => Topic started by: opusGlass on February 28, 2013, 11:00:47 PM




Title: SOLVED Problem with anti-aliasing and normalized iteration count?
Post by: opusGlass on February 28, 2013, 11:00:47 PM
Hi guys,

I'm new to the forums so if I should post in a different category let me know.

I have a problem with a Mandelbrot program I wrote in C++. It has anti-aliasing and the normalized iteration count (smoothing) algorithm, each of which works fine on their own. But when I use the anti-aliasing and smoothing at the same time, banding occurs, similar to if I hadn't used the smoothing algorithm at all (images below). Any idea why this might be?

Anti-aliasing and smoothing: http://imgur.com/XgOBcuK
Smoothing only: http://imgur.com/hvwtZhK

Thanks in advance!
-Opus


Title: Re: Problem with anti-aliasing and normalized iteration count?
Post by: eiffie on March 01, 2013, 06:31:43 PM
I think we would need to see some code - I can't think why this would happen without some int rounding error. Perhaps your code does this?
newRed = red1/4+red2/4+red3/4+red4/4 then banding would occur if the values are integer.


Title: Re: Problem with anti-aliasing and normalized iteration count?
Post by: cKleinhuis on March 01, 2013, 06:39:40 PM
i would suggest some interpolation/integer problem as well, some insight in the code would help for sure,
since the smooth iteration alone looks very nice, the only reason is left for the banding is how you create your anti alias function ;)
so, show us your anti-alias code ... ;)


Title: Re: Problem with anti-aliasing and normalized iteration count?
Post by: opusGlass on March 01, 2013, 07:41:31 PM
Hey guys thanks for the responses!

Now that you mention it I definitely have an int rounding error. The code is a mess because this program is built to draw the mandelbrot as each pixel escapes via threading, which produces a nice effect but requires a lot of data storage--and I was storing the color of each escaping sub-pixel as an int, hence the error.

Once I get the program fixed I'll post some new pics! Btw, how do you guys normally upload pics/videos/programs? I feel like using imgur is slightly noobish.

EDIT: I got it working! And I added saving and loading so I can continue to iterate an image at any time. This one's at 11000 iterations so far.
http://i.imgur.com/Wl7qTF1.jpg