算額(その860)
山村善夫:現存 岩手の算額,昭和52年1月30日,熊谷印刷,盛岡市. http://www.wasan.jp/yamamura/yamamura.html
水平線の上に菱形と小円 3 個を内接する大円とそれ左側にあり大円と外接する小円がある。小円の直径が 1 寸のとき,左側の小円と大円と直線に挟まれる面積(黒積)を求めよ。
大円とそれに内接する小円 3 個,菱形 1 個は,算額(その851)にあるとおりで,小円の直径を r とすると,大円の直径は 3r である。
include("julia-source.txt");
using SymPy
@syms R::positive, r::positive, x::positive, y::positive,
x2::negative
y = r
eq1 = x^2 + y^2 - (R - r)^2
eq2 = x^2 + (R - r - y)^2 - 4r^2
eq3 = x2^2 + (r - R)^2 - (R + r)^2
res = solve([eq1, eq2, eq3], (R, x, x2))[1]
(3*r, sqrt(3)*r, -2*sqrt(3)*r)
小円,大円と直線により区分される面積は,台形の面積から小円の面積の 1/3 と大円の面積の 1/6 を引いたものである。
S = 2√3*r - 11π*r^2/6
@syms r, R
R = 3r
s3 = √Sym(3)
S = (r + R)*s3(R - r)/2 - PI*r^2/3 - PI*R^2/6
S |> println
-11*pi*r^2/6 + 2*sqrt(3)*r
r = 1/2 のとき,S = 0.2921541746735554 である。
S(r => 1/2) |> N
0.2921541746735554
function draw(more=false)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
r = 1/2
(R, x, x2) = r .* (3, √3, -2√3)
y = r
b = R - r
y0 = -r
x0 = sqrt(R^2 - y0^2)
plot([x2, 0, 0, x2, x2], [-R, -R, 0, r - R, -R], seriestype=:shape, fillcolor=:gray30)
circlef(0, 0, R, :orange)
circlef(0, R - r, r, :cyan)
circlef(x, y, r, :cyan)
circlef(-x, y, r, :cyan)
plot!([x0, 0, -x0, 0, x0], [-r, R - 2r, -r, -R, b - R], color=:red, seriestype=:shape, lw=0.5, alpha=0.5)
circlef(x2, r - R, r, :cyan)
segment(x2, -R, 0, -R, :cyan)
plot!([x2, 0, 0, x2, x2], [-R, -R, 0, r - R, -R], color=:black, lw=1)
circle(0, 0, 0.2, :black, beginangle=210, endangle=270)
circle(x2, r - R, 0.2, :black, beginangle=270, endangle=390)
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, R, " R", :red, :center, :bottom, delta=delta/2)
point(R, 0, " R", :red, :left, :vcenter)
point(0, R - r, "小円:r,(0,R-r)", :green, :center, delta=-delta/2)
point(x, r, "小円:r,(x,r)", :green, :center, delta=-delta/2)
point(x2, r - R, "小円:r \n(x2,r-R) ", :green, :right, :vcenter)
point(0, -r, " -r", :white, :left, :vcenter)
point(2√2r, -r, "(2√2r,-r) ", :white, :right, :vcenter)
point(0, -0.25, "60°", :black, :right, mark=false)
point(x2 + 0.2, r - R, "120°", :black, :left, mark=false)
end
end;