SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
円錐曲線の極座標表示

    まるやま



   2013/03/28




                1 / 20
円錐曲線を極座標表示したい



  円錐曲線を極座標表示をしたいんです
    時計の針を表示する場合
    自由落下する様を表現したい場合
  円錐曲線を極座標表示しようよ
    Lua を使う
    めんどくさいから、半径は1とする
    第1象限を0秒から59秒で移動することを考える
      0秒の時に (0, 1)(Y軸上)にいて、
      59秒の時に (a, 0)(X軸上 (0 < a ≤ 1))にいるとする




                                             2 / 20
円の場合
                                            circ.lua
 x   = sin θ                                for t = 0, 59, 1 do
                                              th = math.pi / 2 * t / 59
 y = cos θ                                    x, y = math.sin(th), math.cos(th)
     π t
 θ =           (0 ≤ t < 60)                   print(x, y)
                                            end
     2 59
                   1
                  0.9
                  0.8
                  0.7
                  0.6
                  0.5
                  0.4
                  0.3
                  0.2
                  0.1
                   0
                        0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1


                                   図 1: 円
                                                                                  3 / 20
円錐曲線の極座標一般系



                x   = r sin θ
                y   = r cos θ + e
                         1 − e2
                r   =
                      1 + e cos θ


  e = 0 の場合、円
  0 < e < 1 の場合、楕円
  e = 1 の場合、放物線(r の分子は定数とする)
  1 < e の場合、双曲線



                                    4 / 20
双曲線の曲座標表示
                                bola.lua
                                e, div = 2, 240
 x   = r sin θ                  for t = 0, div, 1 do
 y   = r cos θ + e                th = 2 * math.pi * t / div
                                  r = (1-e*e)/(1+e*math.cos(th))
          1 − e2                  x, y = r*math.sin(th), r*math.cos(th)+e
 r   =                            print(x, y)
       1 + e cos θ              end

                     10
                      8
                      6
                      4
                      2
                      0
                     -2
                     -4
                     -6
                     -8
                     -10
                        -10 -8 -6 -4 -2   0   2   4   6   8   10



                       図 2: 双曲線(全体)
                                                                            5 / 20
右肩下がりの双曲線
  円の場合と同じように、(0,1) から出発して右肩下がりに
    図 2 の右下の部分のみを使いたい
  下の双曲線の頂点を (0,1) に移動する
    y に 2 を足す
    t = 0 の時に θ = π となるように
    t が増えるに従い、θ は減らす
  この時に、x 切片(y = 0)の時の θ を求める

     1 − e2
               cos θ + e + 2 = 0
   1 + e cos θ
               (1 − e 2 ) cos θ = −(e + 2)(1 + e cos θ)
                                     e +2
                          cos θ = −
                                    2e + 1
                                            e +2
                              θ = arccos (−        )
                                            2e + 1
                                                          6 / 20
右肩下がりの双曲線
 bola.lua
 e, div = 2, 59
 d = math.pi - math.acos(-(e+2)/((2*e)+1))
 for t = 0, div, 1 do
   th = math.pi-(d*t/div)
   r = (1-e*e)/(1+e*math.cos(th))
   x, y = r*math.sin(th), r*math.cos(th)+e+2
   print(x, y)
 end

                          1
                         0.9
                         0.8
                         0.7
                         0.6
                         0.5
                         0.4
                         0.3
                         0.2
                         0.1
                          0
                               0   0.5   1   1.5   2   2.5   3



                      図 3: 双曲線(右肩下がり)
                                                                 7 / 20
切片を調節した双曲線

  切片の x 座標を a にしたい
                           e+2
  切片なので、この時の θ は arccos (− 2e+1 )


                     1 − e2
                               sin θ = a
                   1 + e cos θ
                 √     (         )
        1 − e2            e +2 2
                   1−                = a
      1 − e 2e+1
            e+2          2e + 1
                       √
                         3(e 2 − 1)
              (2e + 1)               = a
                         2e + 1
                                       √
                                           a2
                              e =             +1
                                           3


                                                   8 / 20
切片を調節した双曲線
 bola.lua
 a, div = 0.8, 59
 e = math.sqrt((a*a/3)+1)
 d = math.pi - math.acos(-(e+2)/((2*e)+1))
 for t = 0, div, 1 do
   th = math.pi-(d*t/div)
   r = (1-e*e)/(1+e*math.cos(th))
   x, y = r*math.sin(th), r*math.cos(th)+e+2
   print(x, y)
 end

                          1
                         0.9
                         0.8
                         0.7
                         0.6
                         0.5
                         0.4
                         0.3
                         0.2
                         0.1
                          0
                               0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1



                                    図 4: 双曲線                             9 / 20
放物線の曲座標表示
                                  para.lua
                                  c, div = 1, 240
 x   = r sin θ                    for t = 0, div, 1 do
                                    th = 2 * math.pi * t / div
 y   = r cos θ + 1                  r = c/(1+math.cos(th))
           c                        x, y = r*math.sin(th), r*math.cos(th)+1
 r   =
       1 + cos θ                    print(x, y)
                                  end

                     2
                     1
                     0
                     -1
                     -2
                     -3
                     -4
                     -5
                     -6
                     -7
                     -8
                          -5 -4 -3 -2 -1   0   1   2   3   4   5



                          図 5: 放物線(全体)
                                                                              10 / 20
右肩下がりの放物線

  円の場合と同じように、(0,1) から出発して右肩下がりに
    図 5 の右の部分のみを使いたい
  放物線の頂点を (0,1) に移動する
    y から c を引く
           2
    t = 0 の時に θ = 0
    t が増えるに従い、θ は増やす
  この時に、x 切片(y = 0)の時の θ を求める

       c                  c
              cos θ + 1 −     = 0
    1 + cos θ             2
                                2−c
                    c cos θ = −        (1 + cos θ)
                                  2
              (c + 2) cos θ = −(2 − c)
                                       c −2
                          θ = arccos (       )
                                       c +2

                                                     11 / 20
右肩下がりの放物線
 para.lua
 c, div = 1, 59
 b = math.acos((c-2)/(c+2))
 for t = 0, div, 1 do
   th = b*t/div
   r = c/(1+math.cos(th))
   x, y = r*math.sin(th), r*math.cos(th)+1-(c/2)
   print(x, y)
 end

                          1
                         0.9
                         0.8
                         0.7
                         0.6
                         0.5
                         0.4
                         0.3
                         0.2
                         0.1
                          0
                               0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2



                      図 6: 放物線(右肩下がり)
                                                                       12 / 20
切片を調節した放物線

  切片の x 座標を a にしたい
  切片なので、この時の θ は arccos ( c−2 )
                          c+2

                        c
                              sin θ = a
                    1 + cos θ
                  √    (        )
             c            c −2 2
                    1−              = a
          1 + c−2
              c+2
                          c +2
                             √
                      c + 2 8c
                                    = a
                         2 c +2
                                      a2
                                  c =
                                       2



                                           13 / 20
切片を調整した放物線
 para.lua
 a, div = 0.8, 59
 c = a*a/2
 b = math.acos((c-2)/(c+2)) for t = 0, div, 1 do
   th = b*t/div
   r = c/(1+math.cos(th))
   x, y = r*math.sin(th), r*math.cos(th)+1-(c/2)
   print(x, y)
 end

                          1
                         0.9
                         0.8
                         0.7
                         0.6
                         0.5
                         0.4
                         0.3
                         0.2
                         0.1
                          0
                               0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1



                                    図 7: 放物線
                                                                         14 / 20
楕円の曲座標表示
                                      elli.lua
                                      e, div = 0.5, 240
 x   = r sin θ                        for t = 0, div, 1 do
 y   = r cos θ + e                      th = 2 * math.pi * t / div
                                        r = (1-(e*e))/(1+(e*math.cos(th)))
          1 − e2                        x, y = r*math.sin(th), r*math.cos(th)+e
 r   =                                  print(x, y)
       1 + e cos θ                    end

                       1
                     0.8
                     0.6
                     0.4
                     0.2
                       0
                     -0.2
                     -0.4
                     -0.6
                     -0.8
                      -1
                            -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1



                             図 8: 楕円(全体)
                                                                                  15 / 20
右肩下がりの楕円


  円の場合と同じように、(0,1) から出発して右肩下がりに
    図 8 の右上の部分のみを使いたい
  x 切片(y = 0)の時の θ を求める

        1 − e2
                  cos θ + e = 0
      1 + e cos θ
             (1 − e 2 ) cos θ = −e(1 + e cos θ)
                     cosθ = −e
                        θ = arccos (−e)




                                                  16 / 20
右肩下がりの楕円
 elli.lua
 e, div = 0.5, 59
 b = math.acos(-e)
 for t = 0, div, 1 do
   th = b*t/div
   r = (1-(e*e))/(1+(e*math.cos(th)))
   x, y = r*math.sin(th), r*math.cos(th)+e
   print(x, y)
 end

                          1
                         0.9
                         0.8
                         0.7
                         0.6
                         0.5
                         0.4
                         0.3
                         0.2
                         0.1
                          0
                               0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1



                        図 9: 楕円(右肩下がり)
                                                                         17 / 20
切片を調節した楕円


  切片の x 座標を a にしたい
  切片なので、この時の θ は arccos (−e)

            1 − e2
                      sin θ = a
          1 + e cos θ
          1 − e2 √
                   1 − e2 = a
          1 − e2
                 √
                   1 − e2 = a
                              √
                          e =   1 − a2




                                         18 / 20
切片を調整した楕円
 elli.lua
 a, div = 0.8, 59
 c = math.sqrt(1-(a*a))
 b = math.acos(-e)
 for t = 0, div, 1 do
   th = b*t/div
   r = (1-(e*e))/(1+(e*math.cos(th)))
   x, y = r*math.sin(th), r*math.cos(th)+e
   print(x, y)
 end

                          1
                         0.9
                         0.8
                         0.7
                         0.6
                         0.5
                         0.4
                         0.3
                         0.2
                         0.1
                          0
                               0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1



                                     図 10: 楕円                            19 / 20
まとめ
       1
                                                          circle
      0.9                                                ellipse
      0.8                                              parabola
                                                      hyperbola
      0.7
      0.6
      0.5
      0.4
      0.3
      0.2
      0.1
       0
            0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

                     図 11: 円錐曲線の極座標表示

                                                                   20 / 20

Mais conteúdo relacionado

Mais procurados

【展開用】日曜数学会 Sinc関数の積分について
【展開用】日曜数学会 Sinc関数の積分について【展開用】日曜数学会 Sinc関数の積分について
【展開用】日曜数学会 Sinc関数の積分について和人 桐ケ谷
 
曲線から多様体まで駆け抜ける微分幾何学入門
曲線から多様体まで駆け抜ける微分幾何学入門曲線から多様体まで駆け抜ける微分幾何学入門
曲線から多様体まで駆け抜ける微分幾何学入門Masanari Kimura
 
東京都市大学 データ解析入門 2 行列分解 1
東京都市大学 データ解析入門 2 行列分解 1東京都市大学 データ解析入門 2 行列分解 1
東京都市大学 データ解析入門 2 行列分解 1hirokazutanaka
 
086 独立性の検定
086 独立性の検定086 独立性の検定
086 独立性の検定t2tarumi
 
はじめてのパターン認識8章サポートベクトルマシン
はじめてのパターン認識8章サポートベクトルマシンはじめてのパターン認識8章サポートベクトルマシン
はじめてのパターン認識8章サポートベクトルマシンNobuyukiTakayasu
 
070 統計的推測 母集団と推定
070 統計的推測 母集団と推定070 統計的推測 母集団と推定
070 統計的推測 母集団と推定t2tarumi
 
Rでマンデルブロ集合
Rでマンデルブロ集合Rでマンデルブロ集合
Rでマンデルブロ集合Yoshiteru Kamiyama
 
030 2変数の集計
030 2変数の集計030 2変数の集計
030 2変数の集計t2tarumi
 
東京都市大学 データ解析入門 6 回帰分析とモデル選択 1
東京都市大学 データ解析入門 6 回帰分析とモデル選択 1東京都市大学 データ解析入門 6 回帰分析とモデル選択 1
東京都市大学 データ解析入門 6 回帰分析とモデル選択 1hirokazutanaka
 
東京都市大学 データ解析入門 3 行列分解 2
東京都市大学 データ解析入門 3 行列分解 2東京都市大学 データ解析入門 3 行列分解 2
東京都市大学 データ解析入門 3 行列分解 2hirokazutanaka
 
はじめてのパターン認識8章 サポートベクトルマシン
はじめてのパターン認識8章 サポートベクトルマシンはじめてのパターン認識8章 サポートベクトルマシン
はじめてのパターン認識8章 サポートベクトルマシンNobuyukiTakayasu
 
【数学】2次方程式テスト 難易度★☆☆☆☆(1)
【数学】2次方程式テスト 難易度★☆☆☆☆(1)【数学】2次方程式テスト 難易度★☆☆☆☆(1)
【数学】2次方程式テスト 難易度★☆☆☆☆(1)Courslide
 

Mais procurados (20)

【展開用】日曜数学会 Sinc関数の積分について
【展開用】日曜数学会 Sinc関数の積分について【展開用】日曜数学会 Sinc関数の積分について
【展開用】日曜数学会 Sinc関数の積分について
 
線形計画法入門
線形計画法入門線形計画法入門
線形計画法入門
 
Master Thesis
Master ThesisMaster Thesis
Master Thesis
 
曲線から多様体まで駆け抜ける微分幾何学入門
曲線から多様体まで駆け抜ける微分幾何学入門曲線から多様体まで駆け抜ける微分幾何学入門
曲線から多様体まで駆け抜ける微分幾何学入門
 
東京都市大学 データ解析入門 2 行列分解 1
東京都市大学 データ解析入門 2 行列分解 1東京都市大学 データ解析入門 2 行列分解 1
東京都市大学 データ解析入門 2 行列分解 1
 
Study session#3
Study session#3Study session#3
Study session#3
 
Study session#3
Study session#3Study session#3
Study session#3
 
統計概論 isseing333
統計概論 isseing333統計概論 isseing333
統計概論 isseing333
 
086 独立性の検定
086 独立性の検定086 独立性の検定
086 独立性の検定
 
Slides act6420-e2014-ts-1
Slides act6420-e2014-ts-1Slides act6420-e2014-ts-1
Slides act6420-e2014-ts-1
 
はじめてのパターン認識8章サポートベクトルマシン
はじめてのパターン認識8章サポートベクトルマシンはじめてのパターン認識8章サポートベクトルマシン
はじめてのパターン認識8章サポートベクトルマシン
 
070 統計的推測 母集団と推定
070 統計的推測 母集団と推定070 統計的推測 母集団と推定
070 統計的推測 母集団と推定
 
Rでマンデルブロ集合
Rでマンデルブロ集合Rでマンデルブロ集合
Rでマンデルブロ集合
 
030 2変数の集計
030 2変数の集計030 2変数の集計
030 2変数の集計
 
東京都市大学 データ解析入門 6 回帰分析とモデル選択 1
東京都市大学 データ解析入門 6 回帰分析とモデル選択 1東京都市大学 データ解析入門 6 回帰分析とモデル選択 1
東京都市大学 データ解析入門 6 回帰分析とモデル選択 1
 
Deflection of Beam
Deflection of BeamDeflection of Beam
Deflection of Beam
 
東京都市大学 データ解析入門 3 行列分解 2
東京都市大学 データ解析入門 3 行列分解 2東京都市大学 データ解析入門 3 行列分解 2
東京都市大学 データ解析入門 3 行列分解 2
 
はじめてのパターン認識8章 サポートベクトルマシン
はじめてのパターン認識8章 サポートベクトルマシンはじめてのパターン認識8章 サポートベクトルマシン
はじめてのパターン認識8章 サポートベクトルマシン
 
Graph cut5.1 5.2_takmin
Graph cut5.1 5.2_takminGraph cut5.1 5.2_takmin
Graph cut5.1 5.2_takmin
 
【数学】2次方程式テスト 難易度★☆☆☆☆(1)
【数学】2次方程式テスト 難易度★☆☆☆☆(1)【数学】2次方程式テスト 難易度★☆☆☆☆(1)
【数学】2次方程式テスト 難易度★☆☆☆☆(1)
 

Destaque

ランダム・シャッフル
ランダム・シャッフルランダム・シャッフル
ランダム・シャッフルMaruyama Tetsutaro
 
Zipf分布に従う乱数の生成方法
Zipf分布に従う乱数の生成方法Zipf分布に従う乱数の生成方法
Zipf分布に従う乱数の生成方法Maruyama Tetsutaro
 
shot note で手書き資料作成
shot note で手書き資料作成shot note で手書き資料作成
shot note で手書き資料作成Maruyama Tetsutaro
 
Online Matching and Ad Allocaton 8章&9章半分
Online Matching and Ad Allocaton 8章&9章半分Online Matching and Ad Allocaton 8章&9章半分
Online Matching and Ad Allocaton 8章&9章半分Maruyama Tetsutaro
 
ユークリッド距離以外の距離で教師無しクラスタリング
ユークリッド距離以外の距離で教師無しクラスタリングユークリッド距離以外の距離で教師無しクラスタリング
ユークリッド距離以外の距離で教師無しクラスタリングMaruyama Tetsutaro
 
集中不等式のすすめ [集中不等式本読み会#1]
集中不等式のすすめ [集中不等式本読み会#1]集中不等式のすすめ [集中不等式本読み会#1]
集中不等式のすすめ [集中不等式本読み会#1]Kentaro Minami
 
How to Develop Experiment-Oriented Programs
How to Develop Experiment-Oriented ProgramsHow to Develop Experiment-Oriented Programs
How to Develop Experiment-Oriented ProgramsKenta Oono
 
機械学習向けプログラミング言語の使い分け - RCO の場合
機械学習向けプログラミング言語の使い分け - RCO の場合機械学習向けプログラミング言語の使い分け - RCO の場合
機械学習向けプログラミング言語の使い分け - RCO の場合Maruyama Tetsutaro
 
Stochastic Gradient MCMC
Stochastic Gradient MCMCStochastic Gradient MCMC
Stochastic Gradient MCMCKenta Oono
 
高速・省メモリにlibsvm形式で ダンプする方法を研究してみた
高速・省メモリにlibsvm形式で ダンプする方法を研究してみた高速・省メモリにlibsvm形式で ダンプする方法を研究してみた
高速・省メモリにlibsvm形式で ダンプする方法を研究してみたKeisuke Hosaka
 
Introduction of “Fairness in Learning: Classic and Contextual Bandits”
Introduction of “Fairness in Learning: Classic and Contextual Bandits”Introduction of “Fairness in Learning: Classic and Contextual Bandits”
Introduction of “Fairness in Learning: Classic and Contextual Bandits”Kazuto Fukuchi
 
Differential privacy without sensitivity [NIPS2016読み会資料]
Differential privacy without sensitivity [NIPS2016読み会資料]Differential privacy without sensitivity [NIPS2016読み会資料]
Differential privacy without sensitivity [NIPS2016読み会資料]Kentaro Minami
 
Conditional Image Generation with PixelCNN Decoders
Conditional Image Generation with PixelCNN DecodersConditional Image Generation with PixelCNN Decoders
Conditional Image Generation with PixelCNN Decoderssuga93
 
Interaction Networks for Learning about Objects, Relations and Physics
Interaction Networks for Learning about Objects, Relations and PhysicsInteraction Networks for Learning about Objects, Relations and Physics
Interaction Networks for Learning about Objects, Relations and PhysicsKen Kuroki
 
Introduction of "TrailBlazer" algorithm
Introduction of "TrailBlazer" algorithmIntroduction of "TrailBlazer" algorithm
Introduction of "TrailBlazer" algorithmKatsuki Ohto
 
Fast and Probvably Seedings for k-Means
Fast and Probvably Seedings for k-MeansFast and Probvably Seedings for k-Means
Fast and Probvably Seedings for k-MeansKimikazu Kato
 
InfoGAN: Interpretable Representation Learning by Information Maximizing Gen...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gen...InfoGAN: Interpretable Representation Learning by Information Maximizing Gen...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gen...Shuhei Yoshida
 
Improving Variational Inference with Inverse Autoregressive Flow
Improving Variational Inference with Inverse Autoregressive FlowImproving Variational Inference with Inverse Autoregressive Flow
Improving Variational Inference with Inverse Autoregressive FlowTatsuya Shirakawa
 

Destaque (20)

配列数式
配列数式配列数式
配列数式
 
ランダム・シャッフル
ランダム・シャッフルランダム・シャッフル
ランダム・シャッフル
 
Zipf分布に従う乱数の生成方法
Zipf分布に従う乱数の生成方法Zipf分布に従う乱数の生成方法
Zipf分布に従う乱数の生成方法
 
shot note で手書き資料作成
shot note で手書き資料作成shot note で手書き資料作成
shot note で手書き資料作成
 
keynoteでslideshare
keynoteでslidesharekeynoteでslideshare
keynoteでslideshare
 
Online Matching and Ad Allocaton 8章&9章半分
Online Matching and Ad Allocaton 8章&9章半分Online Matching and Ad Allocaton 8章&9章半分
Online Matching and Ad Allocaton 8章&9章半分
 
ユークリッド距離以外の距離で教師無しクラスタリング
ユークリッド距離以外の距離で教師無しクラスタリングユークリッド距離以外の距離で教師無しクラスタリング
ユークリッド距離以外の距離で教師無しクラスタリング
 
集中不等式のすすめ [集中不等式本読み会#1]
集中不等式のすすめ [集中不等式本読み会#1]集中不等式のすすめ [集中不等式本読み会#1]
集中不等式のすすめ [集中不等式本読み会#1]
 
How to Develop Experiment-Oriented Programs
How to Develop Experiment-Oriented ProgramsHow to Develop Experiment-Oriented Programs
How to Develop Experiment-Oriented Programs
 
機械学習向けプログラミング言語の使い分け - RCO の場合
機械学習向けプログラミング言語の使い分け - RCO の場合機械学習向けプログラミング言語の使い分け - RCO の場合
機械学習向けプログラミング言語の使い分け - RCO の場合
 
Stochastic Gradient MCMC
Stochastic Gradient MCMCStochastic Gradient MCMC
Stochastic Gradient MCMC
 
高速・省メモリにlibsvm形式で ダンプする方法を研究してみた
高速・省メモリにlibsvm形式で ダンプする方法を研究してみた高速・省メモリにlibsvm形式で ダンプする方法を研究してみた
高速・省メモリにlibsvm形式で ダンプする方法を研究してみた
 
Introduction of “Fairness in Learning: Classic and Contextual Bandits”
Introduction of “Fairness in Learning: Classic and Contextual Bandits”Introduction of “Fairness in Learning: Classic and Contextual Bandits”
Introduction of “Fairness in Learning: Classic and Contextual Bandits”
 
Differential privacy without sensitivity [NIPS2016読み会資料]
Differential privacy without sensitivity [NIPS2016読み会資料]Differential privacy without sensitivity [NIPS2016読み会資料]
Differential privacy without sensitivity [NIPS2016読み会資料]
 
Conditional Image Generation with PixelCNN Decoders
Conditional Image Generation with PixelCNN DecodersConditional Image Generation with PixelCNN Decoders
Conditional Image Generation with PixelCNN Decoders
 
Interaction Networks for Learning about Objects, Relations and Physics
Interaction Networks for Learning about Objects, Relations and PhysicsInteraction Networks for Learning about Objects, Relations and Physics
Interaction Networks for Learning about Objects, Relations and Physics
 
Introduction of "TrailBlazer" algorithm
Introduction of "TrailBlazer" algorithmIntroduction of "TrailBlazer" algorithm
Introduction of "TrailBlazer" algorithm
 
Fast and Probvably Seedings for k-Means
Fast and Probvably Seedings for k-MeansFast and Probvably Seedings for k-Means
Fast and Probvably Seedings for k-Means
 
InfoGAN: Interpretable Representation Learning by Information Maximizing Gen...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gen...InfoGAN: Interpretable Representation Learning by Information Maximizing Gen...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gen...
 
Improving Variational Inference with Inverse Autoregressive Flow
Improving Variational Inference with Inverse Autoregressive FlowImproving Variational Inference with Inverse Autoregressive Flow
Improving Variational Inference with Inverse Autoregressive Flow
 

Semelhante a 円錐曲線の極座標表示

2022年度秋学期 応用数学(解析) 第7回 2階線形微分方程式(1) (2022. 11. 10)
2022年度秋学期 応用数学(解析) 第7回 2階線形微分方程式(1) (2022. 11. 10) 2022年度秋学期 応用数学(解析) 第7回 2階線形微分方程式(1) (2022. 11. 10)
2022年度秋学期 応用数学(解析) 第7回 2階線形微分方程式(1) (2022. 11. 10) Akira Asano
 
2021年度秋学期 画像情報処理 第5回 離散フーリエ変換 (2021. 10. 22
2021年度秋学期 画像情報処理 第5回 離散フーリエ変換 (2021. 10. 222021年度秋学期 画像情報処理 第5回 離散フーリエ変換 (2021. 10. 22
2021年度秋学期 画像情報処理 第5回 離散フーリエ変換 (2021. 10. 22Akira Asano
 
TopCoder SRM614 解説
TopCoder SRM614 解説TopCoder SRM614 解説
TopCoder SRM614 解説EmKjp
 
パターン認識第9章 学習ベクトル量子化
パターン認識第9章 学習ベクトル量子化パターン認識第9章 学習ベクトル量子化
パターン認識第9章 学習ベクトル量子化Miyoshi Yuya
 
基礎強化数学 2次関数のグラフ
基礎強化数学 2次関数のグラフ基礎強化数学 2次関数のグラフ
基礎強化数学 2次関数のグラフstudyplace0
 
公開鍵暗号7: 楕円曲線の数理
公開鍵暗号7: 楕円曲線の数理公開鍵暗号7: 楕円曲線の数理
公開鍵暗号7: 楕円曲線の数理Joe Suzuki
 
複素数・四元数と図形の回転
複素数・四元数と図形の回転複素数・四元数と図形の回転
複素数・四元数と図形の回転Yoshihiro Mizoguchi
 
曲面の面積の計算と証明
曲面の面積の計算と証明 曲面の面積の計算と証明
曲面の面積の計算と証明 政孝 鍋島
 
曲面の面積の計算と証明
曲面の面積の計算と証明曲面の面積の計算と証明
曲面の面積の計算と証明nabeshimamasataka
 
181107 06
181107 06181107 06
181107 06openrtm
 
基礎強化数学 第11回
基礎強化数学 第11回基礎強化数学 第11回
基礎強化数学 第11回studyplace0
 
代数的実数とCADの実装紹介
代数的実数とCADの実装紹介代数的実数とCADの実装紹介
代数的実数とCADの実装紹介Masahiro Sakai
 
040 相関
040 相関040 相関
040 相関t2tarumi
 
ITC_principle02_japanese_ver.1.0
ITC_principle02_japanese_ver.1.0ITC_principle02_japanese_ver.1.0
ITC_principle02_japanese_ver.1.0Satoshi Kume
 
Rate-Distortion Function for Gamma Sources under Absolute-Log Distortion
Rate-Distortion Function for Gamma Sources under Absolute-Log DistortionRate-Distortion Function for Gamma Sources under Absolute-Log Distortion
Rate-Distortion Function for Gamma Sources under Absolute-Log Distortion奈良先端大 情報科学研究科
 
基礎強化数学 第6回
基礎強化数学 第6回基礎強化数学 第6回
基礎強化数学 第6回studyplace0
 
基礎強化数学 第6回
基礎強化数学 第6回基礎強化数学 第6回
基礎強化数学 第6回studyplace0
 

Semelhante a 円錐曲線の極座標表示 (20)

ndwave4.pdf
ndwave4.pdfndwave4.pdf
ndwave4.pdf
 
2022年度秋学期 応用数学(解析) 第7回 2階線形微分方程式(1) (2022. 11. 10)
2022年度秋学期 応用数学(解析) 第7回 2階線形微分方程式(1) (2022. 11. 10) 2022年度秋学期 応用数学(解析) 第7回 2階線形微分方程式(1) (2022. 11. 10)
2022年度秋学期 応用数学(解析) 第7回 2階線形微分方程式(1) (2022. 11. 10)
 
linhyp.pdf
linhyp.pdflinhyp.pdf
linhyp.pdf
 
2021年度秋学期 画像情報処理 第5回 離散フーリエ変換 (2021. 10. 22
2021年度秋学期 画像情報処理 第5回 離散フーリエ変換 (2021. 10. 222021年度秋学期 画像情報処理 第5回 離散フーリエ変換 (2021. 10. 22
2021年度秋学期 画像情報処理 第5回 離散フーリエ変換 (2021. 10. 22
 
TopCoder SRM614 解説
TopCoder SRM614 解説TopCoder SRM614 解説
TopCoder SRM614 解説
 
パターン認識第9章 学習ベクトル量子化
パターン認識第9章 学習ベクトル量子化パターン認識第9章 学習ベクトル量子化
パターン認識第9章 学習ベクトル量子化
 
基礎強化数学 2次関数のグラフ
基礎強化数学 2次関数のグラフ基礎強化数学 2次関数のグラフ
基礎強化数学 2次関数のグラフ
 
公開鍵暗号7: 楕円曲線の数理
公開鍵暗号7: 楕円曲線の数理公開鍵暗号7: 楕円曲線の数理
公開鍵暗号7: 楕円曲線の数理
 
複素数・四元数と図形の回転
複素数・四元数と図形の回転複素数・四元数と図形の回転
複素数・四元数と図形の回転
 
曲面の面積の計算と証明
曲面の面積の計算と証明 曲面の面積の計算と証明
曲面の面積の計算と証明
 
曲面の面積の計算と証明
曲面の面積の計算と証明曲面の面積の計算と証明
曲面の面積の計算と証明
 
181107 06
181107 06181107 06
181107 06
 
基礎強化数学 第11回
基礎強化数学 第11回基礎強化数学 第11回
基礎強化数学 第11回
 
代数的実数とCADの実装紹介
代数的実数とCADの実装紹介代数的実数とCADの実装紹介
代数的実数とCADの実装紹介
 
Zetavalue
ZetavalueZetavalue
Zetavalue
 
040 相関
040 相関040 相関
040 相関
 
ITC_principle02_japanese_ver.1.0
ITC_principle02_japanese_ver.1.0ITC_principle02_japanese_ver.1.0
ITC_principle02_japanese_ver.1.0
 
Rate-Distortion Function for Gamma Sources under Absolute-Log Distortion
Rate-Distortion Function for Gamma Sources under Absolute-Log DistortionRate-Distortion Function for Gamma Sources under Absolute-Log Distortion
Rate-Distortion Function for Gamma Sources under Absolute-Log Distortion
 
基礎強化数学 第6回
基礎強化数学 第6回基礎強化数学 第6回
基礎強化数学 第6回
 
基礎強化数学 第6回
基礎強化数学 第6回基礎強化数学 第6回
基礎強化数学 第6回
 

Mais de Maruyama Tetsutaro

Mining of massive datasets chapter3
Mining of massive datasets chapter3Mining of massive datasets chapter3
Mining of massive datasets chapter3Maruyama Tetsutaro
 
業務に活かすデータサイエンスとは?
業務に活かすデータサイエンスとは?業務に活かすデータサイエンスとは?
業務に活かすデータサイエンスとは?Maruyama Tetsutaro
 
Ubuntuで最新パッケージを導入
Ubuntuで最新パッケージを導入Ubuntuで最新パッケージを導入
Ubuntuで最新パッケージを導入Maruyama Tetsutaro
 
Zshでデキるプロンプト
ZshでデキるプロンプトZshでデキるプロンプト
ZshでデキるプロンプトMaruyama Tetsutaro
 

Mais de Maruyama Tetsutaro (7)

Lambda and rundeck
Lambda and rundeckLambda and rundeck
Lambda and rundeck
 
Mining of massive datasets chapter3
Mining of massive datasets chapter3Mining of massive datasets chapter3
Mining of massive datasets chapter3
 
業務に活かすデータサイエンスとは?
業務に活かすデータサイエンスとは?業務に活かすデータサイエンスとは?
業務に活かすデータサイエンスとは?
 
日本の伝統色
日本の伝統色日本の伝統色
日本の伝統色
 
Gnuplotあれこれ
GnuplotあれこれGnuplotあれこれ
Gnuplotあれこれ
 
Ubuntuで最新パッケージを導入
Ubuntuで最新パッケージを導入Ubuntuで最新パッケージを導入
Ubuntuで最新パッケージを導入
 
Zshでデキるプロンプト
ZshでデキるプロンプトZshでデキるプロンプト
Zshでデキるプロンプト
 

円錐曲線の極座標表示

  • 1. 円錐曲線の極座標表示 まるやま 2013/03/28 1 / 20
  • 2. 円錐曲線を極座標表示したい 円錐曲線を極座標表示をしたいんです 時計の針を表示する場合 自由落下する様を表現したい場合 円錐曲線を極座標表示しようよ Lua を使う めんどくさいから、半径は1とする 第1象限を0秒から59秒で移動することを考える 0秒の時に (0, 1)(Y軸上)にいて、 59秒の時に (a, 0)(X軸上 (0 < a ≤ 1))にいるとする 2 / 20
  • 3. 円の場合 circ.lua x = sin θ for t = 0, 59, 1 do th = math.pi / 2 * t / 59 y = cos θ x, y = math.sin(th), math.cos(th) π t θ = (0 ≤ t < 60) print(x, y) end 2 59 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 図 1: 円 3 / 20
  • 4. 円錐曲線の極座標一般系 x = r sin θ y = r cos θ + e 1 − e2 r = 1 + e cos θ e = 0 の場合、円 0 < e < 1 の場合、楕円 e = 1 の場合、放物線(r の分子は定数とする) 1 < e の場合、双曲線 4 / 20
  • 5. 双曲線の曲座標表示 bola.lua e, div = 2, 240 x = r sin θ for t = 0, div, 1 do y = r cos θ + e th = 2 * math.pi * t / div r = (1-e*e)/(1+e*math.cos(th)) 1 − e2 x, y = r*math.sin(th), r*math.cos(th)+e r = print(x, y) 1 + e cos θ end 10 8 6 4 2 0 -2 -4 -6 -8 -10 -10 -8 -6 -4 -2 0 2 4 6 8 10 図 2: 双曲線(全体) 5 / 20
  • 6. 右肩下がりの双曲線 円の場合と同じように、(0,1) から出発して右肩下がりに 図 2 の右下の部分のみを使いたい 下の双曲線の頂点を (0,1) に移動する y に 2 を足す t = 0 の時に θ = π となるように t が増えるに従い、θ は減らす この時に、x 切片(y = 0)の時の θ を求める 1 − e2 cos θ + e + 2 = 0 1 + e cos θ (1 − e 2 ) cos θ = −(e + 2)(1 + e cos θ) e +2 cos θ = − 2e + 1 e +2 θ = arccos (− ) 2e + 1 6 / 20
  • 7. 右肩下がりの双曲線 bola.lua e, div = 2, 59 d = math.pi - math.acos(-(e+2)/((2*e)+1)) for t = 0, div, 1 do th = math.pi-(d*t/div) r = (1-e*e)/(1+e*math.cos(th)) x, y = r*math.sin(th), r*math.cos(th)+e+2 print(x, y) end 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.5 1 1.5 2 2.5 3 図 3: 双曲線(右肩下がり) 7 / 20
  • 8. 切片を調節した双曲線 切片の x 座標を a にしたい e+2 切片なので、この時の θ は arccos (− 2e+1 ) 1 − e2 sin θ = a 1 + e cos θ √ ( ) 1 − e2 e +2 2 1− = a 1 − e 2e+1 e+2 2e + 1 √ 3(e 2 − 1) (2e + 1) = a 2e + 1 √ a2 e = +1 3 8 / 20
  • 9. 切片を調節した双曲線 bola.lua a, div = 0.8, 59 e = math.sqrt((a*a/3)+1) d = math.pi - math.acos(-(e+2)/((2*e)+1)) for t = 0, div, 1 do th = math.pi-(d*t/div) r = (1-e*e)/(1+e*math.cos(th)) x, y = r*math.sin(th), r*math.cos(th)+e+2 print(x, y) end 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 図 4: 双曲線 9 / 20
  • 10. 放物線の曲座標表示 para.lua c, div = 1, 240 x = r sin θ for t = 0, div, 1 do th = 2 * math.pi * t / div y = r cos θ + 1 r = c/(1+math.cos(th)) c x, y = r*math.sin(th), r*math.cos(th)+1 r = 1 + cos θ print(x, y) end 2 1 0 -1 -2 -3 -4 -5 -6 -7 -8 -5 -4 -3 -2 -1 0 1 2 3 4 5 図 5: 放物線(全体) 10 / 20
  • 11. 右肩下がりの放物線 円の場合と同じように、(0,1) から出発して右肩下がりに 図 5 の右の部分のみを使いたい 放物線の頂点を (0,1) に移動する y から c を引く 2 t = 0 の時に θ = 0 t が増えるに従い、θ は増やす この時に、x 切片(y = 0)の時の θ を求める c c cos θ + 1 − = 0 1 + cos θ 2 2−c c cos θ = − (1 + cos θ) 2 (c + 2) cos θ = −(2 − c) c −2 θ = arccos ( ) c +2 11 / 20
  • 12. 右肩下がりの放物線 para.lua c, div = 1, 59 b = math.acos((c-2)/(c+2)) for t = 0, div, 1 do th = b*t/div r = c/(1+math.cos(th)) x, y = r*math.sin(th), r*math.cos(th)+1-(c/2) print(x, y) end 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 図 6: 放物線(右肩下がり) 12 / 20
  • 13. 切片を調節した放物線 切片の x 座標を a にしたい 切片なので、この時の θ は arccos ( c−2 ) c+2 c sin θ = a 1 + cos θ √ ( ) c c −2 2 1− = a 1 + c−2 c+2 c +2 √ c + 2 8c = a 2 c +2 a2 c = 2 13 / 20
  • 14. 切片を調整した放物線 para.lua a, div = 0.8, 59 c = a*a/2 b = math.acos((c-2)/(c+2)) for t = 0, div, 1 do th = b*t/div r = c/(1+math.cos(th)) x, y = r*math.sin(th), r*math.cos(th)+1-(c/2) print(x, y) end 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 図 7: 放物線 14 / 20
  • 15. 楕円の曲座標表示 elli.lua e, div = 0.5, 240 x = r sin θ for t = 0, div, 1 do y = r cos θ + e th = 2 * math.pi * t / div r = (1-(e*e))/(1+(e*math.cos(th))) 1 − e2 x, y = r*math.sin(th), r*math.cos(th)+e r = print(x, y) 1 + e cos θ end 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 図 8: 楕円(全体) 15 / 20
  • 16. 右肩下がりの楕円 円の場合と同じように、(0,1) から出発して右肩下がりに 図 8 の右上の部分のみを使いたい x 切片(y = 0)の時の θ を求める 1 − e2 cos θ + e = 0 1 + e cos θ (1 − e 2 ) cos θ = −e(1 + e cos θ) cosθ = −e θ = arccos (−e) 16 / 20
  • 17. 右肩下がりの楕円 elli.lua e, div = 0.5, 59 b = math.acos(-e) for t = 0, div, 1 do th = b*t/div r = (1-(e*e))/(1+(e*math.cos(th))) x, y = r*math.sin(th), r*math.cos(th)+e print(x, y) end 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 図 9: 楕円(右肩下がり) 17 / 20
  • 18. 切片を調節した楕円 切片の x 座標を a にしたい 切片なので、この時の θ は arccos (−e) 1 − e2 sin θ = a 1 + e cos θ 1 − e2 √ 1 − e2 = a 1 − e2 √ 1 − e2 = a √ e = 1 − a2 18 / 20
  • 19. 切片を調整した楕円 elli.lua a, div = 0.8, 59 c = math.sqrt(1-(a*a)) b = math.acos(-e) for t = 0, div, 1 do th = b*t/div r = (1-(e*e))/(1+(e*math.cos(th))) x, y = r*math.sin(th), r*math.cos(th)+e print(x, y) end 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 図 10: 楕円 19 / 20
  • 20. まとめ 1 circle 0.9 ellipse 0.8 parabola hyperbola 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 図 11: 円錐曲線の極座標表示 20 / 20