算額(その837)
山村善夫:現存 岩手の算額,昭和52年1月30日,熊谷印刷,盛岡市. http://www.wasan.jp/yamamura/yamamura.html
外円の中に交差する 2 個の甲円,隙間に乙円 3 個,丙円 2 個が入っている。外円の直径が 20 寸のとき丙円の直径はいかほどか。
この問題は,算額(その452)と実質的に同じである。甲乙丙円が収まっているのが円と正方形であることと,90° 回転しているところが違う。
外円の半径と中心座標を R, (0, 0)
甲円の半径と中心座標を r1, (0, r2)
乙円の半径と中心座標を r2, (0, 0), (0, 2r2)
丙円の半径と中心座標を r3, (R - r3, 0)
とし,以下の連立方程式を解く。
include("julia-source.txt")
using SymPy
@syms R::positive, r1::positive, r2::positive, r3::positive;
r2 = R/3
r1 = 2r2
eq1 = r2^2 + (R - r3)^2 - (r1 + r3)^2
res = solve(eq1, r3)[1]
res |> println
R/5
丙円の半径は外円の半径の 1/5 である。
外円の直径が 20 寸のとき,丙円の直径は 4 寸である。
function draw(more=false)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
R = 20/2
r2 = R/3
r1 = 2r2
r3 = R/5
@printf("R = %g; r3 = %g\n", R, r3)
@printf("丙円の直径 = %g\n", 2r3)
plot()
circle(0, 0, R, :green)
circle22(0, r2, r1, :red)
circle(0, 0, r2, :blue)
circle22(0, 2r2, r2, :blue)
circle2(R - r3, 0, r3, :orange)
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, r2, "甲円:r1\n(0,r2)", :red, :center, :bottom, delta=delta)
point(0, R - r2, "乙円:r2\n(0,R-r2)", :blue, :center, :bottom, delta=delta)
point(R - r3, 0, "丙円:r3\n(R-r3,0)", :black, :center, :bottom, delta=delta)
point(R, 0, " R", :green, :left, :vcenter)
point(0, R, "R", :green, :center, :bottom, delta=delta/2)
end
end;