半自動で回す

  • 図を回転させるには、視点を変える必要がある。ずーっと回し続けるには、視点を元に戻す必要がある。
  • GIFのファイルは、複数のGIFをまとめて1ファイルにすることで、パラパラ画像にすることができる。パラパラ画像には、パラパラめくるときの順序と、速さのパラメタと、何回繰り返すかのパラメタが必要になる。
    • GIFをまとめるコマンド(の多く)は、順序のデフォルト指定があるようで、ファイル名がコマンドラインで認識される順序で順序づけるらしい。したがって、ファイルは"f01.txt""f02.txt"...."f10.txt""f11.txt"のように、順序をファイルに持たせるのがよい。また、f1.txt"と"f10.txt"とがつながるのが困るだろうことから、"f01.txt"としている。ファイルの順序は辞書式順序の評価(がデフォルト)だからである。
    • gnuplot内のループ処理にて、GIFファイル名に順序数値を入れるのは難しいらしく、シェルスクリプトなどをかませる方法がウェブ上に見つけられるが、それも面倒くさいし、視点指定なども、ある程度試行錯誤が必要なので、「べたに」gnuplotにコマンドを渡すことにします(以下のべたべたコマンド列のように。。。)最後の"set terminal win;splot "M1M2nltp.txt"2は最後のgifファイルをきちんと出力するためのダメ出しコマンド。
  • gifファイルをまとめる。Windows上でもできそうだけれど、Linuxに出力された全ファイルを特定のディレクトリに置いて、"convert -delay 100 0 *.gif animation.gif"としてやって、出来たのが、掲載の動くgif(ただし、はてなの掲載図ファイルサイズの制約の関係で、実際には、視点の数を間引いて作成したアニメーションgifファイルを掲載)

set terminal gif; set output "AnimationTest\\outY001.gif"; set view 0,90;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY002.gif"; set view 15,100;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY003.gif"; set view 30,120;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY004.gif"; set view 45,135;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY005.gif"; set view 60,150;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY006.gif"; set view 75,165;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY007.gif"; set view 90,180;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY008.gif"; set view 105,165;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY009.gif"; set view 120,150;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY010.gif"; set view 135,135;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY011.gif"; set view 150,120;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY012.gif"; set view 165,105;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY013.gif"; set view 180,90;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY014.gif"; set view 165,75;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY015.gif"; set view 150,60;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY016.gif"; set view 135,45;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY017.gif"; set view 120,30;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY018.gif"; set view 105,15;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY019.gif"; set view 90,0;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY020.gif"; set view 75,15;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY021.gif"; set view 60,30;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY022.gif"; set view 45,45;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY023.gif"; set view 30,60;splot "M1M2nltp.txt"
set terminal gif; set output "AnimationTest\\outY024.gif"; set view 15,75;splot "M1M2nltp.txt"




set terminal win;splot "M1M2nltp.txt"