tsujimotterの下書きノート

このブログは「tsujimotterのノートブック」の下書きです。数学の勉強過程や日々思ったことなどをゆるーくメモしていきます。下書きなので適当です。

記事一覧はこちらです。このブログの趣旨はこちら

メインブログである「tsujimotterのノートブログ」はこちら

Gnuplot を使った楕円曲線の書き方

今日扱いたい楕円曲線はこれ。

 y^2 = x^3 - 2

同次型がこれ。

 y^2 z = x^3 - 2z^3

 z = 1, x = 1, y = 1 とそれぞれ代入して,二次元平面に射影したあと,それぞれの平面で書いたグラフがこちら。

f:id:tsujimotter:20150220225123p:plain:w400


実はこのグラフを書くだけでも,結構苦労したんだ。

だって,楕円曲線って「陰関数」だからね。いつもの Gnuplot じゃあ難しいんですよ。


やり方としては,

 f(x, y)= 0

となるような,等高線を書いてあげるんですけど,まあ口で説明してもアレなんで,Gnuplot の描画スクリプトを残しておきます。

# define elliptic curves
f1(x,y) = y*y - (x*x*x - 2)
f2(x,y) = x*x*y - (1 - 2*y*y*y)
f3(x,y) = x - (y*y*y - 2*x*x*x)

# set drawing styles
set style line 1 lt 1
set style line 2 lt 1
set style line 3 lt 2
set style line 4 lt 2
set style line 5 lt 3
set style line 6 lt 3
set style increment user

set key left top
set zeroaxis
unset ztics

# main part for drawing chart
C=10
set xrange[-C:C]
set yrange[-C:C]
set isosamples 100,100
set contour base
set cntrparam levels discrete  0.0
set nosurface
set size square
set view 0,0,,

splot f1(x,y) t 'y^2 - (x^3-2) =', f2(x,y) t 'y^2 z - (1-2z^3) =', f3(x,y) t 'z - (x^3-2z^3) ='


以下のページを参考にしました。

Gnuplot's Tips