算額あれこれ

算額問題をコンピュータで解きます

算額(その1076)

18 岩手県江刺市大通り 中善観音 文政10年(1827)

安富有恒:和算—岩手の現存算額のすべて,青磁社,東京都,1987.
http://www.wasan.jp/iwatenosangaku_yasutomi.pdf
キーワード:円9個,円弧
#Julia #SymPy #算額 #和算 #数学


交わる 4 個の円弧と甲円 4 個,乙円 5 個がある。乙円の直径が 1 寸のとき,甲円の直径はいかほどか。

円弧を構成する円の半径と中心座標を \(R, (r_2 + R, 0)\)
甲円の半径と中心座標を \(r_1, (0, r_2 + r_1)\)
乙円の半径と中心座標を \(r_2, (0, 0), (x_2, y_2); y_2 = x_2\)
とおき,以下の連立方程式を解く。

include("julia-source.txt");  # julia-source.txt ソース

using SymPy

@syms R::positive, r1::positive, r2::positive, x2::positive, y2::positive
y2 = x2
eq1 = (r2 + R - x2)^2 + y2^2 - (R - r2)^2 |> expand
eq2 = (r2 + R)^2 + (r2 + r1)^2 - (R + r1)^2 |> expand
eq3 = (r2 + R)/2 - x2 |> expand
res = solve([eq1, eq2, eq3], (r1, R, x2))[1]

   (sqrt(2)*r2, r2*(2*sqrt(2) + 3), r2*(sqrt(2) + 2))

甲円の半径 \(r_1\) は乙円の半径 \(r_2\) の \(\sqrt{2}\) 倍である。
乙円の直径が 1 寸のとき,甲円の直径は 1.4142135623730951 寸である。

描画関数プログラムのソースを見る

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


以下のアイコンをクリックして応援してください