裏 RjpWiki

Julia ときどき R, Python によるコンピュータプログラム,コンピュータ・サイエンス,統計学

算額(その1188)

2024年08月06日 | Julia

算額(その1188)

(10) 京都市中京区三条大宮西二筋目下ル 武信稲荷神社 嘉永6年(1853)
近畿数学史学会:近畿の算額「数学の絵馬を訪ねて」,平成4年5月16日 初版第一刷,大阪教育図書株式会社,大阪市.
キーワード:円5個,楕円

全円と楕円が交差しており,その隙間に等円が 4 個入っている。全円の直径が 10 寸のとき,等円の直径はいかほどか。

楕円の長半径,短半径,中心座標を a, b, (0, 0); a = R + 2r, b = R - 2r
全円の半径と中心座標を R, (0, 0)
等円の半径と中心座標を r, (a - r, 0), (0, b + r)
とする。
楕円に内接している円は一点で接している曲率円なので,半径は r = b^2/a である。

include("julia-source.txt");

using SymPy
@syms R::positive, r::positive, a::positive, b::positiv
a = R + 2r
b = R - 2r
eq = r - b^2/a
res = solve(eq, r)[1]
res |> println

   R*(5 - sqrt(17))/4

等円の半径 r は,全円の半径 R の (5 - √17)/4 倍である。
全円の直径が 10 寸のとき,等円の直径は 10*(5 - √17)/4 = 2.1922359359558485 寸である。

「術」は「5 から 17の平方根を引き,4 で割り,全円の直径を掛ける」と読めるので,上と同じ計算式である。
しかるに,「答」が 「2寸3分8厘4毛余り」となっている。

function draw(R, more)
    pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   r = R*(5 - sqrt(17))/4
   a = R + 2r
   b = R - 2r
   @printf("全円の直径が %g のとき,等円の直径は %g である。\n", 2R, 2r)
   plot()
   circle(0, 0, R)
   ellipse(0, 0, a, b, color=:green)
   circle2(a - r, 0, r, :blue)
   circle22(0, b + r, r, :blue)
   if more
       delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3  # size[2] * fontsize * 2
       hline!([0], color=:gray80, lw=0.5)
       vline!([0], color=:gray80, lw=0.5)
       point(R + r, 0, "等円:r,(R+r,0) ", :blue, :right, :vcenter)
       point(0, R - r, "等円:r,(0,R-r)", :blue, :center, delta=-delta/2)
       point(a, 0, " a", :green, :left, :bottom, delta=delta)
       point(0, b, "b", :green, :center, delta=-delta)
       point(0, R, "R", :red, :center, :bottom, delta=delta)
   end
end;

draw(10/2, true)


コメント    この記事についてブログを書く
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする
« 算額(その1187) | トップ | 算額(その1189) »
最新の画像もっと見る

コメントを投稿

Julia」カテゴリの最新記事