岐阜県大垣市西外側町 大垣八幡神社(大垣八幡宮) 天保年間
http://ryugen3.sakura.ne.jp/toukou3/wasankibousya.PDF
キーワード:円3個,正三角形,長方形
#Julia #SymPy #算額 #和算 #数学
第13問: 長方形内に正三角形と青円 2 個,赤円を容れる。青円の直径を知って,赤円の径を求めよ。

青円の半径とその中心の \(x\) 座標を \(r_1,x_1\) として方程式を解く。\(r_1 = 1\) として一般性を失わない。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms r1::positive, r2::positive, x1::positive;
r1 = 1
eq1 = x1^2 + (r1-r2)^2 - (r1+r2)^2 # 青円と赤円が外接する
eq2 = distance( (2r1 - 2r2)/sqrt(Sym(3)), 0, 0, 2r1 - 2r2, x1, r1) - r1^2 # 青円が正三角形の斜辺に接する
res = solve([eq1, eq2], (x1, r2))
res |> println
Tuple{Sym, Sym}[(sqrt(3)*(-123*sqrt(3) - 60*(3 - 3*sqrt(3)/2)^2 + 8*(3 - 3*sqrt(3)/2)^3 + 231)/12, 3 - 3*sqrt(3)/2)]
res[1][1] |> simplify |> println # x1
res[1][2] |> simplify |> println # r2
3 - sqrt(3)
3 - 3*sqrt(3)/2
赤円の径は青円の径の \(3 - 3\sqrt{3}/2\) 倍である。
描画関数プログラムのソースを見る
function draw(more)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
r1 = 1
(x1, r2) = ( (3 - √3)r1, (3 - 3*√3/2)r1)
plot([x1 + r1, x1 + r1, -x1 - r1, -x1 - r1, x1 + r1], [0, 2r1, 2r1, 0, 0], color=:black, lw=0.5)
circle(0, 2r1 - r2, r2, :orangered, fill=true)
circle(x1, r1, r1, :steelblue1, fill=true)
circle(-x1, r1, r1, :steelblue1, fill=true)
plot!([(2r1-2r2)/√3, 0, -(2r1-2r2)/√3, (2r1-2r2)/√3], [0, 2r1 - 2r2, 0, 0],
linecolor=:olivedrab1, linewidth=0.5, seriestype=:shape, fillcolor=:olivedrab1)
if more
point(x1, r1, "C:(x1,r1)", :black, :center)
point(0, 2r1 - r2, " 2r1-r2", :black)
point(0, 2r1 - 2r2, " A:2r1-2r2", :black)
point( (2r1-2r2)/√3, 0, " B:(2r1-2r2)/√3", :black, :center, :bottom)
hline!([0], color=:black, lw=0.5)
vline!([0], color=:black, lw=0.5)
end
end;
以下のアイコンをクリックして応援してください