{"type":"rich","url":"https://obelisk.hatenablog.com/entry/2017/09/22/104953","published":"2017-09-22 10:49:53","provider_name":"Hatena Blog","image_url":"http://img.f.hatena.ne.jp/images/fotolife/o/obelisk2/20170922/20170922104510.png","blog_title":"Camera Obscura","author_url":"https://blog.hatena.ne.jp/obelisk2/","blog_url":"https://obelisk.hatenablog.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2017%2F09%2F22%2F104953\" title=\"\u659c\u65b9\u6295\u5c04\u306e\u6570\u5024\u8a08\u7b97\u3068\u63cf\u753b\uff08Ruby\uff09 - Camera Obscura\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"obelisk2","provider_url":"https://hatena.blog","version":"1.0","width":"100%","categories":["Ruby","\u7269\u7406"],"title":"\u659c\u65b9\u6295\u5c04\u306e\u6570\u5024\u8a08\u7b97\u3068\u63cf\u753b\uff08Ruby\uff09","height":"190","description":"4\u6b21\u306e\u30eb\u30f3\u30b2\u2212\u30af\u30c3\u30bf\u6cd5\u306e\u7df4\u7fd2\u3068\u3057\u3066\u3084\u3063\u3066\u307f\u307e\u3057\u305f\u3002\u659c\u65b9\u6295\u5c04\uff08\u659c\u3081\u4e0a\u306b\u3082\u306e\u3092\u6295\u3052\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\uff09\u3058\u3083\u5168\u7136\u5a01\u529b\u3092\u767a\u63ee\u3057\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u3068\u308a\u3042\u3048\u305a\u52d5\u304f\u304b\u3069\u3046\u304b\u3060\u3051\u78ba\u304b\u3081\u307e\u3057\u305f\u3002\u63cf\u753b\u306f gnuplot \u3067\u3084\u3063\u3066\u3044\u307e\u3059\u3002 runge_kutta_sample1.rb require 'numo/gnuplot' require 'matrix' def runge_kutta(f, dt, x, v, t, m) #x, v \u306f Vector, f[x, v, t] \u306f Vector \u3092\u8fd4\u3059 k1 = v * dt l1 = f[x, v, t] * dt / m k2 = (v + l1 / 2) *\u2026"}