算額(その2046)
三十八 群馬県前橋市下大屋町 産泰神社 文政5年(1822)
群馬県和算研究会:群馬の算額,上武印刷株式会社,高崎市,1987年3月31日.
半円の円周内接する n 個の等円を描く。図の灰色部分の面積はいかほどか。
注:n は奇数とする。
半円の半径と中心座標を R, (0, 0)
等円の半径と中心座標を r, (x, y); x = (R - r)*cos(pi/2n), y = (R - r)*sin(pi/2n)
とおき,以下の方程式を解いて等円の半径を求める。
include("julia-source.txt");
using SymPy
@syms n::positive, θ::positive, R::positive, r::positive, S::positive
θ = PI/2n
eq1 = sin(θ)*(R - r) - r
res = solve(eq1, r)[1]
res |> println
R*sin(pi/(2*n))/(sin(pi/(2*n)) + 1)
求める面積は,図の右下の直角三角形の面積から白の扇型の面積を引き,2n 倍したものである。
S = (R - r)*cos(θ)*r/2 - PI*r^2*(PI/2 - θ)/2PI |> simplify
S |> println
r*(2*n*(R - r)*cos(pi/(2*n)) + pi*r*(1 - n))/(4*n)
外円の半径が 1/2,等円の個数が 7 のとき,求める面積は 0.175958422104866 である。
14*S(R => 1/2, n=> 7, r => res(R => 1/2, n=> 7).evalf()).evalf() |> println
0.175958422104866
function rotate2(ox, oy, r, color=:red; angle=120, beginangle=0, endangle=360, by=0.5, n=0)
for deg in 0:angle:180-1
(ox2, oy2) = [cosd(deg) -sind(deg); sind(deg) cosd(deg)] * [ox; oy]
circlef(ox2, oy2, r, color; beginangle, endangle, by, n)
circle(ox2, oy2, r, "red"; beginangle, endangle, by, n)
end
end;
function draw(R, n, more=false)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
θ = 90/n
r = R*sind(θ)/(sind(θ) + 1)
S = r*(2*n*(R - r)*cosd(θ) + pi*r*(1 - n))/(4*n)
@printf("n = %d; R = %g; r = %g; S = %g\n", n, R, r, 2n*S)
plot()
circle(0, 0, R, :blue, beginangle=0, endangle=180)
circlef(0, 0, (R - r)*cosd(θ), :gray70, beginangle=0, endangle=180)
x = (R - r)*cosd(θ)
y = (R - r)*sind(θ)
rotate2(x, y, r, :white, angle=180/n)
plot!([0, x, x], [0, y, 0], color=:black, lw=0.5)
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(R, 0, " R", :red, :left, :bottom, delta=delta/2)
point(x, y, "(x,y)", :red, :center, :bottom, delta=delta)
end
segment(-R, 0, R, 0, :blue)
end;
draw(1/2, 7, true)
※コメント投稿者のブログIDはブログ作成者のみに通知されます