看了novus的blog發現新圖了http://novus.pixnet.net/blog/post/26669849
,趁這次心情好趕快寫出來~~~
我有用histogram跟colortable來畫,不過感覺蠻怪的= =

程式載點:http://damody.googlecode.com/files/Buddhabrot.rar
新增tga存檔功能:http://damody.googlecode.com/files/BuddhabrotTGA.rar
可以存超大的檔,試了10000x10000可以畫出超細的圖,不過有381mb那麼大qq

修改了可以動態給值,只要按下任意鍵就可以輸入以空格格開的三個參數。

因為用histogram拉開的關係,ITER_MAX感覺只有剩下精確度的功能

用下面的參數畫的

const double REAL_MAX = 2, REAL_MIN = -2;
const double IMAG_MAX = 2, IMAG_MIN = -2;

我的color是

ct.push_back(histogram.GetPersentValue(0),    Color4(0,    0,    0,255));
    ct.push_back(histogram.GetPersentValue(0.25),    Color4(100,    0,    255,255));
    ct.push_back(histogram.GetPersentValue(0.5),    Color4(0,    255,    255,255));
    ct.push_back(histogram.GetPersentValue(0.75),    Color4(255,    255,    0,255));
    ct.push_back(histogram.GetPersentValue(0.99),    Color4(255,    0,    0,255));
共設五個百分比

下面這個是我覺得最帥的圖形了

arrow
arrow
    全站熱搜

    讓地獄深紅的天亮 發表在 痞客邦 留言(2) 人氣()