Scratchpad Wiki
Advertisement

ジュリア集合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;
	}
Gnuplot julia-a3

2008/07/24 12:23

プロフィール
  • 名前:Tommy6
  • ニックネーム:( ・ω・)
  • 性別:男
  • 生年月日:
  • 出身地:北
  • 血液型:B
2008年07月
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
最近の記事

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> 注意:トップページからのみ日記を作成してください。他のページから作ると記事空間がおかしくなります。


Advertisement