Friday, February 03, 2006
Gnuplot Usage@python
fac(n) = (n==0) ? 1 : n * fac(n-1) fac(x) = (int(x)==0) ? 1.0 : int(x) * fac(int(x)-1.0) stirling(x) = sqrt(2*pi*x) * x**x * exp(-x) set xrange [1:15] set yrange [1:1e+10] set log y set sample 15 plot stirling(x) notitle with lines, fact(x) notitle with points #fact(n) ~ sqrt(2pi*x)x^x*exp(-x)
http://t16web.lanl.gov/Kawano/gnuplot/index-e.html
http://members.aol.com/demalion2/index.html http://www.blender3d.org/cms/Home.2.0.html
http://www.geom.uiuc.edu/~banchoff/projects.html torus
http://mathworld.wolfram.com/Torus.html
http://www.mmit.stc.sh.cn/telecenter/CnHisScience/yuanzhou.htm
http://www.mathland.idv.tw/ 昌爸工作坊
http://zh.wikipedia.org/wiki/%E5%9C%93%E5%91%A8%E7%8E%87 割圓術、圓周率
gnuplot是用來繪圖專用的軟體,它符合組合學習的方式,所以就來練習一下。
參考連結:
如果用攝氏和華氏的溫度轉換來學習,應該是很好的應用範例。
F=C*1.8+32,可以列出下列的數據對:
-49 -56.20 -42 -43.60 -35 -31.00 -28 -18.40 -21 -5.80 -14 6.80 -7 19.40 0 32.00 7 44.60 14 57.20 21 69.80 28 82.40 35 95.00 42 107.60
然後透過python令gnuplot來畫圖。
同樣的方式,也可以來畫2次函式圖,如繪出3x^2+9x-83的函式圖,比較可以直覺地教授2次函 式的特性如:頂點、向上vs向下、與x軸的交點、面積...>等等。