高山忠直編: 算法評論
国立国会図書館 デジタルコレクション
https://dl.ndl.go.jp/pid/3508431/1/20
キーワード:半円
#Julia #SymPy #算額 #和算 #数学
半円内に甲,乙,丙の半円が入っている。甲円の直径の半分が乙円の直径,更に乙円の直径の半分が丙円の直径になっている。大円の直径が 11 寸のとき,丙円の直径はいかほどか。

問の図では明瞭ではないが,丙円の中心は乙円の円周上にあり,乙円の中心は甲円の円周上にある(そのように仮定しないと解けない)。
甲円の半径と中心座標を \(r_1,\ (R - r_1,\ 0)\)
乙円の半径と中心座標を \(r_2,\ (R - 2r_1,\ 0)\)
丙円の半径と中心座標を \(r_3,\ (r_3 - R,\ 0)\)
とおき,以下の連立方程式を解く。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms R::positive, r1::positive, r2::positive, r3::positive
eq1 = r2 - r1//2
eq2 = r3 - r2//2
eq3 = (r3 - R + r2) - (R - 2r1)
solve([eq1, eq2, eq3], (r1, r2, r3))
Dict{Any, Any} with 3 entries:
r2 => 4*R/11
r3 => 2*R/11
r1 => 8*R/11
丙円の半径は外円の半径の 2/11 倍である(甲円,乙円の半径はそれぞれ 8/11 倍,4/11 倍である)。
よって,外円の直径が 11 寸のとき,丙円の直径は 2 寸(甲円,乙円はそれぞれ 8 寸,4 寸)。
描画関数プログラムのソースを見る
function draw(more=false)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
R = 11/2
(r1, r2, r3) = (8, 4, 2) .* (R/11)
@printf("丙円の直径 = %g; R = %g; r1 = %g; r2 = %g; r3 = %g\n", 2r3, R, r1, r2, r3)
plot()
circle(0, 0, R, :black, beginangle=0, endangle=180)
circle(R - r1, 0, r1, :blue, beginangle=0, endangle=180)
circle(R - 2r1, 0, r2, :red, beginangle=0, endangle=180)
circle(r3 - R, 0, r3, :green, beginangle=0, endangle=180)
if more
delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3 # size[2] * fontsize * 2
hline!([0], color=:black, lw=0.5)
vline!([0], color=:black, lw=0.5)
point(R - r1, 0, " 甲円:r1\n R-r1", :blue, :left, :bottom, delta=delta)
point(R - 2r1, 0, " 乙円:r2\n R-2r1", :red, :left, :bottom, delta=delta)
point(r3 - R, 0, " 丙円:r3\n r3-R", :green, :left, :bottom, delta=delta)
point(R, 0, "大円:R ", :black, :right, :bottom, delta=delta)
end
end;
以下のアイコンをクリックして応援してください