Talk:Pictures of Julia and Mandelbrot Sets/Computer programs

drawing procedure
Hi. Thx for code. What do you think about 2 small changes :
 * move "cx = ax + i * h / 800" from j-loop to i-loop.
 * compute "h / 800" and use it's value not to compute it for every point

It should be faster. Regards. --Adam majewski (talk) 15:43, 8 June 2010 (UTC)


 * I have written "i * h / width" (i = 0 to width - 1) in order to make the meaning more clear, in my programs I calculate h/width once for all. You are right, "cx = ax + i * h / width" should be put outside "for j = 0 to height - 1 do", I have corrected this, and will do the same in all my programs. Thanks. (Gertbuschmann (talk) 04:06, 13 June 2010 (UTC))

code
Hi. I have made a program in C that should realize your algorithm. ( It does not work = gives black file). Can you look at it ? Regards --Adam majewski (talk) 17:52, 13 December 2010 (UTC)

..... ( old code is removed. See new code below)


 * I understand that you let the domain outside of the Mandelbrot set and its boundary be of one colour, since you have not calculated the colour scale col and the real iteration number.


 * Instead of "if (f>r)/*(n == m || log(f) * sqrt(f) < PixelWidth * sqrt(fd) ) */", you should write:


 * if (n == m || log(f) * sqrt(f) < thick * sqrt(fd)) /* the condition for Z belonging to the Mandelbrot set or the boundary */


 * and instead of "array[((iYmax-iY-1)*iXmax+iX)*3]=0;", you should write:


 * array[((iHeight-1 - iY)*iWidth + iX)*3]=0; /* iWidth = 800, iHeight = 600 */


 * Besides:
 * 1) iYmax = 599 (not 799)
 * 2) CyMax = ay + 600*h/800 (not ay + h)
 * 3) f (first in the iteration loop) is Zx * Zx + Zy * Zy (not Zx + Zy * Zy)
 * 4) PixelWidth = h/iWidth, but PixelHeight is the same number (not h/iHeight, but "height of section"/iHeight = h/iWidth)
 * (Gertbuschmann (talk) 01:10, 23 December 2010 (UTC))


 * Thx for answer. I have made some changes based on your tips. It works now. The image looks similar ( only black and white) but the quality is not the same. How can I improve it ? --Adam majewski (discuss • contribs) 16:39, 1 March 2011 (UTC)