精華區beta NTUNL 關於我們 聯絡資訊
以下是mandelbrot set:(其實也不是我完成的...) limit = 250; dif = 0.02; for a = -2 : dif : 2; for b = -2 : dif : 2; c = complex(a,b); z = 0; count = 1; while count < limit z = z^2 + c; if abs(z) > 2 break; end count = count + 1; end if count == limit plot(a, b, '.'); hold on; end end end hold off; -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.223.94
ANUBISANKH:感謝 11/26 09:37