■ソフトの目的
マンデルブロ集合を表示するソフトです。
■特徴
- マルチスレッド対応
- libgmpを用いた任意精度計算
- PNG形式の画像を出力
- 画像品質を向上させるオーバサンプリング
- 簡単な動画作成機能(*1)
■入手先
ページの最後のほうにある"Download"から"mandelbrot-1.0.tar.gz"を入手ずる。
■コンパイル方法
基本的には"mandelbrot-1.0.tar.gz"の中に入っている"INSTAL"ファイルに記載されている手順を実行すればOKです。私はいつものごとくdebian/wheezy上でコンパイルしました。
(1) ライブラリの準備
コンパイルには以下のライブラリが必要とのこと。
- libgd2-xpm-dev
- libgmp3-dev
1 2 | # apt-get install libgd2-xpm-dev # apt-get install libgmp3-dev |
(2) makeする
makeが成功すると./docの下に"mandelbrot"という実行ファイルが出来ます。
1 2 3 | # cmake . (cmakeがない場合はapt-get install cmakeを実行) # make # make install (必要な場合) |
■使い方
引数"-?"を付けてコマンドを実行すると使用方法が表示されます。
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 32 33 34 35 36 | $ mandelbrot -? Deep Mandelbrot v1.0, (C)2008-2010 by Herbert Haas and Tim Horton Started: Sat May 24 19:46:25 2014 Deep Mandelbrot v1.0, (C)2008-2011 by Herbert Haas and Tim Horton USAGE: mandelbrot [OPTIONS] <config_file> -? print this help - v be verbose during execution -V be even more verbose during execution -d create distance data file for further analysis -H create histogram file for further analysis -g create a PNG version with a white grid -i <maxiter> maximum iteration depth (1-999999) [default: 200] -t <num_threads> number of threads to be used (1-30) [default: 4] -o <outfile> filename for computed image (no file extension needed) -f <infile> create PNG with data from this file (no computation) (e.g. the result of a distance file (-d option) can be used) -s <oversampling> amount of oversampling (1-8) [default: 2] -w <width> image pixel width (10-10000) [default: 500] -h <height> image pixel height (10-10000) [default: 500] -c <color_mode> specify color mode (0-255) [default: 0] or 'auto' -m <set_color> color of Mandelbrot set ( if not black) as six hexadecimal digits, e. g. ffa500. -M <steps> create movie using <steps> frames -x <target_x> target of movie on x-axis in percent of current image -y <target_y> target of movie on y-axis in percent of current image NOTE: valid x /y-parameters : {-100..+100}, with respect to the center of the current frame {0,0} -r <radius> radius of last movie frame in percent of first frame NOTE: Command line parameters overwrite the correspondig settings in <config_file>. If only -w OR only -h is given, then the other parameter is assigned the same value. < /config_file >< /radius >< /target_y >< /target_x >< /steps >< /steps >< /set_color >< /color_mode >< /height >< /width >< /oversampling >< /infile >< /outfile >< /num_threads >< /maxiter >< /config_file > |
■使用例
(1) デフォルト
引数を何もつけずに実行するとマンデルブロ集合の全体図を出力します。
1 2 3 4 | $ mandelbrot $ ls mandelbrot.png $ |

(2) コンフィグファイルを指定して実行
コンフィグファイルのサンプルが./doc/input_files/にあります。
1 2 3 | $ ls doc /input_files/ README neck satellite seahorse $ |
1 2 3 4 5 | # seahorse centerx = -0.7435669 centery = 0.1314023 radius = 0.0011439 maxiter = 500 |
- 表示したい位置の中心座標(centerx,cenery)
- 半径(radius)
- 計算の繰り返し上限値(maxiter)
1 2 3 | $ mandelbrot seahorse $ ls seahorse.png |

(3) コンフィグファイルと引数の組み合わせ例
1 2 3 4 | $ namdelbrot -g seahorse // PNG画像に座標目盛を付けます $ namdelbrot -w 2000 seahorse // PNG画像を2000x2000ピクセルで出力します $ namdelbrot -i 3000 seahorse // 計算の繰り返し上限値を3000にします(*2) $ namdelbrot -s 3 seahorse // オーバサンプリング値を3にします |
0 件のコメント:
コメントを投稿