ジュリア集合2面倒なのでソースと結果だけ。 #include <stdio.h> #define A 3.4 #define XS 0 #define XE 1 #define YS -0.25 #define YE 0.25 #define X_ORDER 0.002 #define Y_ORDER 0.002 int main(void) { FILE *fs; int count=1; double x0,xn,xn1,y0,yn,yn1; x0=XS; y0=YS; fs=fopen("plot_mandelbrot.dat","w+"); while(x0 <= XE) { y0=YS; while(y0 <= YE) { xn=x0; yn=y0; count=0; while(1) { xn1=A*(xn-xn*xn+yn*yn); yn1=A*yn*(1-2*xn); if(xn1>1000||yn1>1000||xn1<-1000||yn1<-1000) { break; } else if(count>=1000) { fprintf(fs,"%lf %lf\n",x0,y0); break; } count++; xn=xn1; yn=yn1; } y0+=X_ORDER; } x0+=Y_ORDER; } fclose(fs); return 0; } 2008/07/24 12:23 |
プロフィール
2008年07月
最近の記事
Extension:DynamicPageList3 (DPL3), version 3.5.2: Error: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants アーカイブ
Extension:DynamicPageList3 (DPL3), version 3.5.2: Error: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants YouTube
日記を書く <createbox> width=20% preload=Make/Dialy prefix=Alpha 1/ジュリア集合2/ buttonlabel=作る </createbox> 注意:トップページからのみ日記を作成してください。他のページから作ると記事空間がおかしくなります。 |