2. 関数とグラフ


グラフィックソフト gnuplot を使って, MuPAD による代数計算の理解を深める.

■基本的利用法 --- plot コマンド
・"plot sin(x)" と入力(して Enter)する.
gnuplot-1.png
・グラフのウィンドウが現れる.
gnuplot-3.png

■諸設定 --- set コマンド
・諸設定は set コマンドをつかう.
gnuplot-4.png
・以後の plot に設定が反映される.
gnuplot-5.png

■設定ファイル
・設定をテキストファイルとして保存( gnuplot00.pltとする)
・メニュー:[File]-[Open] から設定ファイル(gnuplot00.plt)を読み込む
gnuplot00.png
■三角関数のグラフ ( beat.plt )
■Taylor 展開 1 ( gnuplot01.plt )
gnuplot01.png
■Taylor 展開 2 ( gnuplot02.plt )
gnuplot02.png
■Taylor 展開 3 ( gnuplot03.plt )
gnuplot03.png
■Taylor 展開 4 ( gnuplot04.plt )
gnuplot04.png
■Taylor 展開 5 ( gnuplot05.plt )
gnuplot05.png
■Fourier 展開 1 ( gnuplot06.plt )
gnuplot06.png
■Fourier 展開 2 ( gnuplot07.plt )
gnuplot07.png
■Fourier 展開 3 ( gnuplot08.plt )
gnuplot08.png


■極座標

gnuplot19.plt
# gnuplot19.plt
reset
set zeroaxis
set polar
l=1;  f(t)=l/(1+e*cos(t))
set xrange [-1.5:1.5];set yrange [-1.5:1.5];set trange [-pi:pi]
plot e=0, f(t) title "e=0", \
     e=0.1, f(t) title "e=0.1", \
     e=0.3, f(t) title "e=0.3", \
     e=0.5, f(t) title "e=0.5", \
     e=0.7, f(t) title "e=0.7"

gnuplot19
gnuplot20.plt
# gnuplot20.plt
reset
set zeroaxis
set polar
l=1;  f(t)=l/(1+e*cos(t))
set xrange [-1.5:1.5];set yrange [-1.5:1.5];set trange [-pi:pi]
plot e=1, f(t) title "e=1", \
     e=3, f(t) title "e=2", \
     e=5, f(t) title "e=3"

gnuplot20


■Cinderella:ケプラー運動のシミュレーション

ケプラー運動(惑星の運動)のシミュレーション. 点 C は,点 A を中心とする円周上を一定速度で運動する. このとき, 線分 CB の垂直二等分線と線分 AC の交点 E は, 点 A, B を焦点とする楕円上を運動する. 点 E の運動は一様でないことに注意せよ (点 B のまわりの面積速度が一定になる). ↓下の画像をクリックするとアニメーションがはじまる.

Cinderella


■逆関数

リサジュー
gnuplot21.plt


gnuplot21
トロコイド
gnuplot22.plt


gnuplot22
逆関数
gnuplot23.plt


gnuplot23


■3D グラフィクス

3D プロットにはコマンド splot をつかう.
splot x**2 + y**2

gnuplot18

■gnuplot によるアニメーション

2 つのファイルが必要である.
アニメーション設定 1 ( gnuplot09.plt , gnuplot10.plt )
アニメーション設定 2 ( gnuplot11.plt , gnuplot12.plt )
アニメーション設定 3 ( gnuplot13.plt , gnuplot14.plt )
gnuplot13
アニメーション設定 4 ( gnuplot15.plt , gnuplot16.plt )
gnuplot15