liliangbiao 发表于 2007-8-21 16:13

我用逃逸时间算法画的Julia集的彩色分形图

详细请见孙博文的《分形算法与程序设计-Visual C++实现》。他是用Vc++实现的,我用Matlab实现的,但是我的图像和他得到的彩色不太一样,好像他的好些!

咕噜噜 发表于 2007-8-21 16:55

能不能贴出程序来分享一下

无水1324 发表于 2007-8-21 18:56

回复 #1 liliangbiao 的帖子

看了一下你的两个帖子,基本上都是图片欣赏类的,建议发到图片版?

liliangbiao 发表于 2007-8-22 10:18

不是欣赏啊!我这里是讨论啊!因为我说了孙博文先生画的要比我做的好些,我现在向大家请教如何在Matlab里面实现他那种色彩特别逼真的分形图,我在Matlab里面调试了好久,也没有实现,不知道大家能不能帮这个忙?

咕噜噜 发表于 2007-8-22 10:30

回复 #4 liliangbiao 的帖子

那你把源程序发上来啊,一者大家可能没时间找书再自己编程序,二者毕竟研究方向都不相同,不可能有那么充足的时间专门研究一下这个,还请见谅

liliangbiao 发表于 2007-8-22 14:23

请浏览我在研学论坛 混沌与分形上边的发表的帖子吧!

咕噜噜 发表于 2007-8-22 14:36

:@) 不好意思,我很少进研学
而且这里大多数会员可能也没有注册过那里,发到这里共享不是很好吗?为什么一定要去那里?

liliangbiao 发表于 2007-8-22 17:28

呵呵 无所谓了,这些天发帖子都累的很了,算了吧,要是真正的想学一样东西,就不怕累吧!
所以我觉得去研学没有什么错误的。互相学习一下!

[ 本帖最后由 mjhzhjg 于 2007-8-26 15:46 编辑 ]

咕噜噜 发表于 2007-8-22 17:31

回复 #8 liliangbiao 的帖子

:@) 去研学当然没错误,只是我觉得你发到这里让大家更方便共享而已
大家来这里当然想学东西,可是也要为方便大家考虑不是吗

hohoo 发表于 2007-8-22 19:04

回复 #8 liliangbiao 的帖子

到研学论坛看了 没有找到你的程序呀

liliangbiao 发表于 2007-8-22 19:47

有的!

hohoo 发表于 2007-8-24 10:25

我在研学论坛上找了一下 只找到liliangbiao这个Mandelbrot Set集的分形程序 自己没有试 大家看看
%这是画的Mandelbrot Set集的分形程序(彩色图像)!经过试验和调试是没有错误的!
Nmax = 50; scale = 0.005;
xmin = -2.4; xmax = 1.2;
ymin = -1.5; ymax = 1.5;
% Generate X and Y coordinates and Z complex values
=meshgrid(xmin:scale:xmax, ymin:scale:ymax);
z = x+1i*y;
% Generate w accumulation matrix and k counting matrix
w = zeros(size(z));
k = zeros(size(z));
% Start off with the first step ...
N = 0;
% While N is less than Nmax and any k's are left as 0
while N<Nmax & ~all(k()
% Square w, add z
w = w.^2+z;
% Increment iteration count
N = N+1;
% Any k locations for which abs(w)>4 at this iteration and no
% previous iteration get assigned the value of N
k(~k & abs(w)>4) = N;
end
% If any k's are equal to 0 (i.e. the corresponding w's never blew up) set
% them to the final iteration number
k(k==0) = Nmax;
% Open a new figure
figure
% Display the matrix as a surface
s=pcolor(x,y,k);
% If you truly want the Mandelbrot curve in B&W, comment the above line and
% uncomment these two
% s = pcolor(x, y, mod(k, 2));
% colormap()
% Turn off the edges of the surface (because the cells are so small, the
% edges would drown out any useful information if we left them black)
set(s,'edgecolor','none')
% Adjust axis limits, ticks, and tick labels
axis()
fontsize=15;
set(gca,'xtick',,'FontSize',fontsize)
set(gca,'ytick',[-ymax:0.5:ymax],'FontSize',fontsize)
xlabel('Re z','FontSize',fontsize)
ylabel('Im z','FontSize',fontsize)

yzsldj 发表于 2007-8-24 14:30

这里有更简单的Mandelbrot Set集的分形程序:

x=linspace(-2,0.5,300);
y=linspace(-1.25,1.25,300);      
=meshgrid(x,y);
n_iter=200; c=0; a=2;         
W=mandelbrot(X,Y,c,a,n_iter);                     
pcolor(X,Y,W), shading flat;
axis('square'); colormap prism(256);


function W=mandelbrot(X,Y,c,a,n_iter)         
C=X+i*Y;
W=zeros(size(X));
Z=c;
for k=1:n_iter,
   Z=Z.^2+C;                                 
   i0=find(abs(Z)>a);
   W(i0)=k;
Z(i0)=NaN;
end
i0=find(W==0); W(i0)=NaN;

zhangnan3509 发表于 2007-8-29 21:53

回复 #6 liliangbiao 的帖子

这么做好像不怎么厚道吧

huang880116 发表于 2008-7-1 13:40

急啊,我的作业

有没有画julia集的程序啊?在matlab上实现
页: [1] 2
查看完整版本: 我用逃逸时间算法画的Julia集的彩色分形图