算額(その5)
群馬県高崎市 幸宮神社 文政7年(1824)
https://blog.goo.ne.jp/r-de-r/e/95e0d587bc8ce1d15512697ad8ad6102
東京都府中市の大国魂神社にも同じ問題(上下が反対)の算額があるが,それは明治 18 年(1885) のものだ。
大円に接する 3 個の正六角形と,大円および正六角形に接する 3 個の円がある。
大円,小円の半径をそれぞれ r, x とする。x を求めよ。
AB = AC + CB = √3/4 \* r + x,OB = r - x とすると,AB / OB = cos(π/6) である。
using SymPy
@syms r::positive, x::positive;
eq1 = (r*sqrt(Sym(3))/4+x) / (r - x) - cos(PI/6);
res = solve(eq1, x);
res[1] |> factor |> println
r*(-3 + 2*sqrt(3))/2
x = r*(2*√3 - 3)/2 である。
using Plots
function circle2(ox, oy, r; color=:red)
θ = 0:0.01:2pi
x = r.*cos.(θ)
y = r.*sin.(θ)
plot!(ox .+ x, oy .+ y, color=color)
end;
function hexagon(ox, oy, ol; color=:blue)
θ = range(pi/6, pi*13/6, length=7)
sinθ = ol.*sin.(θ).+oy
cosθ = ol.*cos.(θ).+ox
plot!(cosθ, sinθ, color=color)
end;
function draw(r=1, more=true)
pyplot(size=(500, 500), aspectratio=1, label="", fontfamily="IPAMincho")
pi6 = pi/6
plot()
circle2(0, 0, r, color=:black)
hexagon(0.5r*cos(pi6), 0.5r*sin(pi6), 0.5r)
hexagon(0.5r*cos(pi6+4pi6), 0.5r*sin(pi6+4pi6), 0.5r)
hexagon(0.5r*cos(pi6+8pi6), 0.5r*sin(pi6+8pi6), 0.5r)
x = r*(2*sqrt(3) - 3)/2
circle2(0, r-x, x)
circle2((r-x)*cos(7*pi6), (r-x)*sin(7*pi6), x)
circle2((r-x)*cos(11*pi6), (r-x)*sin(11*pi6), x)
if more
plot!([0, r*cos(pi6)], [0, r*sin(pi6)])
plot!([0, 0], [0, r-x])
plot!([0, (r-x)/2*cos(pi6)], [r-x, (r-x)/2*sin(pi6)])
annotate!(0, 0, text("O ", 10, :right, :bottom))
annotate!((r-x)/2*cos(pi6), (r-x)/2*sin(pi6), text("A", 10, :left, :top))
annotate!(0, r-x, text(" B", 10, :left, :bottom))
annotate!(x*sin(pi6), r-(x+x*cos(pi6)), text(" C", 10, :left, :top))
end
end
draw(1, false)