Homeに戻る  一覧に戻る 

Drawing Algebraic Curves by Asir


Asirで代数曲線のグラフを描く[2002.01.20]


asir2000には、2変数x,yの多項式の零点のグラフを描く関数ifplotを持つ。
ここでは、いくつかの楕円曲線やlemniscateなどをasirで描いてみる。
手順は以下の通りである。
  1. NetBSD-1.5.1のX上で、asirを起動する。
  2. 関数ox_launch()で、引数commandに"ox_plot"を指定する。
    ox_launch:localウインドウが開く。
  3. 関数ifplot()で、多項式や描画範囲などを指定する。
    新ウインドウが開き、指定された多項式の零点のグラフが表示される。
  4. 必要に応じて、[print]ボタンをクリックして、psファイルに保存する。
    または、xwdでウインドウのダンプを取って、画像変換ツールなどでgif/jpeg形式に変換する。
    xwd -frame -icmap -name "x^3+y^3=382 : 0/0" >xxx.xwd
    xwd -frame -icmap -name "y^2=x^3-432*382^2 : 0/1" >xxx2.xwd
  5. 関数ox_shutdown()で、ox_plotを落す。
  6. quitで、asirを終了する。
[実行例]
bash-2.05$ asir 
This is Risa/Asir, Version 20010817 (Kobe Distribution).
Copyright (C) 1994-2000, all rights reserved, FUJITSU LABORATORIES LIMITED.
Copyright 2000,2001, Risa/Asir committers, http://www.openxm.org/.
GC 5.3, copyright 1999, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.
PARI 2.0.17(beta), copyright (C) 1989-1999,
     C. Batut, K. Belabas, D. Bernardi, H. Cohen and M. Olivier.
[0] ox_launch(0,"/usr/gnu/lib/asir","ox_plot");
0
[1] ifplot(x^3+y^3-382,[400,400],[x,-15,15],[y,-15,15],0,"x^3+y^3=382");
0
[2] ifplot(x^3-432*382^2-y^2,[400,400],[x,-100,2500],[y,-150000,150000],0,"y^2=x^3-432*382^2");
0
[3] ifplot(x^4+y^2-17,[400,400],[x,-4.5,4.5],[y,-4.5,4.5],0,"x^4+y^2=17");
0
[4] ifplot((x^2+y^2)^2-2*(x^2-y^2),[400,400],[x,-2,2],[y,-2,2],0,"lemniscate");       
0
[5] ox_shutdown(0);
0
[6] quit;

[グラフの描画例]
x^3+y^3=382 y^2=x^3-432*382^2
x^4+y^2=17 lemniscate
(x^2+y^2)^2=2*(x^2-y^2)

参考文献



Last Update: 2005.06.12
H.Nakao

Homeに戻る[Homeに戻る]  一覧に戻る[一覧2002に戻る]