我已經在php中創建了mandelbrot,但mandelbrot看起來有點奇怪。我該如何改進它? Mandelbrot壞圖像精確顏色循環?
你可以在這裏找到一個生動的例子:http://www.phpdevpad.de/index.php?id=190。
更新:曼德爾布羅變焦與900次迭代:
更新:我使用計算天壤之別的這個方法:
double Re_factor = (MaxRe-MinRe)/(ImageWidth-1);
double Im_factor = (MaxIm-MinIm)/(ImageHeight-1);
double newMinRe = MinRe + (Re_factor* x1);
double newMaxRe = MinRe + (Re_factor* x2);
double newMinIm = MinIm + (Im_factor* y1);
double newMaxIm = MinIm + (Im_factor* y2);
// and then I compute c - real and c- imag values
for(unsigned y=0; y<ImageHeight; ++y)
{
double c_im = newMinIm - y*Im_factor;
for(unsigned x=0; x<ImageWidth; ++x)
{
double c_re = newMinRe + x*Re_factor;
// ComputeMandelbrot();
}
}
你能發佈一個到源的鏈接嗎?或者在這裏包含相關的位? – ethrbunny
@ethrbunny:完成。閱讀我的更新。 – Bytemain
在Julia集教程中...連接的Julia集總是包含0 + 0i點。斷開的一個不包含該點。因此,通過針對K的不同值測試點0 + 0i,您可以創建連接的茱莉亞集的地圖。這張地圖是Julia集合的Mandelbrot集合。曼德爾布羅特通過繪製茱莉亞集合發現了這種形狀。 – phkahler