* スピログラフ [#pf6b47a1]
#af_amazon(B00260N2GG,right)
[[スピログラフ>WikiPedia.ja:スピログラフ]]というおもちゃがある.
大きな内歯車の中に小歯車を入れて,小歯車の穴にペン先を突っ込んで,歯車をぐるぐる回すと幾何学模様が描かれる,というものである.
オイラもガキの時分に祭の夜店に売られてるのを買ってもらった記憶がある.
今ではダイソーなんかの 100 円ショップでも売られてるそうである.

数学的には[[内トロコイド>WikiPedia.ja:トロコイド#.E5.86.85.E3.83.88.E3.83.AD.E3.82.B3.E3.82.A4.E3.83.89]]という名前の曲線だそうであり,リンク先にには媒介変数表示の数式も書かれている.
#clear

残念ながらこの時間はダイソーは開いてないので,gnuplot を使って内トロコイド曲線を描いてみた.
残念ながらこの時間はダイソーは開いてないので,[[gnuplot>http://www.gnuplot.info/]] を使って内トロコイド曲線を描いてみた.

 $ gnuplot 
 
 	G N U P L O T
 	Version 4.6 patchlevel 3    last modified 2013-04-12 
 	Build System: Linux i686
 
 	Copyright (C) 1986-1993, 1998, 2004, 2007-2013
 	Thomas Williams, Colin Kelley and many others
 
 	gnuplot home:     http://www.gnuplot.info
 	faq, bugs, etc:   type "help FAQ"
 	immediate help:   type "help"  (plot window: hit 'h')
 
 Terminal type set to 'wxt'
 gnuplot> set parametric        # 媒介変数モードに.
 
 	dummy variable is t for curves, u/v for surfaces
 gnuplot> set samples 10000     # サンプル数.図形がカクカクするときは増やしてみる
 gnuplot> set trange [0:100]    # 媒介変数の範囲.
 gnuplot> rc=1                  # 内歯車の半径
 gnuplot> rm=0.61               # 小歯車の半径
 gnuplot> rd=0.5                # 小歯車の穴の半径
 gnuplot> plot (rc-rm)*cos(t)+rd*cos((rc-rm)/rm*t),(rc-rm)*sin(t)-rd*sin((rc-rm)/rm*t) # プロット
 gnuplot> set trange [0:1000]   # 途中までしか表示されなかったので,媒介変数の範囲を増やして
 gnuplot> replot                # プロットしなおし
 gnuplot>

#ref(Screenshot_from_2013-06-10 23:01:25.png,right,around,50%)
こんなかんじ.

rm や rd の値をいろいろ変えて遊んでみてね.
#clear

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS