算額(その43)
埼玉県加須市騎西町 玉敷神社
足柄上群大井町 三嶋神社 明治15年
http://www.wasan.jp/kanagawa/misima.html
2024/01/12 追記:日本橋 福徳神社(芽吹稲荷)に埼玉県かぞ算額文化保存会が奉納した 2 枚目の算額の問1として加須市騎西町 玉敷神社の算額問題が掲載されている。https://mebuki.jp/2125/
図のように,外円の中に甲,乙,丙の円が入っている。それぞれの円の径を求めよ。
外円の半径を 1 とし,以下の図のように記号を定め,方程式を解く。
using SymPy
@syms r1::positive, r2::positive, r3::positive;
eq2 = (r2 + r3)^2 + ((r2 + r3) + r3)^2 - ((r2 + r3) + r2)^2
eq3 = (r2 + r3)^2 + ((r2 + r3) + r3)^2 - (1 - r3)^2;
res = solve([eq2, eq3], (r2, r3))
1-element Vector{Tuple{Sym, Sym}}:
(1/3, 1/6)
using Plots
function circle(ox, oy, r, color=:red; beginangle=0, endangle=360)
θ = beginangle:0.1:endangle
x = r.*cosd.(θ)
y = r.*sind.(θ)
plot!(ox .+ x, oy .+ y, color=color, linewidth=0.5)
end;
function point(x, y, string="", color=:green, position=:left, vertical=:top; mark=true)
mark && scatter!([x], [y], color=color, markerstrokewidth=0)
annotate!(x, y, text(string, 10, position, color, vertical))
end;
function draw(more=false)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(r2, r3) = (1/3, 1/6)
r1 = r2 + r3
x2 = r1 + r3
println("r1 = $r1; r2 = $r2; r3 = $r3; x2 = $x2")
plot()
circle(0, 0, 1, :black)
circle(0, r1, r1, :red)
circle(0, -r1, r1, :red)
circle(x2, 0, r2, :blue)
circle(-x2, 0, r2, :blue)
circle(x2, r2+r3, r3, :brown)
circle(x2, -(r2+r3), r3, :brown)
circle(-x2, r2+r3, r3, :brown)
circle(-x2, -(r2+r3), r3, :brown)
if more
point(0, r1, "甲円 r1", :red)
point(x2, 0, "乙円 r2", :blue)
point(r1+r3, r2+r3, "丙円 r3", :red)
vline!([0], color=:black, linewidth=0.25)
hline!([0], color=:black, linewidth=0.25)
end
end;