このファイルはウィキメディア・コモンズのものであり、他のプロジェクトで使用されている可能性があります。
ウィキメディア・コモンズでのファイル解説ページ にある説明を以下に示します。
概要
ライセンス
あなたは以下の条件に従う場合に限り、自由に
共有 – 本作品を複製、頒布、展示、実演できます。
再構成 – 二次的著作物を作成できます。
あなたの従うべき条件は以下の通りです。
表示 – あなたは適切なクレジットを表示し、ライセンスへのリンクを提供し、変更があったらその旨を示さなければなりません。これらは合理的であればどのような方法で行っても構いませんが、許諾者があなたやあなたの利用行為を支持していると示唆するような方法は除きます。
https://creativecommons.org/licenses/by/3.0 CC BY 3.0 Creative Commons Attribution 3.0 true true
Source code
C++ – 汎用の高水準プログラミング言語のひとつ のロゴ
This media was created with
C++ (汎用の高水準プログラミング言語のひとつ)および
MATLAB (アメリカ合衆国のMathWorks社が開発している数値解析ソフトウェアであり、その中で使うプログラミング言語の名称)
Here is a listing of the source used to create this file.
Deutsch ∙ македонски ∙ English ∙ +/−
#include <iostream>
#include <fstream>
#include <cmath>
#include <complex>
using namespace std ;
double small = 1e-14 ;
double mylog ( double );
int main (){
double A = -5 , B = 5 ;
int N = 1000 ;
double h = ( B - A ) / ( N -1 );
double theta0 = 2 * M_PI / ( N -1.0 );
ofstream mfile ( "data.txt" );
for ( int i = 0 ; i < N ; i ++ ){
double r = exp ( A + i * h );
for ( int j = 0 ; j < N ; j ++ ){
double theta = j * theta0 ;
complex < double > z2 = polar ( r , theta );
complex < double > root = sqrt ( 25.0 * z2 * z2 -12.0 * ( z2 * z2 * z2 + 1.0 ));
complex < double > z11 = ( -5.0 * z2 + root ) / 6.0 ;
complex < double > z12 = ( -5.0 * z2 - root ) / 6.0 ;
double a1 = mylog ( abs ( z11 ));
double a2 = mylog ( abs ( z12 ));
double b = mylog ( abs ( z2 ));
mfile << a1 << ' ' << b << endl ;
mfile << a2 << ' ' << b << endl ;
}
}
mfile . close ();
return 0 ;
}
double mylog ( double x ){
if ( x < 0 ){
cerr << "Error in log, negative x!" << endl ;
exit ( 0 );
}
if ( x < small ){
return log ( small );
}
return log ( x );
}
Matlab code which reads the data output by the C++ code and graphs it
A=load('data.txt');
plot(A(:, 1), A(:, 2), '.');
axis equal; axis off;
axis([-4 6 -5 5])
saveas(gcf, 'amoeba2.eps', 'psc2');
元のアップロードログ
This image is a derivative work of the following images:
Uploaded with derivativeFX
ファイルの履歴
過去の版のファイルを表示するには、その版の日時をクリックしてください。
日時 サムネイル 寸法 利用者 コメント
現在の版 2012年8月8日 (水) 15:49 940 × 904 (1キロバイト) wikimediacommons>Zerodamage == {{int:filedesc}} == {{Information |Description=== |Source={{Derived from|Amoeba2.png|display=50}} |Date=2012-08-08 14:47 (UTC) |Author=*File:Amoeba2.png : Oleg Alexandrov *derivative work: [[User:{{subst:REVISIONUSER}}|...
ファイルの使用状況