LoginSignup
0
0

More than 1 year has passed since last update.

【Gnuplot】【備忘録】球面上を大円を描いて移動する点のgifの作成方法

Posted at

何かと簡単に図が描けるGnuplotは、非常に便利な反面機能が多いので、試行錯誤しながら覚えていく必要がある。

今回は、球面を描いて、球面状を大円を描いて移動する点を描写するグラフのプログラムを作成した。

わからなくなったときに見直す用なので特に説明無し。

sphere.gp
#!/usr/bin/env gnuplot -dc -persist

set term gif animate optimize delay 5 size 960,720
set output 'sphere.gif'

set parametric
set view equal xyz
#set isosample 20,20
#set sample 20

set urange [0:2*pi]
set vrange [0:2*pi]

omega = pi/1000
do for [it = 1: 1000] {
    splot cos(v)*cos(u), cos(v)*sin(u), sin(v)
    set label 1 point pt 7 ps 2 at cos(pi)*cos(omega*it), cos(pi)*sin(omega*it), sin(pi) # このプログラムの一番の特徴。ポイントを球面に沿って移動させている。
}

set output

sphere.gif

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0