裏 RjpWiki

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

算額(その2025)

2024年08月17日 | Julia

算額(その2025)

(5) 大阪府池田市畑 畑天満宮 嘉永5年(1852)晩夏
近畿数学史学会:近畿の算額「数学の絵馬を訪ねて」,平成4年5月16日 初版第一刷,大阪教育図書株式会社,大阪市.
キーワード:円10個,外円

外円の中に,大円 2 個,中円 3 個,小円 4 個を容れる。大円の直径が 10 寸のとき,小円の直径はいかほどか。

算額(その1061)に似ている。
https://blog.goo.ne.jp/r-de-r/e/20142cf095d9f0e8c6a1c4c3ab627b1e

外円の半径と中心座標を R, (0, 0)
大円の半径と中心座標を r1, (0, R - r1)
中円の半径と中心座標を r2, (R - r2, 0), (0, 0)
小円の半径と中心座標を r3, (x3, y3)
とおき,以下の連立方程式を解く。

include("julia-source.txt");

using SymPy

@syms R::positive, r1::positive, r2::positive,
     r3::positive, x3::positive, y3::positive
R = 2r1 - r2
eq1 = x3^2 + y3^2 - (R - r3)^2
eq2 = (R - r2)^2 + (R - r1)^2 - (r1 + r2)^2
eq3 = x3^2 + (R - r1 - y3)^2 - (r1 + r3)^2
eq4 = (x3 - R + r2)^2 + y3^2 - (r2 + r3)^2
res = solve([eq1, eq2, eq3, eq4], (r2, r3, x3, y3))[1]

   (r1*(3 - sqrt(5))/2, r1*(-2 + sqrt(5)), r1*(-1 + sqrt(5)), r1*(-1/2 + sqrt(5)/2))

小円の半径 r3 は,大円の半径の (√5 - 2) 倍である。
大円の直径が 10 寸のとき,小円の直径は 10(√5 - 2) = 2.360679774997898 寸である。

その他のパラメータは以下のとおりである。

  R = 8.09017; r1 = 5;  r2 = 1.90983;  r3 = 1.18034;  x3 = 6.18034;  y3 = 3.09017

function draw(r1, more=false)
   pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   (r2, r3, x3, y3) = (r1*(3 - sqrt(5))/2, r1*(-2 + sqrt(5)), r1*(-1 + sqrt(5)), r1*(-1/2 + sqrt(5)/2))
   R = 2r1 - r2
   @printf("大円の直径が %g のとき,小円の直径は %g である。\n", 2r1, 2r3)
   @printf("R = %g;  r1 = %g;  r2 = %g;  r3 = %g;  x3 = %g;  y3 = %g\n", R, r1, r2, r3, x3, y3)
   plot()
   circle(0, 0, R)
   circle22(0, R - r1, r1, :blue)
   circle2(R - r2, 0, r2, :green)
   circle(0, 0, r2, :green)
   circle4(x3, y3, r3, :magenta)
   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(0, R - r1, "大円:r1,(0,R-r1)", :blue, :center, delta=-delta/2)
       point(R - r2, 0, "中円:r22\n(R-r2,0)", :green, :center, delta=-delta/2)
       point(x3, y3, "小円:r3\n(x3,y3)", :magenta, :center, :vcenter)
       point(R, 0, " R", :red, :left, :bottom, delta=delta/2)
       point(0, R, " R", :red, :left, :bottom, delta=delta/2)
   end
end;

draw(10/2, true)


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

コメントを投稿

Julia」カテゴリの最新記事